How to redact a Word or Excel file before an AI reads it
Redacting a document for an AI is not the same as redacting it for print. The AI reads the whole file, including the parts you never see on screen. Here is what to check, and a method you can repeat.
- An AI reads everything in the file: tracked changes, comments, headers, hidden rows and sheets, pivot caches and document properties, not just what is on screen.
- Run Office's Document Inspector on a copy first, then replace identifiers, including every variant of each name.
- Use consistent codes (NOM-001, SOC-001) rather than black boxes, so the AI can still tell people apart, and keep the list of codes separately.
- In Excel, replacing amounts breaks totals; use consistent placeholder values and put the real figures back afterwards.
- Doing this by hand works for one file. For whole case files, automate it on the computer so nothing leaves before it is coded.
Why redacting for an AI is different
When you print a document or send a PDF to a counterparty, only what is visible matters. An AI receives the file itself. Depending on the tool, it may read text that is invisible on your screen: deleted passages kept by tracked changes, comment threads, hidden rows, a sheet someone hid three versions ago. Anything in the file can end up in the prompt.
What hides in a Word document
- Tracked changes. Deleted text is still in the file until changes are accepted or rejected.
- Comments, often with the reviewer's name and remarks about the client.
- Headers, footers, footnotes and text boxes, which find-and-replace habits often skip.
- Hidden text formatted to be invisible.
- Document properties: author, company, last modified by, sometimes a client reference in the title.
- Embedded objects: a pasted Excel table or an image of a signed letter.
- The file name itself, which often contains the client's name.
What hides in an Excel workbook
- Hidden rows, columns and sheets, including sheets set to "very hidden" that do not appear in the Unhide menu.
- Pivot table caches, which keep a copy of the source data even if the source sheet has been deleted.
- Notes and comments on cells.
- Named ranges and data validation lists that may contain names.
- Chart data and links to other workbooks, whose paths can reveal client folders.
- Amounts: in many files the figures are as sensitive as the names, but replacing them breaks every formula and total.
A method you can repeat
- Work on a copy. Never redact the original.
- Inspect the file. In Word or Excel, use File > Info > Check for Issues > Inspect Document, and remove comments, revisions, hidden content and document properties. Accept or reject all tracked changes first.
- Unhide everything in Excel. Check for hidden sheets, rows and columns, and refresh or delete pivot tables you do not need.
- List every identifier, with its variants. "Sarah Whitfield", "Ms Whitfield", "S. Whitfield", "WHITFIELD", "s.whitfield@atlas-logistics.com" are five strings for one person. Add company numbers, IBANs, addresses, phone numbers and case references.
- Replace with consistent codes, not black boxes. Use one code per entity across the whole case:
NOM-001for Sarah everywhere,SOC-001for her company. Keep the list linking codes to real values in a separate, protected place, never in the file you send. - Handle amounts carefully. Replace them with consistent placeholder values so that totals still add up, and record the mapping so you can restore the real figures.
- Watch for indirect clues. A job title plus an employer plus a date can identify someone without any name. Generalise when needed ("a company in the pharmaceutical sector").
- Verify. Search the redacted copy for each real value on your list. Then rename the file.
- After the AI: replace each code in the AI's output with the real value, on your own computer.
Why black boxes make the AI worse
Replacing every name with "[REDACTED]" protects the data, but the AI can no longer follow who did what. In a dispute with three parties, a memo full of "[REDACTED] claims that [REDACTED] owes [REDACTED]" is useless. Consistent codes keep the structure: the AI can write that NOM-001 claims SOC-002 owes SOC-001 the sum of MNT-001, and the memo is correct once the values are restored. This is the difference between redaction and pseudonymisation.
When to stop doing it by hand
The manual method is fine for an occasional document. It breaks down when a case file has dozens of documents, when several people work on the same client, or when amounts matter. That is the point where tooling pays for itself.
Hidden Tokens automates the whole method on your computer: it codes Word, Excel, PDF and text files within seconds of their landing in a watched folder, keeps one key per case so codes stay consistent, handles amounts with placeholder values, flags indirect identifiers, and puts the real values back into the Word or Excel file the AI produced. The key never leaves your machine. For the bigger picture, see how to use ChatGPT or Claude with client data.
Frequently asked questions
Does drawing a black box over text in a PDF remove it?
No. A rectangle drawn on top of text hides it visually, but the text is still in the file and can be copied or read by an AI. Use a real redaction function that deletes the underlying text, or redact in the source Word or Excel file before exporting.
Does Word's Document Inspector remove client names?
No. It removes hidden material such as comments, tracked changes, hidden text and document properties. Names in the visible body of the document still have to be replaced separately.
Can I just tell the AI to ignore the names?
No. Once the file is sent, the provider has received the names, whatever the AI is told to do with them. Protection has to happen before the file leaves your computer.
How do I get the real names back into the AI's output?
Keep the list of codes and their real values separately, then replace each code in the AI's output. Tools such as Hidden Tokens do this automatically, directly in the Word or Excel file, without the real values ever leaving your computer.