How to Anonymize a Document Before Pasting It Into ChatGPT, Claude or Gemini (Lawyer’s Method, 2026)
To anonymize a document before giving it to an AI, replace every person, company, address and account number with a consistent placeholder ([Person 1], [Person 2], [Org 1]), keep the table that links each placeholder to the real name on your side, and remove the hidden data (comments, tracked changes, metadata) before you upload. The AI keeps the context it needs to summarize or draft, who did what to whom, and never sees who the people are.
Why you should not paste the original
Three reasons, in order of how often they bite:
- Professional secrecy. For lawyers, sending client identities to a third-party service without the client's consent is a confidentiality question before it is a technical one. In the US, ABA Formal Opinion 512 (2024) asks lawyers to understand how a generative AI tool uses the information they enter before they enter client data. European bars give the same advice.
- Training and retention. Consumer chatbot accounts may keep conversations and, unless you opt out, use them to improve models. Business plans usually do not, but the document has still left your hands.
- The GDPR. Uploading a document full of names to an AI provider is a transfer of personal data to a processor. Pseudonymizing first means the provider receives placeholders instead of identities: the data stays personal for you, who hold the key, but the provider has no reasonable way to tell who is who.
Asking the chatbot itself to "anonymize this" does not solve any of the three: by the time it reads the instruction, it has already read the names.
Black boxes or placeholders?
A black-box redaction is right when the reader must learn nothing. It is wrong for AI work, because the model loses the thread:
| Original | Black-box redaction | Pseudonymized |
|---|---|---|
| Anna Keller sold the car to Bella Moreau. Ms Keller then informed Moreau SA. | ████ sold the car to ████. ████ then informed ████. | [Person 1] sold the car to [Person 2]. [Person 1] then informed [Org 1]. |
With black boxes the AI cannot tell whether the person who informed the company is the seller or the buyer. With placeholders it can, and its answer comes back in placeholders you can map back to names.
This is pseudonymization: the substitution is reversible for whoever holds the table, irreversible for whoever does not. (More on the legal difference in Pseudonymization vs anonymization.)
The method, step by step
1. Decide what the AI actually needs
Before touching the file, write down the task: "summarize the chronology", "list each party's obligations", "draft a reply to the other side". The task tells you what must stay readable (roles, dates relative to each other, amounts) and what can go.
2. Replace identities with consistent placeholders
Rules that make the output usable:
- One placeholder per entity, everywhere. "Anna Keller", "Ms Keller" and "A. Keller" must all become
[Person 1]. If page 3 says[Person 4]for the same person, the AI will treat her as someone else. - Typed prefixes.
[P]for people,[O]for organizations,[A]for addresses. The AI understands that[Org 1]is a company and writes accordingly. - Numbered, not initials. Initials leak information and collide: Anna and Alex are both "A".
- Black out what the AI never needs. IBANs, card numbers, social security numbers: there is no reason for a placeholder, a black box is fine.
- Or name them by role.
[Seller],[Buyer],[Landlord],[Employer]give the AI even more context than[Person 1]. Fictitious names work too, as long as they are obviously fictitious and never the person's real first name.
Doing this by hand with find-and-replace works for a two-page letter. For a 40-page file or a scanned judgment it is where errors creep in, which is why Redact PDF AI's pseudonymize mode does it automatically: it detects every entity, groups the variants of the same name, and burns a coloured box with the placeholder into each page, keeping the original layout. You can rename any placeholder in the editor, [Person 1] to [Seller] for example, and every occurrence follows.
3. Keep the correspondence table offline
The table ([Person 1] = Anna Keller, [Org 1] = Moreau SA) is what makes the document personal data again. Store it in the matter file, never in the chat. When the AI answers "[Person 1] should notify [Org 1] within 30 days", you translate back yourself.
4. Remove the hidden data
Names hide outside the visible text:
- comments and tracked changes in Word,
- document properties (author, company, last modified by),
- headers, footers and file names ("Keller_v_Moreau_draft3.pdf"),
- signatures and stamps on scanned pages.
Exporting a flattened PDF removes the text layer and metadata in one go. A PDF where the text under a box can still be selected was never anonymized; see why black boxes leak.
5. Read it once before you send
Automatic detection catches names, numbers and addresses. It does not know that "the only female judge at the Lausanne court" identifies someone. Read the pseudonymized version once with that question in mind and black out the passages that give a person away by description.
What about text I type directly into ChatGPT?
For prompts you write rather than files you upload, the same principle applies: say "my client" and "the other party", not their names. Our sister tool Caviard AI masks personal data in what you type into ChatGPT before it is sent.
Frequently asked questions
Is a pseudonymized document anonymous? Not for you: you hold the table, so you can re-identify everyone. For the AI provider, who receives the document without the table, it is effectively anonymous, which is what matters for this use.
Does ChatGPT Enterprise or Team remove the need to anonymize? It removes the training question, not the confidentiality one. Many firms still pseudonymize because client consent or internal policy requires that identities never leave the firm.
Can the AI re-identify people from context? Sometimes, when the facts are public (a well-known case, a listed company). Black out the descriptive details too in that situation, or do not use a public AI for that file.
What should the placeholder look like?
Short and consistent. Typed, numbered tags ([Person 1], [Org 1]) are the safe default; role labels ([Seller], [Employer]) give the AI more context. Fictitious names are fine if they are clearly invented ("Person Alpha" rather than a common name that could belong to a real party), because the AI cannot tell a fake name from a real one.
Can I do this on a scanned PDF? Yes, if the tool runs OCR first. Redact PDF AI reads scans and phone photos in more than 100 languages before detecting entities.
Where are the files processed? In the EU and Switzerland, encrypted, deleted automatically, and never used to train AI models.
Try it
Anonymize your first PDF with placeholders: the first document is free, up to 5 pages. Working on a whole case file? See how law firms pseudonymize case files and the tools compared. Need black boxes instead? Read how to redact a PDF.