ai · prompts
How to Anonymize Text Before You Paste It Into AI
Updated November 23, 2026 · 9 min read
direct answer
Anonymize first, paste second, map back third. Run your text through the Text Anonymizer before it goes anywhere: the structured identifiers — emails, phone numbers, cards, IDs, IPs, API keys — are found automatically, and the names, employers and codenames you add by hand. Send the anonymized copy, keep the restore map, and swap the placeholders back into the answer afterwards. Two minutes of work, and the text never left your machine to begin with.
Why a “don’t train on this” toggle is not a privacy control, what to strip and what to keep, and the round trip that nobody documents.
Why this is worth doing at all
The reason is not that your assistant is a bad actor. The reason is that a prompt is a transmission, and it lands in a system you do not control, subject to a retention policy you did not write, operated by people you have never met, and stored in a location with its own legal framework. That is true of every cloud service, and most of them are fine. But the cost of not pasting the text is usually low, and the cost of pasting it once and regretting it is not recoverable at all.
So the practical question is not “should I use AI?” It is “does this particular prompt need to contain a customer’s name?” Usually it does not. An assistant asked to summarise a support thread needs the thread, not the customer. An assistant asked to explain an error message needs the error message, not the server it came from and the engineer who deployed it. Strip the who and the where, keep the what, and the answer is just as good.
The toggle is not a control
Every major assistant has a setting somewhere for whether your conversations are used to improve the model. People find it and turn it off, and then relax. That is the wrong conclusion, and it is worth being precise about why.
- It governs retention after the fact, not the transmission itself. With the setting off, your text still left your laptop, was still processed on somebody else’s hardware, and was still visible to that provider and to whoever administers the account. The setting changes what happens next, not what just happened.
- It is per-surface. A setting in a chat app does not necessarily govern the API, a plugin, a custom GPT, a shared link, or a workspace your employer configured. Each surface has its own defaults.
- It changes without notice. Terms change. A setting introduced in one place does not always arrive in another. If the guarantee matters, anonymizing the text is the only version of it that does not depend on somebody else’s product decisions holding still.
- It does nothing about your own employer’s rules. If a colleague can see your workspace, no consumer-side setting reaches that.
Anonymizing is the only version of “they did not keep it” that you control entirely, and it is the only version that also survives the assistant being wrong about what it does with your data.
What to strip and what to keep
This is the part people get wrong in both directions. Strip too much and the model has nothing to work with; strip too little and you have done a lot of work for nothing. Here is the rule that works:
| Strip | Keep | Why |
|---|---|---|
| Names, initials, pronouns tied to a person | The role: “the customer”, “the on-call engineer” | A name identifies. A role does not, and the model can reason about roles perfectly well. |
| Email addresses, phone numbers | The fact that a contact was made | Direct identifiers, and the easiest for a model to memorise or a breach to expose. |
| Home and delivery addresses | The city, if the region matters to the question | A street address states where somebody lives. That is a different kind of disclosure from a work location. |
| Card numbers, bank details, national IDs | The last four digits, if the question is about a payment | These are the identifiers where a single leak causes direct financial harm, and the model never needs the full value. |
| API keys, tokens, passwords, session IDs | Which service, and roughly when it expired | The most expensive thing to paste into a chat window by accident, and the one most often shared in a screenshot. |
| Internal URLs, hostnames, IP addresses | The service name and the error | An internal hostname reveals your infrastructure, and an IP reveals roughly where the machine is. |
| Employer, client, project codenames | “the client”, “the migration” | An employer narrows a person down enormously, and a client name is commercially sensitive on its own. |
| Dates of birth, precise timestamps | The date, the month, the duration | A birth date plus a name is nearly an identity. A timestamp plus a log line can be enough on its own. |
| — | Amounts, error messages, code, product names, the sequence of events, the question being asked | This is the substance. Remove it and the model has nothing to reason about, which is the other way to fail. |
Why consistent placeholders beat [REDACTED]
This is the detail that separates a usable anonymized prompt from a useless one, and almost nobody gets it right on the first attempt.
Consider three versions of the same sentence:
- Every occurrence redacted: “[REDACTED] asked [REDACTED] to move the subscription from [REDACTED].”
- Consistent placeholders: “[CUSTOM_1] asked [CUSTOM_2] to move the subscription from [CUSTOM_1].”
- Fake names: “John Smith asked Mary Jones to move the subscription from John Smith.”
The first is unreadable and, worse, it destroys the information the model needed: that the same person asked and was asked. The second keeps every relationship in the document intact while removing every identifier, so the model can still follow who did what. The third keeps the structure but invents a person, and a model asked about “John Smith” may reason about a human being who does not exist, or may helpfully try to find out more about him.
Consistent placeholders are the only version that is both readable and true. The Text Anonymizer numbers them per type in order of first appearance, so the same value gets the same label everywhere it appears, which is exactly the property you want.
The five-step workflow
Step 1 — Scan
Paste the draft prompt into the tool. The ten fixed-format detectors find every email address, phone number, US Social Security number, credit card number, IBAN, IP address, URL, JSON Web Token, API key and password assignment in the text. Cards are Luhn-checked and IBANs are mod-97-checked, so an invoice reference or a build number is left alone while a real card number is caught.
Step 2 — Add what the scan cannot see
This is the step that does the real work, and it is the one people skip. Type every name, employer, client and codename into the custom-words box, one exact phrase per line. The scanner finds an email address every time; it will never find “Priya” every time, and it will never know that “Project Falcon” is a codename for something your employer would rather you did not paste.
Step 3 — Review the findings
Read the findings table once, line by line, and then read the anonymized prose once more as prose. The table tells you what the tool did. The prose read tells you what the tool could not: a sentence that identifies somebody with no name in it, a screenshot reference, a file name, a customer’s unusual complaint that would be recognisable to them.
Step 4 — Copy the map, then send
Before you paste anything, press Copy map and keep the result. That map is what lets you put the real names back into the answer, and it disappears when you close the tab. Then paste the anonymized version into your assistant.
One habit worth building: keep the map in the same place as your notes for that conversation, not in the chat itself. The moment the real names are in the chat window, you have lost the thing you were trying to protect.
Step 5 — Map the answer back
The answer will arrive containing [CUSTOM_1] and [EMAIL_1]. Swap them for the real values using your map, then read the answer once more to check it still makes sense. Sometimes it will not: a model that has been reasoning about placeholders may have hedged differently, or drawn a conclusion that depended on knowing the name was a company rather than a person. That is a useful signal in itself, and it is exactly the kind of thing you would rather discover before sending the reply than after.
What to do about files, not just text
A prompt is rarely only text. Four cases cover most of it:
- A PDF. It can carry personal data in three separate places: the file’s properties, its page text, and its file name. Run the PDF Metadata Scrubber on the file, then extract the text and run it through the anonymizer. A file called
jane-doe-invoice.pdfdefeats everything else you did. - A photo or screenshot. A screenshot of a dashboard contains names in pixels, and the file behind it may carry GPS coordinates and a camera serial in its EXIF block. Strip the metadata with the Photo Metadata Remover, and remember that the names in the picture are still there.
- A log file. Logs are where personal data leaks most often, because they carry user IDs, IP addresses and timestamps by default. The OWASP Logging Cheat Sheet is blunt about this: personal data should not be logged in the first place, and where it must be, it should be pseudonymised at the point of writing. Run the anonymizer over a sample before you paste a whole log.
- An image with text in it. A scanned document needs OCR before anything can be removed from it, and OCR output is ordinary text that then needs the anonymizer like anything else.
A short checklist before you press send
- No email address, phone number, card number, national ID, IP address, URL with an internal hostname, or credential appears in the anonymized text.
- Every name, employer, client and codename has been added by hand, not left to the scanner.
- The question still makes sense without any of the removed detail. If it does not, you removed something the model needed.
- No sentence identifies a person by context alone — no “the only person who”, no “the person who complained about”.
- The restore map is saved somewhere safe, and not in the chat window.
- Your organisation’s policy has been checked, if you are doing this at work.
What this does not solve
Anonymizing a prompt removes identifiers. It does not remove confidentiality. A contract, a price list, a piece of unreleased code, a legal strategy or an unreported incident may contain no personal data at all and still be something you should not paste into a third-party service. The guide to what counts as personal data covers the difference between the two, and the full walkthrough covers every control on the tool in detail.
Related reading
- The Text Anonymizer itself — free, zero uploads, works offline
- How to Use the Text Anonymizer (Step by Step)
- What Is PII? A Plain-English Definition and How to Redact It
- CSV PII Checker — clean customer rows locally before analysis or sharing
- What Counts as PII in a CSV?
- Email Tracker Detector — what the other end of a message records about you
- What Email Trackers Learn About You, Field by Field
- How to Block Email Tracking
- PDF Metadata Scrubber
- Photo Metadata Remover
- All privacy tools
faq
Frequently Asked Questions
What people ask before they paste the first real prompt.
Do AI providers train on my prompts?
It depends on the product, the plan and the settings, and the honest answer is that it changes over time. Consumer tiers have historically used conversations for model improvement unless the user opts out, and business tiers have generally not. Whatever the current setting is, it governs retention after the fact. It does not change the fact that the text left your machine and was processed on somebody else’s hardware. If that is not acceptable, do not send the text, and anonymize it before you send it.
Is anonymizing my text enough?
It is a strong first step and it removes most of the risk, but it is not a guarantee. Anonymization removes the identifiers you can see. It cannot remove context that identifies a person without naming them, and it cannot stop you pasting something sensitive that was never an identifier to begin with. Read the anonymized output once before you send it.
What should I keep so the answer is still useful?
The structure and the substance: what was asked, what was done, the sequence of events, the amounts, the dates, the product names, and the technical detail. Strip the who and the where. An assistant asked to summarise a support thread needs the thread, not the customer. It needs to know a refund was refused and the amount was 65 pounds, not that it was Mrs Smith in Cork.
Should I use placeholders or fake names?
Placeholders. Consistent labels such as [EMAIL_1] keep the joins intact, so the model can still see that the same person appears in three sentences, and they are obviously not real, so the model will not treat them as data to guess about. Fake names invite the model to reason about a person who does not exist, and they can leak back into the answer as if they were real.
Can I paste customer data into ChatGPT?
Not customer data as it stands. You can paste the shape of the problem instead: anonymize it first, or rewrite the case in the abstract. If your employer has a contract with a provider, that contract may change what is permitted, but it will not change the fact that a customer name is personal data under GDPR Article 4(1).
Does this work with Claude, Gemini and Copilot too?
Yes, and the method is vendor-neutral on purpose. The anonymization happens before the text leaves your machine, so it does not matter which assistant receives it. What differs between vendors is their retention policy, their training default and whether they offer a no-training mode, and those are worth checking against your own organisation’s policy.
How do I know my prompt is clean before I send it?
Read the anonymized output, not the input. Check that no email, phone number, card, ID, IP address or key survives, then read the prose once for names and context the scanner cannot see. If the text contains a customer, the risk is usually in the sentences rather than in the structured fields.
What about images and PDFs?
They need separate handling. A PDF can carry personal data in its metadata, its file name and its page text, so run the metadata scrubber on the file and then anonymize the extracted text. A photo can carry GPS coordinates and a camera serial in its EXIF block, so strip the metadata first and anonymize any caption separately. Text inside a scanned image needs OCR before anything can be removed from it.