How to Anonymize a Contract Before Sharing: A Redaction Checklist

Share a contract without personal data: what to remove from the text, from Word's hidden layers and from the PDF. A practical checklist with real traps.

Anonymizing a contract means clearing three layers: the visible text (identifiers, names, addresses), the hidden parts of the file (metadata, tracked changes, comments), and the context that still points to a person after the name is gone. A Find and Replace pass only covers part of the first layer. The checklist below is the one I use before a document goes to a client, a vendor, a public forum or an AI tool.

Anonymization or pseudonymization?

The difference matters legally. Under Recital 26 of the GDPR, data protection rules do not apply to anonymous information, meaning data that no longer identifies a person by any means reasonably likely to be used. Replacing "John Smith" with "[PERSON_1]" is usually only pseudonymization: if the text says the person is the CFO of a named company in a small town, they are still identifiable.

The European Data Protection Board adopted draft Guidelines 02/2026 on anonymisation on July 7, 2026. They update the Article 29 Working Party's Opinion 05/2014 and treat anonymity as something that can erode: as datasets become easier to combine, including with AI tools, data that was anonymous can become identifiable again. The public consultation closed on October 30, 2026, and the final version has not been published yet.

In practice, the goal is a document from which an outside reader cannot work out who is involved. Over-redacting one word costs far less than missing one.

Step 1: what should you remove from the text?

Start with data that has a fixed format. Good tools validate checksums, so a random string of digits is not mistaken for an ID.

Data Typical format Watch out for
US Social Security number 123-45-6789 Written without dashes or with spaces
UK National Insurance number QQ 12 34 56 C Spacing varies
Passport number Country-specific Often only recognizable with the word "passport" nearby
IBAN Country code, 2 check digits, account Printed in groups of four, mod-97 checksum
Payment card 13 to 19 digits Luhn checksum, partial numbers in receipts
Polish PESEL / NIP 11 / 10 digits with checksums Common in contracts with Polish parties
Phone and e-mail Many formats E-mail in signatures and mailto links
Postal address Street, number, postcode, city Unit numbers, rural addresses without a street
Date of birth Many formats Only meaningful with context ("born on")
Names Variants and inflection "Smith", "SMITH, John", "J. Smith", "Mr. Smith's"

Names cause the most trouble. Searching for "Smith" catches the obvious mentions, but not the initials in the signature block, the possessive form, or the name in all caps on the cover page. Languages with grammatical cases make it worse: in Polish, Kowalski becomes Kowalskiego, Kowalskiej or Kowalscy depending on the sentence.

If you scan the text yourself, a few regular expressions make a useful first pass. They over-match on purpose, so review every hit. For how the IBAN and card checksums work, see how IBAN and Luhn checksums prevent errors.

US SSN:                  \b\d{3}-?\d{2}-?\d{4}\b
IBAN (any country):      \b[A-Z]{2}\d{2}(?:\s?[A-Z0-9]{4}){2,7}\s?[A-Z0-9]{1,4}\b
Payment card:            \b(?:\d[ -]?){12,18}\d\b
E-mail:                  [A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}
Polish PESEL:            \b(?:\d\s?){10}\d\b

Step 2: what is hiding inside the Word file?

A DOCX file is a ZIP archive of XML parts. The page on screen can look clean while the archive still holds data you never see in the normal view.


unzip -l contract.docx

# Deleted text kept by tracked changes (for example an old account number)
unzip -p contract.docx word/document.xml | grep -o "<w:delText[^>]*>[^<]*</w:delText>"

# Author and last modified by
unzip -p contract.docx docProps/core.xml

Things to check:

  1. Tracked changes. The "No Markup" view only hides them. Microsoft states that accepting or rejecting changes is the only way to remove them permanently. Deleted passages often contain the previous version of the data, such as an old address or bank account. Turn tracking off afterwards so later edits do not create new markup.
  2. Comments. They carry text and an author name. Delete all of them, not just resolved ones.
  3. Hidden text. The "Hidden" font attribute hides text on screen and in print but leaves it in the file.
  4. Document properties. Author, company, title and last modified by. The title is often the original file name, including the client's name.
  5. Thumbnail and template path. A saved thumbnail can show the first page before redaction, and the attached template path (C:\Users\jsmith\...) reveals the author's login.
  6. Links and fields. A "contact me" hyperlink may point to mailto:john.smith@..., and field codes can contain addresses that never appear in the text.
  7. Images and embedded objects. Photos carry EXIF metadata such as GPS coordinates, and an embedded Excel object may hold the whole spreadsheet behind a chart.

Pro-Tip: accept before you inspect. Deleted text inside tracked changes is stored in w:delText elements, which is how an old bank account number survives in a file that looks clean. After you accept or reject all changes, run the grep command above again: if it returns nothing, the deleted passages are gone.

Word's built-in Document Inspector (File, Info, Check for Issues, Inspect Document) finds and removes many of these items. Microsoft recommends running it on a copy, because removed content cannot always be restored with Undo.

Step 3: if you send a PDF

A black box in a PDF often just covers the text. Before sending, select the blacked-out area and paste it into a text editor. The details, including scans with OCR layers and older versions hidden in incremental updates, are in why blacked-out PDF redactions still leak text.

Step 4: context no pattern will catch

This step needs a human reading the document like a stranger would. Typical examples:

  • a job title held by exactly one person ("the head of finance at the Denver office"),
  • an incident known in a small community ("the accident outside the only school in town"),
  • a combination of small facts: age, profession and town together often point to one person,
  • data about third parties: witnesses, neighbors, family members,
  • case, policy and contract numbers that lead back to the full file.

Step 5: images, file name and the e-mail itself

The items people forget most often:

  • Signatures, initials and stamps are images, so no text search will find them.
  • Scanned IDs and photos of faces need to be covered or removed.
  • QR codes and barcodes can encode full details such as payment data.
  • The file name "Contract_John_Smith.pdf" leaks more than the content. Use a neutral name.
  • The subject line and body of the e-mail carrying the document should be clean too.

The checklist

  • National IDs, passport numbers, bank accounts and card numbers removed or replaced
  • Every form of every name, including initials, all caps and possessives
  • Addresses, postcodes, phone numbers, e-mails and dates of birth
  • Tracked changes accepted or rejected, tracking turned off
  • Comments and hidden text removed
  • Document properties cleared (author, company, title)
  • Links, field codes and image alt text checked
  • PDF redactions tested with select and copy
  • Signatures, stamps, scans and QR codes covered
  • Context read as an outsider would read it
  • Neutral file name and e-mail text

How do you speed this up without uploading the contract?

Most online redaction services process files on their own servers, which is an extra risk for contracts and court filings. The WuseBox PDF & DOCX Redaction tool runs locally in your browser, so the file never leaves your computer. It detects identifiers with checksum validation, names (including inflected Polish forms), addresses and phone numbers, accepts tracked changes, strips metadata and comments, and verifies the finished file. Its detection is tuned for Polish documents, so review English documents especially carefully, and Step 4 always stays with you.

When you test document templates, use fictitious data instead of real records; the test data generator produces Polish IDs and IBANs with valid checksums. If you only need to paste a clause into an AI chat, mask it with the prompt anonymizer. For what happens to data pasted into AI chats at company scale, see how to prevent AI data leaks with prompt scrubbing.

Frequently Asked Questions (FAQ)

Is replacing names with initials enough?

Not always. Initials combined with a job title, a town or a description of events often identify the person anyway. Courts that publish rulings with initials also remove the other identifying details.

Is saving the Word document as PDF enough?

No. Exporting to PDF does not accept tracked changes for you and can carry metadata such as author and title into the PDF. Remove the data, accept the changes, delete the comments and run the Document Inspector first, then export.

What about headers, footers and footnotes?

They are separate parts of the document and easy to skip while reading the body. They often hold case numbers, the author's name or the firm's contact details, so check them as carefully as the main text.

References & Official Sources

This article is for general information only and is not legal advice.