re-doc
Try for free
ArticlePage 1 of 11
← Blog · 8 min read · October 1, 2026

Redact or Replace: How to Anonymize Documents Without Losing What Matters

RedactionRemoved for good
PatientRahul Sharma
SSN423-88-1924
DOBMarch 4, 1981
AnonymizationReplaced, still readable
PatientArjun Verma
SSN571-34-6289
DOBJuly 19, 1979

Redaction removes information. Synthetic replacement swaps it for realistic values so the document still works. This guide explains how to choose, and where each method fails.

The short answerPage 2 of 11

The short answer

Redact when the document has to show that something was removed, or when the page is a scan with no text to work with. Replace identifiers with synthetic data when people still need to read, search or analyse the document afterwards. Many organizations need both, because one source document often goes to several recipients with different needs.

Redaction permanently removes the sensitive content, usually with a black box. Synthetic replacement swaps each identifier for a realistic, different value and applies it consistently, so a name that appears 23 times in a report becomes the same new name 23 times.

What each method does to a documentPage 3 of 11

What each method does to a document

RedactionSynthetic replacement
What happens to the identifierRemoved or blacked outSwapped for a realistic, different value
What the reader seesA black box or a "[REDACTED]" tagNormal text
Search and cross-referencesBroken for the removed textStill work, using the new values
Visible proof that something was removedYesNo, unless you mark it
Works on scanned pagesYes, with OCRNeeds text in the file, so it suits native PDF, DOCX and TXT
Typical usePublic records releases, court filings, scansReview, research, testing, AI workflows
When redaction is the right choicePage 4 of 11

When redaction is the right choice

  • Public records releases. Recipients and regulators expect to see where information was withheld. Freedom of Information Act (FOIA) work is the clearest example. In fiscal year 2024, US federal agencies received a record 1.5 million FOIA requests, and the backlog of unanswered requests rose 33%, from 200,843 to 267,056 [1][2]. Teams under that pressure need fast, reliable redaction with a human check.
  • Court filings. Many courts expect visible redactions and have their own rules. Check the rules that apply to your filing.
  • Scanned pages and faxes. If a page is only an image, there is no text layer to replace, so drawing boxes over the sensitive areas is the practical option.
  • One-off removals. If a single name needs to disappear from one document, a black box is simple and clear.
When replacement is the better choicePage 5 of 11

When replacement is the better choice

  • Review across a set of documents. A legal team following one witness across hundreds of files loses that thread if every mention becomes a black box. A consistent replacement name keeps cross-references intact.
  • Research and clinical documents. A page full of "[REDACTED]" gives a reader very little context. The European Medicines Agency's Policy 0070 aims to publish clinical reports with participants anonymized while keeping the data useful for researchers [3]. Replacement keeps narratives and tables readable.
  • Vendors and offshore teams who must read to do the work. They can process the document without seeing real identities, subject to your legal basis for sharing it.
  • Test data and AI workflows. Realistic structure matters here. Replacement keeps the shape of the document without the real people in it.
Where each method failsPage 6 of 11

Where each method fails

Redaction fails when it is only cosmetic. A black rectangle drawn over text, or a highlight set to black, hides the text on screen but can leave it in the file. In January 2019, lawyers for Paul Manafort filed a court document in which the passages meant to be redacted could be read by highlighting the black bars and pasting the text into a new document [4]. The problem is also not confined to famous cases: a 2024 Federal Judicial Center study of 4,681,055 documents filed in US federal courts on 37 sample days in 2022 found 22,391 unredacted Social Security numbers, in 4,525 documents [5]. That study counted exposed numbers. It did not say how each one happened, but it shows how often identifiers slip through.

Replacement fails in other ways:

  • Inconsistency. If one person gets two different replacement names, or two people share one, the document becomes confusing or misleading.
  • Missed identifiers. A name in a footer, header, table or signature block that is never found is not replaced.
  • Combinations of details. Replacing direct identifiers does not remove the risk from details that identify someone together, such as a rare job title, a place and a date. HIPAA's Safe Harbor method reflects this: it requires removing 18 types of identifiers and also that the organization has no actual knowledge that what remains could identify the person [6].
  • Layout damage. Swapping a short name for a long one can break a table or push text onto a new page unless the tool handles it.

Replacement is not automatically anonymization in the legal sense. Under the GDPR, data is anonymous only if people can no longer be identified by any means reasonably likely to be used (Recital 26) [7]. The EU's Article 29 Working Party stated that pseudonymisation is not a method of anonymisation and that pseudonymised data remains personal data [8]. Whether a given output meets a legal standard is a decision for your privacy or legal team.

How to decidePage 7 of 11

How to decide

Recipient or situationTypical methodWhy
Public records requester (FOIA, RTI)RedactionVisible removal is expected
Court filingRedaction, after checking the court's rulesMany courts expect visible marks
Scanned page or faxRedactionNo text layer to replace
Review team working across many filesReplacementCross-references survive
Clinical or research sharingReplacement, then expert reviewDocuments stay readable
Vendor or offshore processingReplacement, after checking the legal basisStaff must read to do the work
Test data or AI workflowsReplacementRealistic structure without real identities

These are common patterns, not legal advice. Your privacy or legal team makes the final call.

What to test before you choose a toolPage 8 of 11

What to test before you choose a tool

  1. Consistency. Take a name that appears in the header, body, a table and a footnote. Check it maps to the same replacement everywhere, and across several files.
  2. Layout. Compare the input and output. Tables, page breaks and paragraph spacing should survive.
  3. Misses on your own documents. Run a sample of your real files and count the identifiers that were missed. Do not rely on a vendor's headline accuracy figure.
  4. Hidden content. Try to copy text out of a redacted area. Check comments, metadata and embedded images.
  5. A review step. Someone on your side should be able to check and change the result before it is released.
  6. Deployment fit. Ask where documents are processed and what options exist if your requirements are strict.
How Re-Doc handles bothPage 9 of 11

How Re-Doc handles both

Re-Doc replaces identifiers in native PDF, DOCX and TXT files with consistent synthetic data and keeps the original layout. Scanned pages and images are redacted with black boxes. Files that mix text and images can be handled in one run. You can review and edit the result before you download it. The first 10 pages are free at re-doc.com/try, and the API is available on paid plans. For custom deployment or specific requirements, contact our team. For a wider view of the terms used here, see our guide to document de-identification and the comparison of redaction, anonymization and pseudonymization.

Frequently asked questionsPage 10 of 11

Frequently asked questions

Is synthetic replacement the same as anonymization?

Not automatically. Replacement is a method. Whether the result counts as anonymized or de-identified depends on the legal standard that applies (HIPAA, GDPR or another) and on whether the remaining details could still identify someone. Your privacy or legal team decides.

What is cosmetic redaction?

It is a redaction that only covers text visually, for example with a black rectangle or highlight, while the text stays in the file and can be copied out. Real redaction removes the underlying content.

Should I redact or replace for a FOIA response?

Redaction is the usual choice, because requesters and agencies expect visible removal and often need to cite an exemption. Replacement is better suited to sharing documents for review or research.

Does replacement work on scanned documents?

Scanned pages are images with no text layer, so Re-Doc redacts them with black boxes instead of replacing text.

Can a document with replaced identifiers be shared freely?

Not without thought. Check that nothing identifying remains in the text, metadata or images, and confirm with your privacy or legal team that sharing is allowed for your purpose.


Reviewed by the Re-Doc team. Last reviewed 1 October 2026. This article is general information, not legal advice.

ReferencesPage 11 of 11

References

  1. ExecutiveGov. DOJ Says Government Saw 25% Rise in FOIA Requests in FY24 (reporting the Department of Justice Office of Information Policy annual report). https://www.executivegov.com/articles/doj-oip-foia-requests-fy-2024
  2. Brechner Center for Freedom of Information. FOIA requests, denials, backlogs, delays, costs surge in FY 2024. https://brechner.org/2025/04/30/foia-requests-denials-surge-fy-2024/
  3. European Medicines Agency. External guidance on the implementation of the policy on the publication of clinical data (Policy 0070). https://www.ema.europa.eu/en/documents/regulatory-procedural-guideline/external-guidance-implementation-european-medicines-agency-policy-publication-clinical-data-medicinal-products-human-use-version-15_en.pdf
  4. ABA Journal. Paul Manafort's attorneys failed at redacting. https://www.abajournal.com/news/article/paul-manaforts-attorneys-failed-at-redacting-learn-how-to-do-it-right
  5. Federal Judicial Center. Unredacted Social Security Numbers in Federal Court PACER Documents (2024). https://www.fjc.gov/sites/default/files/materials/30/Unredacted%20Social%20Security%20Numbers%20in%20Federal%20Court%20PACER%20Documents%202024%20Final.pdf
  6. 45 CFR 164.514, the HIPAA de-identification standard. https://www.law.cornell.edu/cfr/text/45/164.514
  7. Regulation (EU) 2016/679 (GDPR), Recital 26. https://eur-lex.europa.eu/eli/reg/2016/679/oj
  8. Article 29 Working Party. Opinion 05/2014 on Anonymisation Techniques. https://ec.europa.eu/justice/article-29/documentation/opinion-recommendation/files/2014/wp216_en.pdf