# Redaction vs. anonymization vs. synthetic replacement

Three approaches get called "redaction". They suit different jobs.

## Redaction (black boxes)

The value is removed and covered. Use it when a document is being released and the information must not be recoverable: court filings, FOIA responses, e-discovery productions. Use a tool that removes the underlying text, not just draws a box over it. Redacted documents are poor test data: fields disappear, parsers fail and cross-document links break.

## Masking and tokenization

Values are replaced with placeholders such as `[NAME]` or `XXXX-1234`. Good for logs, text and databases, where tools like Microsoft Presidio or database masking features work well. In documents, placeholders still change the layout and break format checks (a card number that fails its checksum, an MRZ line with wrong check digits).

## Synthetic replacement in place

Each identifying value is replaced with a realistic, format-valid fake value in the same font and position, and the same person maps to the same fake identity everywhere. The document still reads, parses and behaves like the original. This is the right choice for QA and regression tests, eval sets for document AI agents, vendor and model evaluations, training material and demos.

## Choosing

1. Releasing a document to the public or a court: redact.
2. Text, logs or tables: mask or tokenize with a text PII library.
3. PDFs, scans and photos that must still work as documents: synthetic replacement.

CasePatch does synthetic replacement for statements, ID documents, claims, EOBs, medical records and letters, with every change listed for review. Try it at [the CasePatch home page](/). Whatever the approach, automated detection can miss values: review every page before sharing.
