Home › Blog › Can AI anonymize a document?

Can you ask an AI to anonymize a document?

Technically yes, but not to protect the document: for an online AI such as ChatGPT, Copilot or Le Chat to anonymize a text, you first have to send it the text in clear. The names you meant to protect have already left. Two further limits apply: nothing guarantees the AI replaces them all, and the mapping between real names and substitutes stays in the conversation, with the provider. The method that protects works the other way round: anonymize on your computer, review, send only the copy, then put the real names back on your machine.

Published · 9 min read

What happens to a document sent to an AI for anonymization?

It reaches the provider as is; the provider receives it, processes it and keeps it for a while. Asking “replace every name with a pseudonym” changes nothing about what was sent: the instruction runs on the provider’s servers, after the transfer. Under the GDPR, you have disclosed personal data to a third party; under professional secrecy rules, you have handed the file to someone who is not bound by them.

What the provider does next depends on the plan. At OpenAI, according to its help pages as checked on October 20, 2026:

Those commitments concern reuse, not transmission. The CNIL is clear about consumer services: users should never share confidential information such as personal data. The French national bar council (CNB) recommends limiting what you give the tool to the data strictly necessary for the task. A document sent to be anonymized contains, by definition, every piece of data that had to come out. Plan by plan: ChatGPT and GDPR: can you put client data into it?

Does an AI find every name?

Nothing guarantees it. A language model generates text probabilistically; the CNIL notes in its Q&A on generative AI that these systems can produce inaccurate results that nonetheless look plausible. For anonymization, the risk takes several forms:

Then there are indirect identifiers: a unique job title, a date and a place, an amount to the cent. Even perfect name detection does not remove them; review does. More on this: re-identification risk.

Who keeps the mapping between real names and substitutes?

What people usually want from “anonymization” before AI is actually pseudonymization: replace “Claire Vasseur” with [PERSONNE_1] so the AI can work, then put the real name back into its answer. That requires a mapping table. The GDPR requires this “additional information” to be kept separately and protected (Article 4(5)), and the European Data Protection Board (EDPB) states that lookup tables are themselves personal data, since they allow people to be identified, and must be protected against unauthorized access and use (Guidelines 01/2025, paragraph 93).

When the AI does the substitution, that table lives in the conversation, next to the original, with the provider: precisely the party that was not supposed to be able to make the link. And to restore the real names in a later answer, you either send the table back or do the replacements by hand. The whole point of pseudonymization, keeping the key apart from the data, is lost. The principle and good practice: the pseudonymization mapping table.

What about a model installed on your computer?

The question changes, and this is the right direction. A language model running on your machine or on in-house servers sends nothing to a third party. The CNIL considers on-premises solutions generally more appropriate and more secure when client or staff data is involved, and the CNB guide lists, among confidentiality measures, prior anonymization or pseudonymization of the data and installing the model on the firm’s own information systems.

But a local model is still a generative model: the same possible misses, the same inconsistent substitutes, the same rewritten text. You also have to install it, give it a powerful enough machine, convert PDFs and scans to text, and manage the mapping table yourself. It solves sending, not completeness or traceability. Used on its own, it does not spare you a review of every document.

Online AI, local model or local anonymizer: which to choose?

CriterionAsking an online AILocal generative modelDedicated local anonymizer
Does the document leave your computer?Yes, in clearNoNo
CompletenessNot guaranteed, silent missesNot guaranteedNot guaranteed either, hence a mandatory review; fixed rules for emails, phone numbers, IBANs, identifiers
Consistency across documentsUnpredictableUnpredictableSame label for the same person across the whole folder
MappingIn the conversation, with the providerUp to youEncrypted on the computer, automatic restoration
OutputNew, rewritten textNew, rewritten textThe document itself, redacted: PDF or Word with the same layout
Audit trailNoneBuild your ownProcessing report and audit log

The last column describes what AnonymFiles does; other local tools exist, and our comparison of anonymization software reviews them. Generative AI keeps its full role after this step: it is the tool you give the copy to for summarizing, rewording or comparing.

Which method should you use?

  1. Decide what needs to go. To summarize a contract or reword a letter, the AI needs no names: that is the data minimization principle (Article 5(1)(c) GDPR).
  2. Replace identifiers on your computer. Names, organizations, addresses, emails, phone numbers, IBANs, ID numbers, with stable labels rather than made-up names: [PERSONNE_1] is easy to spot and replace without ambiguity.
  3. Review next to the original. Look for indirect identifiers: an amount, a job title, a case reference.
  4. Send the copy, and only the copy. Preferably on a business plan, to limit reuse.
  5. Check the answer. Figures, dates and references need checking.
  6. Put the real names back on your computer. The mapping table never leaves; the final answer, with names, exists only on your side.

An illustrated walkthrough: pseudonymize a document for AI, then restore the real names and anonymize a document before ChatGPT.

How does AnonymFiles do it?

AnonymFiles is a local anonymizer, not an AI assistant: it calls no AI service and sends no document. Detection relies on two detection models running on the computer (OpenAI Privacy Filter and a multilingual named-entity recognition model), backed by rules for emails, phone numbers, IBANs and French identifiers. These models find and classify passages; they do not generate text and do not rewrite the document.

Like any automatic detection, it can miss something: that is why review is mandatory, not optional. To check the offline behavior yourself: detection benchmark and offline test; what the app does on the network: security; uses by profession: use cases.

FAQ

Can ChatGPT or Copilot anonymize a PDF?

They can rewrite its text with names replaced, but only after receiving all of it. The result is new text, not your redacted PDF, and nothing guarantees every name was replaced. To protect the document, anonymize it on your computer before sending it.

Is there a prompt to anonymize a text?

You can write an instruction, but it runs after the transfer, so it does not protect the text you sent. Nor does it make the output complete, since the model remains probabilistic. An instruction only makes sense with a model installed on your own machine, and review is still essential.

Is it acceptable with ChatGPT Business or Enterprise?

These plans add a data processing agreement and no training by default, which limits reuse. They do not change the fact that the document is sent in clear to the provider. For client data or information covered by professional secrecy, data minimization means sending a copy that is already pseudonymized.

Is an AI model installed on the computer enough?

It avoids sending data to a third party, which the CNIL and the CNB recommend. But it is still generative: it can miss a name, switch pseudonyms between pages or rewrite a sentence. You still have to manage the mapping table and review every document.

Does an AI make a document anonymous under the GDPR?

Generally not. Replacing names with pseudonyms is pseudonymization: the data remains personal as long as a table can link it back to people (Recital 26 GDPR). Anonymization means identification is made impossible, irreversibly, which the CNIL assesses against three criteria: singling out, linkability and inference.

Does AnonymFiles use AI to detect data?

It uses two detection models running on the computer, backed by rules. They are not generative models: they find names, organizations and contact details without rewriting the text. No document is sent to an AI service, and every copy is reviewed before export.