Skip to content
HNarzędzia
en
Categories

Anonymize a document for ChatGPT - hide personal data, then restore it in the reply

Before you paste a contract or letter into ChatGPT, Claude or Gemini, swap the personal data for placeholders. The same detail always gets the same placeholder, so the AI can tell the parties apart, and one paste puts the real data back into its reply. The document never leaves your device.

  • Free
  • No sign-up
  • Private
  • Runs locally

1. Document

Drag & drop files here

or click to choose from your device

PDF with text, Word (.docx), TXT, Markdown or CSV, up to 50 MB

You can also paste text or edit it here. Detection updates automatically.

The text, detection and mapping stay in this browser tab. Nothing is sent to a server.

2. What to detect

Data types

One phrase per line, such as a company name, street or a surname the tool missed. Case and accents do not matter.

One pattern per line, for example CL-\d{6} for a client number. Matching ignores case.

Select text in the preview or in the text box and add it to your phrases. Every occurrence will be hidden.

5. Restore the data in the AI reply

The mapping table exists only in this tab’s memory; it is not saved in the browser. After you refresh or close the tab, you can restore data only from a downloaded .csv file.

Placeholders are recognised without brackets too, with a space instead of the underscore and in any letter case.

Results are for information only and are not legal, tax or financial advice.

How to anonymize a document before sending it to AI

  1. 1.

    Load the document

    Drop a PDF with a text layer, a Word file (.docx), TXT or Markdown. You can also paste text into the "Document text" box.

  2. 2.

    Review what was found

    The list groups the details by type and the preview highlights them in the text. Untick anything that should stay and add your own phrases, such as a company name. To add a fragment, select it in the preview and click "Add selected text".

  3. 3.

    Copy the text with placeholders

    Choose placeholders such as [PERSON_1] and [EMAIL_1], or the [REDACTED] mask. Copy the result into the AI chat or download it as .txt or .md.

  4. 4.

    Restore the data in the reply

    Paste the AI reply into "Paste the AI reply". The placeholders turn back into names, numbers and addresses. If you plan to close the tab, download the mapping table first.

What the tool detects

Detection uses patterns and checksums, and a dictionary plus a few rules for names. It was built for Polish documents, so it also knows Polish ID numbers:

  • Emails and phone numbers: international numbers with a + prefix and Polish numbers in digit groups. Amounts followed by a currency are not treated as phone numbers.
  • Bank accounts: IBANs from EU countries and Polish 26-digit account numbers, checked with the mod 97 checksum. Payment cards are checked with the Luhn algorithm.
  • Names: a first name from the dictionary followed by a capitalised word ("John Smith"), a name after "Mr", "Mrs", "Ms" or "Dr", and the Polish forms "Pan", "Pani" and "Sz.P.". Once a surname is found, it is hidden everywhere in the text, including Polish inflected forms.
  • Dates of birth after "born", "date of birth" or "DOB", and the Polish "ur." or "data urodzenia". Other dates stay in the text.
  • Polish addresses ("ul.", "al.", "pl.", "os." with a number, postcode with town) and Polish identifiers: PESEL, NIP, REGON, ID card and passport numbers, each with its checksum.

The first-name dictionary holds the 1,000 most common male and 1,000 most common female first names from the Polish PESEL register. It includes many international names such as John, Michael, Sarah and Elizabeth, but rarer English names may be missing.

What it can miss

Automatic detection does not replace reading the text yourself. These are the usual gaps:

  • first names missing from the dictionary, and surnames that never appear next to a first name or a title,
  • details written in lowercase, with typos, or in words ("born on the fifth of May"),
  • street addresses outside Poland, such as "12 Baker Street, London",
  • details that identify someone indirectly: a job title, a small company name, a case number or a description of an event.

Add anything missing as your own phrases. Every occurrence is hidden, whatever the letter case or accents. For numbers with a fixed format, such as a client number, add a regular expression. Patterns that could run for a very long time are rejected or stopped.

The PDF needs a text layer. Run a scan through OCR PDF first. In PDFs with columns or tables the reading order can get mixed up, so check the preview.

Placeholders or mask

Placeholders turn the details into labels: "Tenant [PERSON_2], email [EMAIL_1], address [ADDRESS_1]". The same person always gets the same label, even when the text uses a different form, so the AI can summarise a contract or draft a letter without mixing up the parties. The "Ask the AI to keep the placeholders" option adds a sentence at the top asking the AI not to change them.

Mask puts "[REDACTED]" everywhere. Use it when the task does not need the details and you will not restore them, for example when you only want the style improved.

How to restore the data in the AI reply

Paste the reply into the last box. Placeholders are recognised even if the AI changes them: drops the brackets ("PERSON_1"), changes the letter case or puts a space instead of the underscore ("[Person 1]"). Placeholders that are not in the table show up in a warning.

The mapping table (placeholder to original) exists only in the memory of the open tab. It is not saved in the browser, so it disappears when you refresh the page. For a longer conversation, download the table as a .csv file and load it later with "Load table". The file holds the real personal data, so keep it as safe as the original document and never paste it into the chat.

Pseudonymisation is not anonymisation under the GDPR

The GDPR treats these differently. Pseudonymisation (Article 4(5)) means the data can no longer be linked to a specific person without additional information that is kept separately. Recital 26 says that pseudonymised data which can be linked to a person with that additional information is still personal data. Data protection rules stop applying only to anonymous information, from which a person cannot be identified by means reasonably likely to be used (GDPR text on EUR-Lex).

Text with placeholders plus a mapping table is therefore pseudonymisation: with the table, you still know who [PERSON_1] is. The rest of the document can also give a person away. The tool reduces how much personal data reaches the AI service, but it does not decide whether you are allowed to use that service. Your employer's AI policy, client agreements and your data protection officer come first. For health data and other special categories, ask the data protection officer before you send anything.

When you need a PDF, not text

This tool gives you text to paste. If you have to send the document itself with the data hidden, use Redact PDF. It turns pages with marks into images, so no text can be copied from under the black boxes. With a PDF loaded here, you can copy the details found and paste them into Redact PDF as search phrases. To extract the plain text of a PDF without hiding anything, use PDF to Text.

Frequently asked questions

Is it safe to upload a contract to ChatGPT?

+
It depends on what the contract contains, your organisation's rules and the AI service's settings. Personal data you paste into a chat is processed by the provider of that service. If you work with client or employer documents, check the internal AI policy first. Where sending is allowed, replace the personal data with placeholders, send only the part you need and restore the data in the reply on your own device.

How do I remove personal information from a PDF?

+
To paste the text into an AI tool, load the PDF here: the tool reads the text and replaces personal data with placeholders. To send the PDF file itself, use Redact PDF, which burns black boxes into the page image. A black box drawn in a PDF editor usually leaves the text underneath, where it can still be copied.

What is the difference between anonymisation and pseudonymisation?

+
After anonymisation nobody can tell who the data is about, and the GDPR no longer applies. After pseudonymisation the data can still be linked to a person with extra information kept separately, here the mapping table, so it remains personal data (GDPR Article 4(5) and Recital 26). Placeholder mode is pseudonymisation. Mask mode removes the details without a table, but the rest of the text may still point to a person.

Is the document or the mapping table uploaded anywhere?

+
No. Reading the file, detecting the data and restoring it all happen in your browser. The first-name dictionary loads from the same server as the page. The mapping table lives only in the tab's memory and is gone when you close it, unless you download it.

What if the AI changes or drops a placeholder?

+
Small changes are fine: "PERSON_1", "[person 1]" and "PERSON-1" are all recognised. Placeholders that are not in the table, such as an invented [PERSON_9], stay in the text and appear in a warning. If the AI rewrites a placeholder as its own word, fix that spot by hand.

Does it work with a scanned document?

+
Not directly. A scan contains a picture of the page, not text. Run OCR PDF first, then load the result here. Check numbers carefully after OCR, because character recognition can mix up digits.

Guides using this tool

Updated: