How to anonymize a Word document before sharing it
A Word file keeps tracked changes, comments, properties and embedded data. Clean it step by step, replace names with labels, then check the final PDF.
To anonymize a Word document, work on a copy: clear tracked changes and comments, run the Document Inspector, and replace names with neutral labels everywhere, headers and embedded objects included. Then export a PDF and test that file before you send it.
Say an HR team must send a report about Jane Example, an employee, to an outside consultant. The consultant needs the facts, not the name. In a Word file, deleting the name from the page is rarely enough.
Why is deleting names not enough in a Word file?
A .docx file stores more than the page shows. According to Microsoft, Word documents can hold comments, revision marks from tracked changes, versions, document properties such as the author and the last person who saved the file, headers, footers, watermarks and hidden text.
| Place | What can leak | How to clean it |
|---|---|---|
| Tracked changes | Deleted words, reviewers' names | Accept or reject every change |
| Comments | Remarks and their authors | Delete all comments |
| Properties | Author, last saved by, title | Document Inspector |
| Hidden or white text | Words you cannot see on screen | Inspector, plus a search by font colour |
| Headers and footers | Names, case references | Edit each section by hand |
| Embedded objects | Data in a spreadsheet or chart | Keep a picture, delete the object |
How do you remove tracked changes and comments in Word?
- 1Save the document under a new name and clean only the copy.
- 2On the Review tab, switch off Track Changes, or each name you delete is kept as a tracked deletion.
- 3Open the Accept menu and choose Accept All Changes, or use Accept and Reject one by one.
- 4Click the arrow next to Delete and choose Delete All Comments in Document.
Microsoft is clear: to remove tracked changes, you must accept or reject them. Accepting keeps the edited text. Rejecting restores the earlier text, which may still contain a name. The Lower Saxony data protection authority (Germany) also warns against redacting in track-changes mode, where older versions can be reconstructed.
How do you use the Document Inspector in Word?
- 1In your copy (Word for Windows), go to File, then Info.
- 2Select Check for Issues, then Inspect Document.
- 3Tick all the boxes and select Inspect.
- 4Select Remove All for each type you want gone, then Reinspect and save.
Microsoft advises running it on a copy, because removed data cannot always be restored, even with Undo. It cannot detect white text on a white background, or objects covered by other objects. The ICO (UK) adds that such tools may miss things, so you should still check the file yourself.
Two more cautions. The headers and footers option removes the information they hold, not only the names, so edit them by hand if you need to keep a header. And Microsoft Learn lists an Embedded documents check: if it flags an object, handle it as shown in the next section.
Where else can names hide in a Word document?
- Headers and footers in every section: Microsoft notes that each section can have its own.
- Footnotes, endnotes, text boxes, tables and captions.
- Hyperlinks, whose address can contain a name the text does not show.
- Pictures, such as a scanned signature: Word's search cannot read them.
Embedded spreadsheets need extra care. Microsoft explains that an embedded object becomes part of the Word file, and that double-clicking embedded worksheet cells opens them in Excel. Your recipient can do the same. The ICO suggests keeping only a picture of the object, for example with Paste Special, and deleting the object itself.
How do you replace names with a consistent label?
The ICO suggests marking removed text with something like [redacted]; the Lower Saxony authority suggests XXX. When the reader must follow who did what, use consistent labels instead: Jane Example becomes Employee A everywhere, and her manager becomes Manager B.
- 1List every name, place and number to remove, with all variants: Jane, Ms Example, J. Example, initials, jane.example@example.com.
- 2Give each entry one label, and keep that list out of the shared file.
- 3Replace the longest forms first, Jane Example before Example, so no half-names remain.
- 4Use Replace on the Home tab. Microsoft advises Replace rather than Replace All, so you review each item.
- 5Search again for each surname and fragment until nothing is found.
Consistent labels are pseudonymisation, not anonymisation. The ICO (UK) says pseudonymised data remains personal data for whoever holds the additional information, here your list. Keep it separate and secure. Context counts too: Employee A, the only night nurse in a small clinic, is easy to spot.
Why is exporting to PDF not enough on its own?
A PDF carries over what the Word file still contains. The ICO says converting a Word document to PDF can remove some metadata and hidden information, but is not a completely secure redaction method on its own. Text under a black shape stays in the file.
Word's PDF options matter too. According to Microsoft, the PDF includes tracked changes if you choose Document showing markup, and document properties if that box is ticked. So export only after cleaning, with Document selected and properties unticked. The Saxony data protection authority (Germany) then recommends sharing the PDF rather than the .docx.
For the strongest result, flatten the pages into images, as the ICO describes. ONYRI Sanitize, for example, lays a .docx out as A4 pages in your browser, without uploading it, and exports a PDF made of images. The trade-off: the text can no longer be searched or copied, and automatic detection misses things, so review every page.
How do you check the final file before sending it?
- 1Open the file you will send, not the Word original.
- 2Select all, copy, paste into a text editor, and search for each name and fragment.
- 3Check the PDF's properties and its file name: report-jane-example.pdf gives her away.
- 4Compare the file size with what you expect, as the ICO suggests.
- 5Ask a colleague to review it, as the ICO suggests.
The Lower Saxony authority (Germany) calls redaction a technical and organisational measure under Article 32 of the GDPR (EU) that serves data minimisation, Article 5(1)(c). But removing names only reduces exposure. If a reader can still work out who Employee A is, the file still holds personal data.
Frequently asked questions
- Can I just highlight names in black in Word?
- No. The text stays in the file and can be copied. The ICO (UK) and the Lower Saxony authority (Germany) both list colour changes as ineffective. Delete or replace the text itself.
- Does saving under a new name remove the metadata?
- No. The Saxony data protection authority (Germany) says a new name alone does not remove an Office file's metadata. Use the Document Inspector, then check the final file.
- Can I send the cleaned .docx instead of a PDF?
- If the recipient must edit it, the Saxony authority suggests copying the already anonymized text into a new document and sending that one. Inspect the new file too.
- Does the Document Inspector remove tracked changes?
- Microsoft lists revision marks from tracked changes among the items it finds and removes. Review them yourself first with Accept and Reject, so you decide what the final text says.
Sources & references
- Remove hidden data and personal information by inspecting documents, presentations, or workbooks — Microsoft Support
- Using the Document Inspector (built-in modules) — Microsoft Learn
- Accept or reject tracked changes in Word — Microsoft Support
- Insert, delete, or change a comment — Microsoft Support
- Configure headers and footers for different sections of a Word document — Microsoft Support
- Linked objects and embedded objects — Microsoft Support
- Find and replace text in Word — Microsoft Support
- Save or convert to PDF or XPS in Office desktop apps — Microsoft Support
- How do we avoid an accidental breach when redacting information? (published 31 July 2025) — Information Commissioner's Office (ICO, UK)
- How do we avoid an accidental breach when personal information is hidden in documents? (published 31 July 2025) — Information Commissioner's Office (ICO, UK)
- Pseudonymisation (anonymisation and pseudonymisation guidance) — Information Commissioner's Office (ICO, UK)
- Hinweise zum Schwärzen von Dokumenten (July 2025, in German) — Der Landesbeauftragte für den Datenschutz Niedersachsen
- Datenschutzkonformes Schwärzen: Darauf sollten Sie achten! (30 August 2024, in German) — Sächsische Datenschutz- und Transparenzbeauftragte
Mask a document without uploading it
ONYRI Sanitize finds names, identifiers, bank details and secrets in a PDF, a Word file or a scan, and masks them in your browser. You check the preview, then download a flattened copy.