Masking personal data before using AI
Pasting a document into an AI assistant is now an everyday way to summarise it, translate it or draft a reply. Whatever you paste is sent to the assistant's service, names and numbers included. Masking replaces those details with placeholders before the text leaves your device, and puts them back into the answer afterwards. This guide explains the idea, a practical workflow, and its limits.
Why mask before you paste
An AI assistant runs on its provider's servers, so the text you give it is sent there and processed there. How long a conversation is kept, whether staff can review it, and whether it may be used to train future models depend on the provider, the plan and your settings, and those terms change. A conversation can also be shared by link, synced to other devices, or seen by others with access to the account.
Many workplaces therefore have rules about what may go into an assistant: often no customer data, no personal numbers, nothing confidential. Masking lets you follow such a rule and still get help with the document, because most tasks do not need the real values. A summary of a complaint does not depend on the customer's phone number; a translation of a contract does not depend on the account number in it.
Placeholders instead of deletions
Simply deleting personal details breaks the text: the assistant can no longer tell who wrote to whom, or which of two numbers is which. Masking replaces each value with a placeholder that keeps that structure. On this site a placeholder is a kind in capital letters with a number, in square brackets: [PERSON_1], [PHONE_1], [EMAIL_2].
The same value always gets the same placeholder, across every file of one run, so the assistant can follow that [PERSON_1] in the first paragraph is the same person as in the last. Square brackets were chosen because assistants tend to keep them unchanged in their answers.
Once the answer comes back, the placeholders are swapped back for the real values using a mapping: a list of each placeholder and the value it stands for. The assistant never sees that mapping.
How masking works on this site
Mask Text for AI takes pasted text or Word, Excel, PowerPoint, PDF, Markdown and text files, and suggests what to mask:
- Numbers with a fixed form, each checked where possible: payment card numbers, My Numbers, national ID numbers of China, Taiwan and Korea, IBANs, US Social Security numbers, phone numbers and email addresses.
- Numbers that only make sense in context, such as postcodes and bank account or passport numbers, right after a word that names them.
- The names of people, companies and projects that you type in, one per line. Names have no fixed form, so they are not guessed automatically.
You review the suggestions, untick anything that should stay, and copy or download the masked text. The mapping exists only on the page while it is open. It is not stored in the browser or sent anywhere, so save it as a file if you will restore an answer later, and keep that file as carefully as the original document: it holds exactly the information you masked.
To restore, paste the assistant's answer back into the page. Placeholders that the assistant changed slightly, such as with full-width brackets, lower case or bold, are still recognised. All of this, the detection and the mapping included, runs in your browser; Why in-browser file processing is safer explains why that matters for a tool whose job is handling sensitive text.
A workflow for documents
For several documents at once, the order that works well is to convert, then mask, then paste:
- Turn the files into text an assistant reads well. Combine Files into Markdown joins Word, Excel, PowerPoint and PDF files into one Markdown file with a contents list and an estimated token count; Word to Markdown and its Excel and PowerPoint counterparts convert a single file.
- A scanned PDF has no text to mask. Run it through OCR PDF first so the text can be read.
- Mask the result in Mask Text for AI, add the names that matter, and read the masked text once before sending it.
- Paste the masked text into the assistant, then bring the answer back to restore the values.
Pictures are a separate case. Masking works on text, so a screenshot or a scanned form still shows everything. Use Redact Image or Redact PDF to black out what the picture shows before you attach it.
What masking does not solve
Masking removes identifiers, not meaning. A text can identify someone without a single name: a job title in a small company, a rare illness, a date and a place together. If the context alone would tell the reader who is meant, mask or rewrite those parts as well, or leave the document out.
Detection is a set of suggestions, not a guarantee. A number written in an unusual way, a name you did not list, or text inside a picture will not be found. Read the masked text before you send it.
And masking does not change the rules that apply to you. If your organisation forbids certain documents from going into an assistant at all, a masked version may still be covered. Masking is a way to share less, not permission to share everything.
Frequently asked questions
Is masked text anonymous?
Not necessarily. Masking replaces the identifiers it finds and the names you list, but the remaining context, such as a job title, a date or a rare circumstance, can still point to a person. Treat masked text as reduced, not as anonymous.
Can the AI assistant work out the real values from the placeholders?
Not from the placeholders themselves: they carry only a kind and a number, and the mapping never leaves the page. It could only guess from the rest of the text, which is why context that identifies someone should be masked or removed too.
Does the tool find people's names automatically?
No. Names have no fixed form, so guessing them would miss many and flag ordinary words. Type the names of people, companies and projects in the boxes, one per line, and every occurrence is replaced.
Tools in this guide
- Mask Text for AIReplace names and numbers with placeholders before giving a text to AI, then restore the answer.
- Combine Files into MarkdownCombine several files into one Markdown file to give to AI, with a token estimate.
- Word to MarkdownConvert .docx files to Markdown one by one, pictures included.
- OCR PDFCopy the text in scanned PDFs.