Home › Blog › Pseudonymize for AI

Pseudonymize a document for AI, then put the real names back into the answer

To pseudonymize a document before ChatGPT, replace names, organizations and contact details with stable placeholders such as [PERSONNE_1]. Keep the mapping table on your computer, ask the AI to keep the placeholders, then put the real names back into its answer.

Published · Updated · 11 min read

Pseudonymize, anonymize, redact: what is the difference?

Pseudonymizing means replacing what identifies a person with a substitute, while keeping elsewhere the means to trace back to them. Under the GDPR (Article 4(5)), the data can then no longer be attributed to a specific person “without the use of additional information”, which must be “kept separately” and protected: here, the mapping table. The CNIL (the French data protection authority) adds that the operation “is also reversible, unlike anonymization”, and that the data “therefore remains personal data” (our translation). A pseudonymized copy is still subject to the GDPR.

Anonymizing means removing that way back: for the CNIL, making any identification impossible in practice, “by any means whatsoever and irreversibly” (our translation). No more table, so no more real names to put back into an answer.

Redacting means removing a passage without replacing it: it disappears from the copy or leaves a black block. Done properly, the text is deleted from the file, not covered (see redacting a PDF properly). The AI loses the information, and nothing allows it to be restored.

To get the names back after the AI, you therefore need to pseudonymize. The full comparison is in anonymization vs. pseudonymization: the difference under the GDPR.

Why use stable placeholders for AI?

Replacing every name with “XXX” protects people, but the AI no longer knows who ordered, who promised, who has to pay. A numbered, typed placeholder keeps these relationships: [PERSONNE_1] remains a person, [ORGANISATION_2] a company, each with its role from one sentence to the next. The AI can reason about who does what without knowing who is who.

The rule: the same person keeps the same placeholder in every document in the file. If Élise Garnier becomes [PERSONNE_1] in an email and [PERSONNE_3] in the contract, the AI reads two people. Variants follow the same rule: “Garnier”, “E. Garnier” and “GARNIER” must all become [PERSONNE_1].

A placeholder can also carry a role: [PERSONNE_CLIENTE] or [ORGANISATION_FOURNISSEUR] help the AI follow the file. Do not put initials or part of a name in it: the placeholder leaves with the copy. In AnonymFiles, placeholders are stable across the whole file; when a short name and a full name seem to refer to the same person, the app offers to merge their placeholders, and one click renames one. What to replace before sending is detailed in anonymize a document before sending it to ChatGPT.

What is reversible pseudonymization? The table stays with you

The mapping table links each placeholder to its real value: [PERSONNE_1] = Élise Garnier. It is what makes pseudonymization reversible, and it is as sensitive as the originals: it gathers all the names.

In AnonymFiles, the table stays in the app’s private space, on the computer, and is never included in the export. It is encrypted at rest (AES-256-GCM, with the key protected by the system keychain in the packaged app); also turn on disk encryption (FileVault on a Mac, BitLocker on Windows). Deleting the workspace also deletes the table, and re-injection then becomes impossible. See where your data stays and what the app does not send.

How do you pseudonymize a document by hand?

For a short document, a word processor (Find and Replace) and a mapping table kept separately are enough.

  1. Work on a copy, never on the original.
  2. Fill in the table before replacing: one row per person, company, address, email address, phone number or number, with its placeholder and all its spellings (initials, capitals, name without accents).
  3. Replace the longest form first: “Élise Garnier” before “Garnier”. In the reverse order, you get “Élise [PERSONNE_1]”, and the first name stays visible.
  4. Search for each name one last time, then review headers, footers, notes and signatures. The pitfalls specific to Word are in anonymize a Word document without putting it online.
  5. On the way back, do the reverse: replace each placeholder in the answer with its value, searching for it with its brackets. Without brackets, “PERSONNE_1” also catches [PERSONNE_10].

On a whole file, three limits appear: variants (a spelling missing from the table leaves a name visible), oversights (a signature, an email address that contains the name) and re-injection (dozens of placeholders to replace one by one). And a placeholder altered by the AI, such as “Personne 1”, slips past the search without warning.

AnonymFiles, French document anonymization software (see our comparison of anonymization software), is a desktop app coming soon for Apple silicon Macs and Windows. It does this work on an entire folder of text or scanned PDFs, Word .docx files, emails, spreadsheets, presentations, images, .txt and .md files. It detects names of people, organizations, addresses, email addresses, French-format phone numbers, IBANs from nine European countries, private dates and ID numbers, and replaces them with stable placeholders. The copy of a Word document is a redacted .docx that keeps its layout; scans are read by local OCR. On a Mac, the models are included, with no connection at all; on Windows, they are downloaded once, at the first processing run, without any document text.

Which instruction keeps ChatGPT from changing the placeholders?

Without an instruction, nothing forces the AI to keep [PERSONNE_1] intact. Paste an instruction at the start of the conversation, before the documents. For example:

The names, organizations, contact details and dates in this file have been replaced with placeholders in brackets, such as [PERSONNE_1]. Keep each placeholder exactly as is (brackets, capitals, underscore) and reuse it for the same person. Do not translate it, renumber it or invent new ones, and do not try to work out who it refers to. Copy the [DOSSIER_…] reference on its own, on the first line of your answer.

The reference avoids mixing up tables: from one file to another, [PERSONNE_1] does not refer to the same person. If you work by hand, make one up that says nothing about the client. Whether the instruction is followed depends on the tool: check the answer.

After the export, AnonymFiles provides a ready-made instruction: the “Copier la consigne IA” (copy the AI instruction) button copies the instructions to paste into the conversation, with the export reference, in the form [DOSSIER_…]. Examples of requests in a law firm are in ChatGPT and lawyers’ professional secrecy.

How do you put the real names back into ChatGPT’s answer?

To put the real names back into ChatGPT’s answer, replace each placeholder in the answer with the matching value from your table, on your computer: this is re-injection. That is the whole point of pseudonymization: the AI worked on placeholders, and you get back a text with the real names, which it never saw.

In AnonymFiles, “Réinjecter un résultat” (re-inject a result) accepts the AI’s answer pasted as is, or a .txt or .md file. The [DOSSIER_…] reference finds the right export’s table, even after a restart, without reopening the original folder. A preview shows the text with the real names; you then save it to a new file, on the computer. The replacement uses no model and no connection.

The limits to know:

The full process is described in how AnonymFiles puts the real names back, step by step.

A full example, from the original to the answer

A fictitious two-document file, to prepare a formal notice; everything in it is made up.

1. The original

Document 1, meeting note. Client: Élise Garnier, manager of Atelier Boréal. On March 3, 2026, Atelier Boréal ordered two display cases from Menuiserie des Quais (order no. BC2611). Its manager, Julien Roussel, was to deliver them on April 30. Nothing has arrived.
Document 2, supplier’s email. Dear Ms. Garnier, your display cases will ship within two weeks. Julien Roussel, Menuiserie des Quais.

2. The pseudonymized copy

Document 1, meeting note. Client: [PERSONNE_1], manager of [ORGANISATION_1]. On [DATE_1], [ORGANISATION_1] ordered two display cases from [ORGANISATION_2] (order no. [IDENTIFIANT_1]). Its manager, [PERSONNE_2], was to deliver them on [DATE_2]. Nothing has arrived.
Document 2, supplier’s email. Dear Ms. [PERSONNE_1], your display cases will ship within two weeks. [PERSONNE_2], [ORGANISATION_2].

“Garnier” alone received the placeholder of “Élise Garnier”: the AI knows that the client and the recipient of the email are one and the same. The order number is masked: it would link the copy to a specific file at the supplier.

3. The request to the AI

After the instruction and the two documents:

Draft a formal notice to deliver, from [ORGANISATION_1] to [ORGANISATION_2], based on these documents. Firm and courteous tone, eight-day deadline, half a page at most.

4. The AI’s answer

[DOSSIER_…]
Dear Mr. [PERSONNE_2],
On [DATE_1], [ORGANISATION_1] ordered two display cases from [ORGANISATION_2] (order no. [IDENTIFIANT_1]), to be delivered on [DATE_2]. Nothing has been delivered. We hereby give you formal notice to deliver them within eight days.
[PERSONNE_1], manager, on behalf of a [ORGANISATION_1] team

5. After re-injection

Dear Mr. Julien Roussel,
On March 3, 2026, Atelier Boréal ordered two display cases from Menuiserie des Quais (order no. BC2611), to be delivered on April 30. Nothing has been delivered. We hereby give you formal notice to deliver them within eight days.
Élise Garnier, manager, on behalf of a Atelier Boréal team

The [DOSSIER_…] line was used to find the table, then disappeared from the result. All the placeholders came back, order number included. What remains is to correct “a Atelier Boréal team” to “an Atelier Boréal team”, and to check that the AI mixed up neither the people nor the companies: re-injection does not check that.

Are placeholders enough? Indirect re-identification

A placeholder hides a name, not a context. The GDPR treats as identifiable a person who can be identified “directly or indirectly” (Article 4(1)). And for the CNIL, even after pseudonymization, it is “very often possible to recover the identity” of the people through third-party data (our translation).

Before sending, look for what points to the matter without naming it:

Review the copy as someone who knows the matter would: if they recognize it, mask what gives it away. In AnonymFiles, each document is reviewed side by side with the original, and a selected passage is masked in one click for the whole file, amounts included: they are not detected automatically. No detection is perfect, and nothing is exported without your approval. The details to watch are listed for law firms (court docket number, hearing date) and notary offices (land registry reference, lot number).

Frequently asked questions

What is the difference between pseudonymizing and anonymizing a document?

Pseudonymizing replaces names and contact details with placeholders while keeping a table to trace back to the people: it is reversible, and the data remains personal data. Anonymizing aims to make any identification impossible, irreversibly: no real name can ever come back into an AI’s answer.

How do you put the real names back into ChatGPT’s answer?

Replace each placeholder in the answer, such as [PERSONNE_1], with the matching value from your mapping table, on your computer, searching for the placeholder with its brackets. AnonymFiles does it in one go: paste the AI’s answer or import it as .txt or .md, the case file reference finds the right table, and the result is saved as text, Word or PDF, with no model and no connection.

What is reversible pseudonymization?

It is pseudonymization that keeps a way back to the people: each placeholder matches a real value in a table kept separately. It lets you give an AI a copy without names, then put the real names back into its answer. The data remains personal data under the GDPR, and the table must be protected like the original.

Which tool can pseudonymize a whole case file before AI?

For a short document, a word processor and a mapping table are enough. For a whole case file, local software avoids missed variants and manual re-injection: AnonymFiles gives the same person the same placeholder in every document (PDFs, scans, Word, emails, spreadsheets), keeps the encrypted table on the computer and puts the real names back into a text, Word or PDF file.

Is a pseudonymized document still subject to the GDPR?

Yes. According to the CNIL (the French data protection authority), pseudonymized data remains personal data, since tracing back to the person is still possible. Pseudonymization reduces the risk without taking the document outside the scope of the regulation.

How do you ask ChatGPT to keep the placeholders?

Paste an instruction at the start of the conversation: keep each placeholder exactly as is (brackets, capitals, underscore), never invent one, and copy the file reference onto the first line. Then check the answer: whether the instruction is followed depends on the tool.

Where should you keep the mapping table?

On your computer, separate from the copies: never in the conversation or in the folder given to the AI. It gathers all the real names: protect it like the original. Without it, the names cannot be put back.

Can you put the real names back into a Word document or a PDF?

Yes: AnonymFiles restores a tagged Word document or PDF in its layout, and also accepts the AI’s text answer, pasted or imported as .txt or .md. The result is saved to a new text, Word or PDF file.

Can the AI guess who is behind [PERSONNE_1]?

Not from the placeholder alone. But the context can give the person away: a file number, a place, a precise date, a unique position. Hence the review of each copy before sending.