T

Text Machine

Powerful text tools, in your browser

PII Redactor

Paste anything — a support ticket, a log, a chat transcript — and remove the personal data and secrets hiding inside it before you share it. Everything runs in your browser, so the text never leaves your machine.

Your text

Detect:

This tool is a plain client-side script. Your text is processed in this browser tab, is never sent to a server, and is not stored or logged anywhere. Close the tab and it is gone.

How to use PII Redactor

  1. 1

    Paste your text

    Drop in the ticket, chat log, error dump, spreadsheet row or document you are about to share. There is no length limit and nothing is uploaded.

  2. 2

    Pick how matches are replaced

    Censor bars keep the shape of the original for screenshots. [REDACTED] is the classic document look. Type labels like [EMAIL] tell the reader what kind of thing was removed, and numbered placeholders like [EMAIL_1] keep repeats of the same value linked together.

  3. 3

    Turn detectors on or off

    All nine detectors are on by default. Switch one off if that category is safe to keep — for example leaving URLs in a bug report while still removing the API key sitting next to them.

  4. 4

    Check the count, then copy

    The readout shows exactly how many items of each type were removed. Confirm the number matches what you expected, then copy the cleaned text.

About redacting personal data and secrets from text

Why text gets shared before anyone checks it

Almost every accidental disclosure of personal data starts with an ordinary, well-meaning paste. A support agent copies a customer's message into a group chat to ask a colleague what to do. A developer drops a stack trace into an issue tracker. Someone pastes a spreadsheet row into a chat window, or a log excerpt into an AI assistant to ask what the error means. In each case the sensitive part — an address, a card number, an access key — was never the point of the message. It just came along for the ride.

The fix is not more caution, it is a step that takes two seconds. This tool exists to be that step: paste, glance at the count of what it found, copy the clean version. It is deliberately fast enough that using it does not feel like a policy you have to remember.

What the tool looks for

Nine categories are detected. Email addresses and URLs are matched structurally. IPv4 addresses are range-checked, so 999.1.1.1 and a five-part version string are not treated as addresses. US Social Security numbers are matched only in the dashed form. Phone numbers need either an international prefix or real separators. Credit cards and IBANs are validated by checksum. API keys are matched by vendor prefix, and JWTs by their three-part base64 structure.

That list is chosen from what actually turns up in pasted text. The classic PII categories cover the human side, and the credential categories cover the machine side, which in practice is where the most expensive accidents happen. A leaked cloud key costs a great deal more than a leaked phone number.

Precision matters more than coverage

The tempting way to build a redactor is to match aggressively: treat every long digit run as a card, every number with dashes as a phone. That produces impressive-looking results on a demo and quietly ruins real documents. An order id becomes a black bar. A row count disappears. A version number turns into [PHONE]. Worse, the damage is invisible — you copy the output, paste it, and only find out later that the part someone actually needed is gone.

So every detector here is either structurally unambiguous or checksum-verified. A credit card must pass the Luhn mod-10 check that every card network uses, which means a 16-digit number picked at random has roughly a one in ten chance of being accepted rather than a certainty. An IBAN must pass the ISO 13616 mod-97 check. A bare run of digits is never a phone number. The result catches slightly less in exchange for almost never damaging text you meant to keep, which is the right trade for a tool whose output you are about to send somewhere.

Choosing a replacement style

Censor bars keep the visual weight of the original, which is what you want for a screenshot or a document that should still look like a document. [REDACTED] is the familiar legal and FOIA convention and reads clearly in plain text. Type labels like [EMAIL] and [CREDIT_CARD] tell the reader what kind of thing was removed, which matters when the shape of the data is part of the explanation: a bug report reads very differently when it says [API_KEY] than when it shows an anonymous black bar.

Numbered placeholders are the most useful and the least obvious. Repeated occurrences of the same value get the same number, so a thread that mentions one customer four times produces [EMAIL_1] four times rather than four indistinguishable blanks. The document stays coherent: a reader, or a language model, can still tell that the same person appears throughout, and you can map the placeholders back to real values afterwards if you kept the original.

Cleaning text before an AI prompt

Pasting logs, tickets and internal documents into a chat assistant has become routine, and it is now one of the most common ways sensitive data leaves an organisation. The prompt goes to a third party, may be retained, and in some configurations may be reviewed by a human or used for training. Most of the time none of that is necessary, because the model needs the shape of the problem, not the customer's actual email address.

Running the text through a redactor first keeps the useful part and drops the risky part. Numbered mode is the best fit here: the model can still reason about who did what, because the identities remain distinguishable and consistent, while the real values never appear in the prompt. If you need to act on the answer, translate the placeholders back on your own machine.

Why redaction fails in PDFs and images

There is a long and embarrassing history of redaction that did not redact. Court filings, government reports and corporate submissions have all been published with black rectangles drawn over text in a PDF viewer, leaving the original characters intact underneath, selectable and copyable, and recovered within minutes of publication. The same thing happens when a black brush is painted over a screenshot that is later saved in a format retaining a layer or a thumbnail.

The reason is that a black rectangle is a drawing instruction, not a deletion. Working in plain text removes that entire class of failure, because the characters really are replaced in the string: what you copy is all that exists. If you must redact a PDF, use a tool that removes the underlying text, then verify by dragging a selection across the black bars and pasting the result somewhere to see what comes out.

A note on what a tool cannot know

Structured identifiers are detectable because they have a shape. Names, job titles, medical details, internal project code names and a sentence like "she lives two doors down from the clinic" do not, and no pattern matcher will find them. A redactor removes the mechanical category of sensitive data; it does not read the document for you.

Treat the output as a first pass that reliably clears the obvious material, then read it once before you send it. The count of what was removed is there to help with exactly that: if you expected two email addresses and the tool found one, that difference is worth a second look.

Frequently asked questions

What counts as PII here?
Nine categories: email addresses, phone numbers, credit card numbers, US Social Security numbers, IPv4 addresses, URLs, API keys and tokens, JWTs, and IBAN bank account numbers. The first five are the classic personally identifiable information categories; the rest are secrets that leak just as badly and usually travel in the same paste.
Is my text uploaded anywhere?
No. The detection and replacement code is a JavaScript module that runs in your browser tab. There is no upload, no API call and no analytics event carrying your content. That is the whole point of the tool: if you have to send sensitive text somewhere to get it cleaned, you have already leaked it. You can verify this yourself by opening your browser's network panel and watching it stay silent while you type.
Will it destroy ordinary numbers in my text?
It is built specifically to avoid that. Credit cards must pass the Luhn checksum and IBANs must pass the ISO 13616 mod-97 check before they are touched, so an order number, a port, a row count or a version string is left alone. A bare run of digits is never treated as a phone number — only numbers with a country prefix or real separators qualify. The tool is tuned for precision over recall, because a false positive silently eats text you wanted to keep and you may not notice until after you have sent it.
Can I use this before pasting into ChatGPT or another AI tool?
Yes, that is one of the main uses. Run the text through here first and the model still sees the structure and meaning of the document while the actual addresses, card numbers and keys are gone. Numbered mode is the best fit: repeated mentions of the same person become the same [EMAIL_1] placeholder, so the model can still follow who is who, and you can map the placeholders back afterwards.
Which API keys and tokens does it recognise?
Vendor-prefixed credentials with an unmistakable shape: OpenAI sk- keys, Stripe live and test keys, GitHub personal access tokens, AWS access key IDs, Google API keys, Slack tokens, GitLab PATs, npm tokens and SendGrid keys, plus any JWT and the token in an Authorization: Bearer header. Only prefixed formats are matched, so a normal word or a random hash in your text is not mistaken for a credential.
Does redacting text in a PDF really remove it?
Usually not. Drawing a black rectangle over text in a PDF viewer leaves the original characters intact underneath, still selectable and copyable — this is how several well-known redaction failures happened. Working with plain text avoids that whole class of problem: the characters are genuinely replaced in the string, so what you copy is all that exists.
What is the difference between this and the redacted text generator?
The redacted text generator is for looks. It blacks out words at random to produce the classified-document aesthetic for posts and memes. This tool is the opposite: it finds the parts that are genuinely sensitive and removes only those, leaving everything else readable so the document still does its job.
Can I get the original values back?
Not from the output. The replacement is one-way and no mapping is saved anywhere, so keep your original text if you need it. If you want to be able to match placeholders back to values by hand, use numbered mode, which gives each distinct value a stable index within the document.

Related tools

Keep going with these handy tools

Redacted Text Generator

Case Converter

Find and Replace Text

Bionic Reading

Capitalize First Letter

Capitalize Each Word