How to Anonymize Documents Before ChatGPT

A lawyer pastes a statement of claim into ChatGPT and asks for a summary. Someone in HR drops three CVs in and asks which candidate to interview. A developer points Claude Code at a folder of real invoices. None of those files looked dangerous on the desk. The paste is the disclosure: names, a national ID number, an address, a bank account, sent to a model provider the organization often has no contract with, and often from a personal account nobody approved.
This is already ordinary. LayerX's 2025 report, drawn from browser telemetry of its enterprise customers, is the clearest public count. The Register's write-up puts it this way. 45% of employees in those companies use generative AI. Of those users, 77% paste data into prompts. About 40% of files uploaded to those tools contain personal data or payment-card data, and 22% of the paste operations themselves do. 82% of the pastes come from unmanaged personal accounts.
Harmonic Security measured a different slice from April to June 2025: one million prompts and 20,000 files, across 300 generative AI tools. Sensitive content was in 4.37% of prompts (43,700) and in about 22% of the files (4,400). The release is explicit that "sensitive" is wider than personal data: source code, credentials, algorithms, deal papers, customer or employee records, and internal financials.
A Zapier survey fielded by Centiment from 13 to 21 May 2026 asked 1,005 people at US companies of 500 or more. 79% said they had entered especially sensitive information: HR data, logins and API keys, or customer or employee personal data. 31% enter login credentials or API keys. Half had ignored a workplace restriction, and 36% were not fully confident they knew what was allowed. A written ban does not close that gap.
You stay the controller
The organization that decides to send the document is the controller. The paste discloses personal data to the provider of the model. When that provider sits outside the EU, the paste is often a transfer as well. It sits badly with data minimisation in Article 5(1)(c) of the GDPR: personal data shall be adequate, relevant and limited to what is necessary. A summary does not need the client's national ID number. A translation does not need the home address. A coding agent does not need the name on the invoice.
Article 4(5) calls this pseudonymisation: personal data that can no longer be attributed to a person without extra information, kept apart, and protected against the people who should not have it. Article 25 expects that by design, and Article 32 as a security measure. Recital 26 adds that data which does not relate to an identifiable person falls outside the Regulation.
On 4 September 2025 the Court of Justice decided EDPS v SRB (C-413/23 P). Pseudonymised data is not personal data for every holder of it. A recipient who has no means reasonably likely to be used to re-identify anyone may not be processing personal data at all. The organization that keeps the key is in a different position. It can put the names back, so it is still processing personal data, and it still has to tell people who receives their data.
That greatly reduces the risk of the paste. It does not take the file outside the GDPR, and it is not a lawful basis on its own. Talk to your data protection officer before a workflow becomes routine. This post is not legal advice.
The EDPB's Guidelines 01/2025 on pseudonymisation are still the consultation text of 17 January 2025. That consultation has closed, and no later final text has replaced it. On 8 July 2026 the Board adopted anonymisation guidelines that discuss C-413/23 P, and opened them for comment until 30 October 2026. They test whether a dataset is anonymous. They are not a manual for redacting a contract.
Professional secrecy sits on top of the GDPR for some readers. In May 2025 the Polish National Chamber of Attorneys-at-Law (KIRP) published recommendations on AI for radcowie prawni. They are not binding, and they are written for that profession, not for every lawyer. They stress professional secrecy, data protection, checking what a tool does with the input, and keeping a person in charge of the output. Doctors and banks carry secrecy duties of the same kind.
The AI Act leaves the GDPR in place. Article 4 has applied since 2 February 2025. Since 27 July 2026, Regulation (EU) 2026/1744 requires measures that support AI literacy. The earlier "sufficient level" wording was replaced: the duty does not guarantee a level for any person, and it is not a certificate. An approved way to handle client documents is one practical measure. Employment uses are covered separately in what you can and cannot automate in HR.
Pseudonymization or anonymization
The model needs the text and a way to tell people apart. It does not need the real name. Indexed placeholders and realistic stand-ins are pseudonymization: a key file puts the originals back. Labels and black boxes cannot.
| Output | Looks like | Use it when |
|---|---|---|
| Indexed placeholders (default) | [PERSON_NAME_1] | You give the file to a model and may want to map the answer back. |
| Realistic pseudonyms | Maria Zielińska | The prose has to read naturally: a translation, a demo, test data. |
| Labels | [PERSON_NAME] | It does not matter who is who. |
| Black boxes | a black bar | You publish or disclose the document. This cannot be reversed. |
[PERSON_NAME_1] is the same person on later pages and across the collection, so a summary can still say that person 1 signed and person 2 witnessed. A bare [NAME], or [PERSON_NAME] with no number, collapses the claimant and the witness into one label. Keep the key file out of the chat. It is the list of originals.
A black box is not a redaction
A black rectangle over a name is a picture of a redaction. Copy the page and the name is often still there. Leaving the text under a drawn box failed a direct check: 81 of 82 mentions could still be copied out. SquadBear Redact removes the glyphs, writes the replacement into the page, then reads the export back and looks for the original strings.
Word files leak where a highlighter never looks: comments and their authors, tracked insertions and deletions, headers, footers, footnotes, text boxes, and document properties. The Word export rewrites those parts, and the same read-back check runs on the file you are about to send.
The export keeps the original file name, so client-claim.pdf still discloses something when the pages are clean. Metadata inside an embedded photograph stays unless you redact that object or use the rasterized export, which drops it. In the boxed and replacement PDF styles a hidden layer becomes visible. Read the export report before you send the file.
A workflow you can approve
- Open redact.squadbear.com or run the app locally, and drop in the PDF, Word, text or Markdown files. Detection runs in the browser.
- Read the highlights. Mark anything missed: select the text, search, or draw a box over a signature, a stamp or a photograph.
- Export. Tick plain-text copies if you want to paste into a chat instead of attaching a file.
- Give the exported files to the model. The same files work for Gemini, Copilot and a local model.
- If you need to map the answer back, export the key file, give it a passphrase, and store it apart from the export. Never give it to the model.
The same steps apply before a coding agent reads a repository, before documents go into a search index, and before a training or evaluation set is built. Placeholders stay consistent across the collection, so a question that spans three contracts still knows which party is which. Summaries, translations, contract review and extraction are the everyday cases.
Nothing to trust except the browser
Open the network panel while a file is processed. The page talks to its own origin and does not upload the document. Remote loading of the model is switched off. The model is bardsai/eu-pii-anonimization-multilang-v3 from bards.ai, Apache-2.0, about 309 MB, served from the site you opened (or downloaded by pnpm run fetch-model if you run it yourself). The default path is WebGPU, with a WebAssembly fallback.
The code is Apache-2.0 at github.com/squadbear/Redact. There is no installer and no server of yours to patch. Microsoft Presidio is a library you run in your own process, which suits a pipeline you already operate. This is a page. A static build can sit behind nginx, Caddy or Cloudflare so the files stay on a machine you control. Deployment notes are in the repository.
What it will not do
Detection was measured on made-up documents. Real files are harder, and context can still identify someone: the only pharmacist in a small town does not need a name on the page. Read the highlights, reject the wrong ones, and add what the detector missed.
Scanned pages have no text layer and are not analysed. The viewer flags them, and export can black them out. An incognito session (/?incognito) keeps the work in tab memory and blacks scanned pages out by default. A normal session stores the originals in the browser, so treat that profile as holding the documents.
Health phrases and criminal-record phrases are only suggested. Accept them on the review tab if you want them masked. Dates, amounts of money and job titles stay off unless you turn them on. In the current build a document stops at 500 pages, a PDF at 200 MB and a Word file at 100 MB, because the file has to sit in the browser. Those are engineering caps, not a promise about quality.
The key file contains the original personal data. With a passphrase it is encrypted with PBKDF2-SHA256 at 600,000 iterations and AES-GCM-256. Store it apart from the export. This is not a compliance certificate, and it is not legal advice. The limits are in the privacy notes.
Try it on a file you invented
Make a one-page invoice with names you made up, or take a public judgment and treat it as a drill. Open redact.squadbear.com, export, and read what came out before you try a real file. The source is at github.com/squadbear/Redact. A star helps, and so does a pull request when a pattern is missed. If you report a miss, use a made-up document. Never attach a real one to an issue.
FAQ
Is it safe to put client data into ChatGPT?
Not as a habit. The paste discloses personal data to the provider, often from a personal account. Remove what the model does not need, check the export, and keep the key file to yourself. Ask your data protection officer before that becomes routine. A smaller disclosure is still a disclosure.
Is pseudonymised data still personal data?
For the organization that holds the key, yes. It can put the names back, so the GDPR still applies, including the duty to say who receives the data. For a recipient with no means reasonably likely to re-identify anyone, C-413/23 P holds that the data may not be personal data in that recipient's hands. A file name or one unusual fact can still point at a person. The fair claim is that the risk is greatly reduced. "GDPR-free" is not.
How do I redact a PDF properly?
Remove the text. Do not paint over it, and then check the file you are about to send. Copy from the exported page. Open the properties. If it is a Word file, look in comments, tracked changes, headers and footers. Then read the page as a person would. A sentence can identify someone after every name is gone.




