Data Sanitizer for AI Prompts

Replaces the current input with demonstration data.

Expected result: Eight values are replaced: the email address (both times as [EMAIL_1]), the phone number, the card, the IBAN, the IP address, the bearer token and the password. The name Alice Smith stays unless AI detection is on.

Limitations: Patterns only recognise values with a known structure. Names, addresses and ID numbers need the optional AI pass, which is most accurate on Latin-script text. Always read the output before sharing it.

Replace with
Look for

Downloads about 30 MB once, from this site, then runs entirely on your device. Most accurate on English and other Latin-script text.

Output

Automatic detection misses things. Read the output before you share it.

Nothing you enter here is stored, logged or shared.

Paste a log, stack trace or support ticket and its API keys, passwords, email addresses, IP addresses and card numbers become tags like [EMAIL_1]. An AI assistant can still follow what happened without seeing the real values.

How to use

  1. Paste the text you are about to share.
  2. Choose how values are replaced and which kinds to look for.
  3. Turn on AI detection if the text contains names or addresses.
  4. Read the highlighted output, then copy it into your AI chat or ticket.

Why clean a log before pasting it into AI

The fastest way to debug something with an AI assistant is to paste the real output, and real output is full of things you never meant to send: a bearer token in a request dump, a customer's email beside the error, a connection string printed at startup. Once it is submitted, what happens to it depends on the provider's retention settings, and you cannot take it back.

Deleting values by hand is slow and easy to get wrong in a long log. Replacing them with one word is safe but destroys the thing you needed help with, because the assistant can no longer tell one user or host from another. Numbered tags keep that structure: [EMAIL_1] failed to log in three times, then [EMAIL_2] succeeded from the same [IP_1].

Two layers: patterns and a model

Most sensitive values have a shape, and a shape can be checked. Card numbers are validated with the Luhn checksum, IBANs with the ISO 13616 mod-97 check, IPv4 addresses octet by octet and IPv6 addresses with the same parser as the subnet calculator. API keys are recognised by the prefixes their issuers publish - GitHub, AWS access key IDs, Stripe, Slack, Google, npm and the sk- style keys used by AI providers - along with JSON Web Tokens, private key blocks, Authorization headers and assignments such as API_KEY= or "password":. This layer runs on every keystroke and costs nothing to download.

Names, street addresses and document numbers have no shape at all. Nothing distinguishes the word Rose in a garden from Rose the customer except the sentence around it, which is why the second layer is a model rather than a pattern. It is Rampart, a small token classifier published by National Design Studio under CC BY 4.0: six transformer layers, about 15 MB, trained to label given names, surnames, street lines, and tax, passport and licence numbers. It runs in a background worker on your device and only once you turn it on.

When the two layers disagree about the same characters, the pattern wins. A number that passes a checksum is stronger evidence than a model's guess, and a value is always replaced whole - half of an email address left behind is worse than either answer.

What it will miss

No automatic redaction is complete. A secret with no recognisable prefix and no label beside it, such as a bare AWS secret access key in the middle of a line, looks like any other random string. Coverage of labelled and prefixed credentials also has gaps today: tested against a set of sample logs, it left GitLab, SendGrid, Hugging Face and Twilio tokens, Cookie and Set-Cookie values, Azure AccountKey values, MySQL -p passwords, variables named only DB_PASS, passwords inside escaped JSON and URL-encoded email addresses in place.

Names are a matter of probability. The model's own published evaluation measures about 98% recall on its Latin-script test set, which means roughly one private value in sixty slips through even on text that resembles its training data. On names written in other scripts it is far weaker: the model card reports about 46% for Japanese names, 15% for Korean and 9% for Chinese.

Some identifying information is not a value at all. A job title, a small town and a date together can point at one person. Customer numbers, case references, hostnames and project code names are unique to your organisation, so nothing outside it can recognise them. Replace those by hand. Every replacement is highlighted in the output so that reading it is quick, but it is still your last check before pasting.

Choosing a replacement style

Numbered tags are the default because they keep the text usable. The same value always gets the same tag, compared without regard to case, so an assistant reading the result can still reason about who did what.

Plain tags drop that link. Use them when even the pattern of repetition is sensitive - how many distinct customers appear in an incident, for example - or when you want the least information to survive.

Asterisks keep the original length and layout, which suits fixed-width output and screenshots. The cost is that length is itself a small leak: a four-letter name and a twelve-letter one stay distinguishable.

Be careful with the word anonymous. Under data protection law such as the GDPR, removing obvious identifiers usually produces pseudonymised data, which is still personal data. This tool keeps no mapping from tags back to values, but the context that remains may still identify someone.

What runs where

Redaction happens on your device. The pattern layer runs in the page. The model, when you turn it on, downloads once from this site - about 30 MB, made up of the ONNX Runtime WebAssembly engine and the model weights - is cached by your browser and runs in a Web Worker. The tool has no server component and never sends your text or the results anywhere.

One limit on that promise: like the rest of this site, this page currently loads Google's advertising and Tag Manager scripts. The sanitizer does not hand them your text, but any script on a page is technically able to read that page. If you are working with live production credentials, block those scripts with a content blocker first, and rotate any secret you have already exposed.

Frequently asked questions

Is it safe to paste real secrets here?
The tool itself does not transmit them, but the page also loads third-party ad and analytics scripts, so use a content blocker for live credentials. Any key that may already have been exposed should be rotated, whichever tool you use.
Does it catch every piece of personal data or every key?
No, and no automatic tool does. Checksummed and well-known formats are found reliably, names and addresses are found most of the time when AI detection is on, and unlabelled random strings or context that identifies someone indirectly are not found. Read the highlighted output before you share it.
Can an AI assistant still help if the values are replaced?
Usually, yes. Debugging depends on structure more than on the values themselves, and numbered tags preserve which user, host or key appeared where. If the bug depends on the exact format of a value, invent a safe example with the same format.
Why are names not replaced?
Because a name has no pattern to match. Turn on AI detection, which downloads a small on-device model to recognise names, street addresses and ID numbers. Without it, only values with a recognisable format are replaced.
Which languages does name detection support?
English, Spanish, French, German, Italian, Portuguese and Dutch, where the model's published recall is around 98%. Names written in Japanese, Chinese, Korean and other non-Latin scripts are mostly missed. Pattern detection - emails, cards, keys, IP addresses - works in any language.
What exactly does the AI download?
About 30 MB from this site: the ONNX Runtime WebAssembly engine and the Rampart model with its tokenizer. The download only starts when you tick the box, and the files are cached.
Why was an order number or a date left alone?
Numbers are only replaced when their format can be checked - a card number must pass Luhn, an IBAN must pass mod-97 - because replacing every long number would wreck the log you are trying to share. Dates are not treated as personal data on their own. Replace anything specific to your organisation by hand.
Can I undo the redaction?
No. No mapping from tags back to the original values is kept anywhere, by design. Keep your original text if you will need it.

Last updated:

Report a problem

Include the steps, expected result, and actual result. Remove secrets and personal data.

Related tools

Related articles