PII Redactor

Redact PII from text and logs before you share them. Masks emails, SSNs, credit cards, phone numbers, IPs and API keys locally - nothing is uploaded.

Advertisement

Redact PII from logs and support tickets before you paste them anywhere

You have a log excerpt, a support ticket, or a JSON blob that reproduces a bug perfectly — and it is full of customer email addresses, card numbers and API keys. You need to hand it to a vendor, attach it to a ticket, or paste it into a chat, and you need the sensitive values gone first. This tool scans the text you paste, highlights every structured identifier it recognises, and gives you a masked copy you can hand over.

Everything happens in your browser. The detection engine is plain JavaScript regular expressions running on the page; there is no upload, no server round trip, and no storage. That matters more here than on almost any other tool — a redaction service that uploads your unredacted text to redact it has already leaked it. Paste in the sample log, open your browser’s network tab, and you will see no request go out.

What the tool actually detects

Detection is pattern based, not model based. There are thirteen built-in types, each with its own regular expression and a severity used only for colour-coding the highlights. This is the complete list — nothing else is detected:

TypeWhat matchesSeverity
Private keyA whole PEM block, from -----BEGIN PRIVATE KEY----- (or BEGIN RSA PRIVATE KEY) through the matching END lineCritical
JWT tokenThree base64url segments where the first two start eyJCritical
AWS access keyA recognised AWS key prefix (AKIA, ASIA, AROA and the rest) plus 16 uppercase alphanumericsCritical
API key / secretStripe-style sk_live_… / pk_test_…, OpenAI-style sk-…, GitHub ghp_ / gho_ and github_pat_, Slack xoxb--family tokens, and generic api_ / key_ / token_ / secret_ prefixes followed by 20+ charactersCritical
US SSNThe 123-45-6789 shape with dashesCritical
Credit card13–19 digits, optionally split by spaces or dashes, and passing the Luhn checksumCritical
EmailStandard local-part@domain addressesHigh
Phone numberUS formats with parentheses or separators, and +CC international formsHigh
Date of birthYYYY-MM-DD and MM/DD/YYYY-style datesMedium
IPv6 addressFull and compressed IPv6 formsMedium
IPv4 addressDotted quads with each octet range-checked 0–255Medium
MAC addressSix hex pairs separated by colons or dashesLow
US ZIP codeFive digits, optionally +4Low

Read that list as a boundary, not a starting point. There is no detector for passport numbers, driving licence numbers, national insurance or SIN numbers, IBANs, medical record numbers, or non-US government identifiers. If your text contains those, the tool will leave them untouched and tell you nothing is wrong.

The three masking styles, and when each one is right

  • Label replaces the value with its type in brackets — [EMAIL], [US_SSN], [CREDIT_CARD], [AWS_ACCESS_KEY]. This is the default and usually the right one: the reader can still see that an email was there, which keeps the log readable, without seeing whose.
  • Partial keeps a shape hint. Emails become j•••@•••.com — first character of the local part, the real top-level domain, everything else bulleted. Other values keep their first and last character. Use this when you need to tell two different customers apart across a long log without identifying either.
  • Full replaces the value with a run of block characters. Use it when even the length of a value is something you would rather not publish.

Whichever style you choose applies to every redacted type at once; there is no per-type style override.

A worked example

Click Load sample and you get a synthetic application log. Here is what happens to a few of its lines, and why:

  • user=jane.doe@acme.example → the address is detected as an email. In label mode it becomes [EMAIL]; in partial mode j•••@•••.example.
  • charged card 4111 1111 1111 1111 → sixteen digits split by spaces. The digits are stripped and run through Luhn; that number passes, so it is redacted as a card. A sixteen-digit order ID that fails Luhn is left alone, which is exactly the behaviour you want in a log full of numeric IDs.
  • SSN 123-45-6789 → matches the SSN pattern. It does not also register as a phone number, because the phone pattern needs a 3–3–4 digit grouping or a leading + country code.
  • customer 90210 → a false positive. Five bare digits match the ZIP pattern, so a customer ID gets flagged as a US ZIP code. This is the cost of pattern matching and it is worth seeing on your first run.
  • dob 1987-03-14 → matches the date-of-birth pattern. So does every other ISO date in the log that is not already inside a timestamp, which is why the ISO timestamps at the start of each line get flagged too. The date pattern has no idea which dates are birthdays.
  • Bearer eyJhbGciOi… → three dot-separated base64url segments, detected as a JWT and replaced whole.
  • AKIAIOSFODNN7EXAMPLE → an AWS access key ID, matched on the AKIA prefix plus sixteen characters.
  • John Smith, 1600 Pennsylvania Ave NWnot detected. Names and street addresses have no reliable regex, so the deterministic engine leaves them exactly as they are.

Turning individual types off

Above the two panes you get one chip per detected type, showing how many instances were found. Click a chip and that type stops being redacted — it stays highlighted in the original pane, dimmed, but passes through to the output untouched. This is the fix for the ZIP-code false positive above, and it is also how you keep the fields you actually need. IP addresses are the common case: if you are debugging a routing problem, redacting every IPv4 address destroys the evidence. Turn the IPv4 chip off, leave the email and card chips on, and you get a log that is still useful and still safe to send.

Overlapping matches

Several patterns can match the same span of text — a card number is also a long digit run, and a JWT is also a chain of base64 words. Each type carries a specificity ranking, and when two matches overlap the more specific one wins; if two matches are equally specific, the longer span wins. That is why an AWS key is redacted as an AWS key rather than as a generic API secret, and why a PEM private key is replaced as a single block rather than line by line.

The optional AI sweep, and what it is not

Because names and addresses are the obvious gap, the page offers a second, optional pass: a small instruction-tuned language model that runs in your browser via WebGPU. It downloads once (a few hundred megabytes to a couple of gigabytes depending on the model you pick) and is cached by the browser afterwards, shared with the other local-AI tools on this site. It needs a browser with WebGPU — Chrome, Edge, or Safari 18+ — and hardware acceleration switched on.

Two things about that pass are important. First, it is genuinely local: the model weights come down to your machine and the inference runs on your GPU, so your text still never leaves the browser. Second, and more importantly, it does not redact anything. It is prompted to list candidate person names, physical addresses and organisation names, one per line, as suggestions for you to review. Nothing it finds is masked automatically, and it only sees the first 4,000 characters of your input. Treat its output as a checklist for your own eyes, then remove what it found by hand or by editing your source text.

Failure modes worth knowing before you trust the output

  • Unusual formatting defeats the patterns. An SSN written 123 45 6789 with spaces is not matched. A card number split across a line break is not matched. A phone number written as a bare run of ten digits is not matched, by design — that restriction is what stops every ten-digit ID in your log from being swallowed as a phone number.
  • Encoded and nested data is invisible. Base64-encoded payloads, URL-encoded query strings, gzipped blobs pasted as text — the identifiers inside them are not in a form the patterns can see. Decode first, redact second.
  • Structure is not analysed. The tool does not know that a JSON field called "customer_name" holds a name, or that a column in a CSV is a patient identifier. It only looks at value shapes.
  • Free-text prose leaks. “The account belongs to the Henderson family at the Riverside branch” contains no pattern-matchable identifier and passes through completely intact.
  • Redaction is not reversible or verifiable. The output is a plain string with substitutions applied; there is no key, no tokenisation map, and no way to reconstruct the original from the redacted copy.

This is not a compliance control

It is worth stating plainly, because tools like this get pressed into duties they cannot carry. An automated pattern matcher is a helper for a human who is about to share something, not a de-identification control you can point at in a GDPR, HIPAA or PCI DSS conversation. Those frameworks care about a documented process, an assessment of re-identification risk, and evidence that the result was reviewed — none of which a regex engine provides. Formal HIPAA de-identification, for instance, has two defined routes (expert determination and the Safe Harbor identifier list), and “I ran it through a browser tool” is neither.

The honest workflow is: redact here, then read the output before you send it. The two-pane layout exists for exactly that — the left pane shows what was found so you can see whether the tool understood your data, and the right pane is what you are about to hand over. When the counts look implausibly low for the text you pasted, that is the signal to slow down, not to ship.

Getting the result out

The redacted pane has a copy button and a download button that saves a redacted.txt file. Both act on the current output, with the current mask style and the current set of enabled type chips, so change your toggles before you copy rather than after. Detection re-runs about a third of a second after you stop typing, so on a very large paste give it a beat before you copy.

If you are working with structured JSON rather than free text, and you want to strip sensitive values while keeping the document’s shape intact, a key-aware redactor is a better fit than a free-text scanner — the shape of the document tells you which fields are sensitive, which is information this tool deliberately does not use.

What Counts As PII — And Why Redaction Matters

Personally identifiable information (PII) is any data that can identify a specific person. The obvious cases are direct identifiers: name, email, phone number, Social Security number, credit card. But logs and documents also leak indirect identifiers — IP addresses, device IDs, session tokens, account numbers — that combine to identify someone.

The risk is mundane and constant: a developer pastes a production log into a public issue tracker to ask for help, and it contains a customer's email and IP. A support agent shares a ticket in a vendor chat that includes a full card number. Someone drops a document into a cloud AI to "just summarize it" and exposes employee data. Each of these is a potential breach under GDPR, HIPAA, or PCI-DSS — and each is avoidable by redacting first.

This tool detects the structured PII that follows reliable patterns (emails, SSNs, Luhn-valid card numbers, phones, IPs, keys) and lets you produce a clean version to share. The technical content you actually need to communicate — the error, the request flow, the timing — stays intact; only the personal data is masked.

Rules vs. AI: Why This Tool Uses Both

Detecting sensitive data well requires two different approaches, and this tool combines them.

Pattern matching (rules) is perfect for structured data. An email always has the shape user@domain.tld; a US SSN is three digits, two digits, four digits; a credit card passes the Luhn checksum. Regular expressions catch these reliably and instantly, with no false negatives on well-formed values and — thanks to validation like the Luhn check — few false positives. Everything the rules find is redacted deterministically.

AI is for the unstructured remainder. Person names, street addresses, and organization names have no fixed pattern — "Robert" and "robert" the word are indistinguishable to a regex. A small language model, run locally in your browser, can read context and flag likely names and addresses. But AI is fallible in both directions: it misses some real names and invents others. So the tool treats AI output as suggestions to review, never as automatic redactions.

The result: deterministic, trustworthy redaction of structured PII, plus an optional intelligent sweep for the contextual data rules cannot catch — all without your text leaving the browser.

Frequently Asked Questions

Is my data safe — does anything get uploaded?+

Nothing is uploaded. All detection and redaction happens in your browser with JavaScript. Your text never touches our servers. This is the entire point: you can safely paste logs, documents, or support tickets containing real personal data, redact them, and copy out the clean version — all without that sensitive data ever leaving your device. Verify it by going offline and using the tool.

What types of sensitive data does it detect?+

Structured PII and secrets that have reliable patterns: email addresses, US Social Security numbers, credit card numbers (validated with the Luhn checksum so random 16-digit numbers are not falsely flagged), US and international phone numbers, IPv4 and IPv6 addresses, AWS access keys, generic API keys and tokens, JWTs, PEM private-key blocks, MAC addresses, and US ZIP codes. You can toggle each type on or off before redacting.

Can it find names and addresses?+

Not reliably with rules alone — names and street addresses do not follow fixed patterns, so a regex either misses them or flags ordinary words. That is where the optional in-browser AI helps: it can scan for contextual PII like person names, physical addresses, and organization names and list them as suggestions for you to review. Crucially, the AI suggestions are never auto-redacted — you decide what to remove, because AI can both miss real names and flag false ones.

What are the masking styles?+

Three options. Full masking replaces the value with solid blocks (████████) so the length and content are hidden. Label masking replaces it with a typed tag like [EMAIL] or [SSN], which is useful when you want the reader to know what kind of data was there. Partial masking keeps the first and last characters visible (j•••@•••.com), helpful for debugging where you need to tell entries apart without exposing the full value.

Why redact data before sharing logs?+

Logs, error reports, and support tickets routinely contain customer emails, IP addresses, session tokens, and sometimes payment data. Pasting them into a forum, a bug tracker, a vendor support chat, or an AI assistant can leak that data and create compliance violations (GDPR, HIPAA, PCI-DSS). Redacting first lets you share the technical content — the stack trace, the request flow — without exposing anyone's personal information.

How does this differ from the Secrets Scanner?+

The Secrets Scanner focuses on credentials and API keys in code (AWS keys, tokens, private keys) and is geared toward catching secrets before they are committed. The PII Redactor is broader and aimed at any text or logs — it covers personal data (emails, SSNs, cards, phones) as well as keys, and its job is to produce a clean, redacted version you can share. Use the Secrets Scanner for code review; use this for sanitizing data you are about to send somewhere.

Related tools

This tool is provided for informational and educational purposes only. All processing happens in your browser — no data is sent to or stored on our servers. While we strive for accuracy, we make no warranties about the completeness or reliability of results.