DOCX · search terms, patterns, comments, metadata

Redact Word Document

Find names, numbers and patterns across the body, headers, footers, footnotes, charts and SmartArt of a Word file, replace them inside the text, and scrub what Word keeps elsewhere: tracked changes, comments, hidden text, picture descriptions, author properties and the page preview. Before you can download, the saved file is re-read: every part, file name and embedded workbook is searched again for your terms and the values that were redacted.

Word file

Drop a .docx here or click to choose

Up to 50 MB

What to find

Built-in detectors

How to replace

A same-length replacement keeps the layout; it also shows how long each value was. Use a fixed run or a label if the length is itself sensitive.

Scrub the rest of the file

Pictures keep any text drawn inside them unless you delete them. Embedded objects, such as an Excel sheet, cannot be edited here: they are searched for your terms and flagged.

Matches

Load a file, set what to find and press Find sensitive text. Nothing changes until you press Redact and verify.

Redact Word Document

Operator: Abdulla Al Fahad. How tools are built and checked

A name you blank out in the body of a Word file can still be in the header, in a footnote, in the text of a deleted tracked change, in a comment's author field, in a chart title, in a SmartArt org chart, in a bookmark name, in the author property and in the page preview image Word stores inside the file. Redaction that only edits what is visible leaves all of those behind.

This page finds matches in the text, replaces them inside the runs even where Word split a name across two of them, and scrubs the places listed above. Then it opens the file it just saved and searches every part of it, every file name inside the package and every embedded workbook for your terms and for each value it redacted.

The download is held back if any of them is still found, or if part of the document could not be searched.

Key features

  • Search terms, regular expressions (up to 200 characters; patterns that can backtrack badly, such as nested repeats or overlapping alternatives inside a repeat, are refused), built-in detectors for emails, phone numbers, card numbers that pass the Luhn check, IBANs with valid check digits and national ID shapes (US SSN, UK NINO, Canadian SIN with Luhn), and text you select in the preview
  • Replacement with a block for every character, a fixed run of blocks, or a label such as [REDACTED]; each distinct match has a checkbox so you can leave one out; fullwidth look-alikes of a term (Zebulon) are replaced too
  • Tracked insertions and deletions accepted or rejected first, so deleted text cannot survive; comments removed with their anchors or kept and redacted, authors included; hidden text deleted or redacted; headers and footers redacted or emptied
  • Chart titles and cached values, SmartArt text, the building-block glossary, document variables, field codes (a mailto address Word split across two runs is read as one), bookmark names, content-control titles and list items, and hyperlink tooltips redacted wherever they match
  • Picture descriptions cleared or redacted, author, last editor, title, company, manager and custom properties cleared, the page preview image deleted, custom XML emptied, and optionally every picture and its image file deleted
  • A verification step that re-reads the saved file and a report of what was removed

Where Word keeps text that redaction must reach

Word stores a paragraph as runs, one for each change of formatting, so 'Amara Okonkwo' with a bold first name is two w:t elements. The page joins the text of a paragraph, finds matches across the join, and edits only the text nodes the match touches. Tabs, line breaks, pictures and footnote marks count as separators, so a match cannot run across them.

Outside the body the same text can sit in headers and footers, footnotes and endnotes, comments, field codes such as a mailto hyperlink, picture descriptions (the descr and title attributes of docPr) and relationship targets. Charts keep their title and cached category and series values in word/charts; SmartArt keeps its text in word/diagrams twice, once as data and once as a cached drawing; building blocks live in word/glossary.

The file's own properties hold more: docProps/core.xml (creator, last modified by, title), docProps/app.xml (company, manager), docProps/custom.xml, customXml parts and a thumbnail image of the first page. Settings can hold document variables, and the names of bookmarks, pictures and styles are identifiers rather than text, so a name like Zebulon_Quixote never matches a search for 'Zebulon Quixote' unless the page looks for it.

A tracked deletion keeps its text in w:delText inside w:del. Accepting deletes that element; rejecting turns it back into ordinary text, which is then redacted like any other. Records of formatting changes are dropped without reverting the formatting.

How it works

Matches from all sources are merged where they overlap and counted per distinct value. The match list shows each value once with the number of times it occurs and the parts it was found in, and you can uncheck a value to keep it.

Replacement works on the decoded text of each node, so entity references and special characters are handled, and a node that ends up with leading or trailing spaces gets xml:space preserved. In label and fixed modes the first affected node receives the replacement and the others are emptied. A bookmark whose name contains a term is renamed to _redacted1, _redacted2 and so on, and every link to it follows.

Before anything changes, the page also looks for your search terms in every other place the package keeps text and tells you where they sit. Pictures are only touched when you ask: relationships to images are removed when no remaining part refers to them, and an image file is deleted only when no other relationship points at it.

Verification opens the saved bytes and checks that every XML part is well-formed. It then searches every part's paragraph text (joined across runs, with your patterns and detectors applied), every attribute value, XML comments, every file name in the package, the ZIP comments and, as raw data, the files in word/embeddings, including the sheets inside an embedded workbook. Terms are compared after Unicode normalisation, with spaces, underscores, dots and hyphens ignored, so Zebulon_Quixote counts as a match for Zebulon Quixote. Last it confirms that no tracked-change markers or hidden runs remain.

Common use cases

  • An HR officer sends a 12-page disciplinary letter to a regulator after redacting the employee's name, payroll code and bank account; the footnote with the manager's name and the comment thread are removed in the same pass.
  • A lawyer exchanging a contract draft rejects all tracked changes first, so the other side's earlier wording comes back as text and is redacted, then checks that the author property no longer names the firm.
  • A teacher shares a Word progress report with a school inspector after replacing the pupil's name and the parents' email and phone numbers; the pupil's name also sat in the title of a bar chart and in a SmartArt diagram of the class groups, and both are redacted in the same pass.
  • A support team shares a Word troubleshooting log after replacing every email and IP-like customer detail with the label [REDACTED], and unticks one email address that belongs to their own helpdesk.

How to use this tool

  1. Drop a .docx onto the page, or press Load example.
  2. Enter search terms and patterns, tick the detectors you need, and choose the replacement style.
  3. Choose what to do with tracked changes, comments, hidden text, headers, alt text, properties and pictures.
  4. Press Find sensitive text, uncheck any value to keep, and select more text in the preview to add it.
  5. Press Redact and verify and read the checks.
  6. Read the report of what was removed; the file downloads only if verification passed.

Example

The built-in example: an invented onboarding letter with five search terms

Terms: Amara Okonkwo, Luis Herrera, Priya Ramaswamy, HL-7741 and Harbor Lane. The name Amara Okonkwo is split over two bold runs. The file has a header with an email address, a footnote and a comment by Luis Herrera, a tracked deletion of 'Luis Herrera' beside an insertion of 'Priya Ramaswamy', a hidden sentence, a picture with a description naming the employee, an IBAN, a card number, a US tax ID, and author, company, manager and custom properties.

Report after Redact and verify

12 replacements covering 10 distinct values (6 are search terms, 2 are emails, and there is 1 each of phone number, IBAN, card number and national ID). The split name becomes █████ and ████████ in the two bold runs. One tracked insertion and one deletion were accepted, one hidden run deleted, one comment removed, the picture description cleared, and six properties cleared (title, creator, last modified by, company, manager and the custom property). Seven parts were rewritten and all five verification checks passed.

Tips for best results

  • Search for variants as well as the full name: 'Okonkwo' alone, initials, and a possessive form. The page matches the text you gave, plus fullwidth and separator variants of it, so 'Amara_Okonkwo' in a bookmark is caught but 'A. Okonkwo' is not.
  • Choose reject for tracked changes when the deleted wording is the sensitive part; choose accept when the final text is what you share.
  • Pick text in the preview for the odd string no pattern would find, such as a project code name.

Common pitfalls

Text drawn inside a picture or a scanned page is not searched or changed. Delete the pictures, or redact them separately. A chart's own workbook (word/embeddings) and other embedded objects cannot be edited here; they are searched as raw data and flagged next to the download.

A same-length block reveals how long each value was; use the fixed run or the label when the length is itself sensitive.

An unticked value is left in the file on purpose, and verification can then report it again when it contains another redacted value, such as a name inside an email address.

A term in a place the page cannot rewrite, such as a style name, a numbering label, a picture's file name or an embedded workbook, holds the download back with the part named; it is never released with a warning.

Common errors and how to fix them

"letter.doc" is an old .doc file or a password-protected Word file
Save it from Word as .docx without a password and load that copy.
Pattern "(a|aa)+$": the pattern repeats a group whose alternatives can start with the same character
Rewrite it so the alternatives start with different characters, or without the repeat; such patterns can take extremely long to match.
"Zebulon Quixote" still appears in word/styles.xml
The download is held back. The list names the part; rename the style in Word, adjust an option such as comments or alt text, or tick the option that deletes pictures when the name is a picture's file name, then run it again.

Best practices

  • Read the saved document in Word before you send it: verification searches text, and it cannot judge whether the redacted document still makes sense.
  • Share only the -redacted file: the original still holds every value you removed, including the deleted wording in its tracked changes.

What the built-in detectors accept

Card numbers must have 13 to 19 digits and pass the Luhn check. IBANs must pass the mod-97 check. US SSNs must have a valid structure (no 000, 666 or 9xx area, no 00 group, no 0000 serial) and are found with dashes, with spaces, or as nine digits straight after 'SSN' or 'social security'; UK national insurance numbers must have an allowed prefix; Canadian SINs are nine digits in three groups and must pass Luhn. Phone numbers are judged loosely, so a date or an amount can be caught; use the checkbox next to a match to keep it.

Which parts are read

The body, headers, footers, footnotes, endnotes and the building-block glossary are always searched, chart and SmartArt text with them, and comments are searched when you keep them. Text boxes, including both copies Word keeps for older versions, are searched. Field codes, external hyperlink targets, tooltips, content-control titles and list items and document variables are searched for the same values, so a mailto link does not keep an address the text lost.

Frequently asked questions

Is this the same as removing metadata or redacting a PDF?

It covers both for Word. The metadata cleaner on this site clears properties only, and the PDF redactor works on pages of a PDF; this page redacts the Word text itself and the properties, comments and review history around it.

Why does verification fail after I unticked an email?

The check also looks for the other redacted values with spaces and punctuation ignored. A name such as Amara Okonkwo is found inside amara.okonkwo@example.com, so keeping the address keeps part of the name visible, and the check reports it.

Can I keep comments but hide their authors?

Yes. Choose to keep comments and redact them: the text and the author and initials attributes are redacted when they match your terms. The list of comment authors in word/people.xml is not rewritten, so a term that is also an author name holds the download back; removing the comments is the safer choice when you cannot list every name.

How large a file can it handle?

A file of up to 50 MB that unpacks to no more than 160 MB, with at most 600 text parts and 200 terms. A paragraph longer than 200,000 characters is not searched, so the download is held back and the part is named.