hiddentokens

Hidden Tokens / Blog

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.

Hidden Tokens team · · 3 min read

Short answer
  • 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

What hides in an Excel workbook

A method you can repeat

  1. Work on a copy. Never redact the original.
  2. 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.
  3. Unhide everything in Excel. Check for hidden sheets, rows and columns, and refresh or delete pivot tables you do not need.
  4. 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.
  5. Replace with consistent codes, not black boxes. Use one code per entity across the whole case: NOM-001 for Sarah everywhere, SOC-001 for her company. Keep the list linking codes to real values in a separate, protected place, never in the file you send.
  6. 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.
  7. 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").
  8. Verify. Search the redacted copy for each real value on your list. Then rename the file.
  9. 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.