PlainFile
0 bytes uploaded

How to Redact a PDF Properly (and Why Black Boxes Fail)

By the PlainFile team · Published September 14, 2026 · 8 min read

Redaction means one thing: the sensitive content is gone — deleted from the document, unrecoverable by anyone who receives the file. Most of what people call "redacting a PDF" is something else entirely: drawing a black rectangle on top of live text. The text stays in the file, and getting it back takes seconds. This guide explains why the distinction matters, how famous leaks happened, what a proper redaction must remove, and how to verify the result before you hit "send".

Three leaks that were "redacted"

Manafort, 2019. Lawyers for Paul Manafort filed a court document with black rectangles over key paragraphs. Journalists selected the text, copied it, and pasted it into a text editor — revealing details of the Mueller investigation that were meant to stay sealed. The "redaction" was a drawing object floating above intact text.

TSA, 2009. The US Transportation Security Administration published a screening manual with black boxes over sensitive procedures. The boxes were ordinary annotations; anyone could remove them in Acrobat or copy the text underneath. The manual had to be rewritten.

EU–AstraZeneca contract, 2021. The European Commission published a vaccine contract with properly redacted page text — but the confidential numbers survived in the PDF's bookmarks (the navigation outline). Redacting the page body while leaving document-level structures intact is still a leak.

One root cause connects all three: somebody hid the content instead of deleting it.

A PDF is not a picture of a page

The black-box mistake comes from thinking of a PDF as a photo of a document. It is not. A PDF is a structured container of objects, and sensitive data can live in any of them:

  • Content streams — the drawing commands that place text and images on the page. This is the only layer a black rectangle affects, and it only covers it visually.
  • Document metadata (Info / XMP) — author, title, company, editing history. Names leak here constantly.
  • Annotations — comments, highlights, sticky notes and link annotations, often containing the very text you removed from the page.
  • Bookmarks (outline) — section titles, as in the AstraZeneca case.
  • Embedded files — a PDF can carry attachments, for example the original Excel spreadsheet with every unredacted figure.
  • Form fields — hidden values in AcroForm fields.
  • Invisible text layers — scanned documents often have an OCR text layer you cannot see. Covering the scan covers nothing.
  • Incremental revisions — editors that "save" by appending leave old versions of objects inside the file body.
  • Embedded fonts — font files contain copies of the glyphs used, including the ones you thought you deleted.

Try it yourself

Below is a miniature of the failure. On the left setting, the SSN is "redacted" the way most editors do it — a black box drawn over the text. Select across the box with your mouse and copy. Then switch to true redaction and try again.

Try it: drag to select the hidden text, then copy it.

First National Bank — Statement 04/2026

Account holder: Jane A. Doe

SSN: 123-45-6789

Opening balance: $8,214.55

The SSN above looks hidden. Select across the black box with your mouse — the text is still there.

The attacker's checklist: how redacted files get tested

Anyone who receives your redacted PDF can run this playbook in minutes — journalists, opposing counsel and curious recipients do it routinely. Treat it as your own pre-send test:

  1. Select all (Ctrl/Cmd+A) and copy-paste the text into an editor.
  2. Search the document for the term you redacted.
  3. Run a text extractor (pdftotext) or OCR over the result.
  4. Inspect metadata with ExifTool or any PDF properties dialog.
  5. Check for embedded files and attachments.
  6. Open the bookmarks panel and the link annotations.
  7. Look for leftover objects from incremental saves (older revisions of the content).

If any of these turns up your secret, the file was never redacted — it was decorated.

How to redact a PDF properly

Proper redaction is a delete-and-rebuild operation, not a drawing operation:

  1. Mark what must go. Search for exact terms (names, account numbers, SSNs) across the whole document — identifiers repeat in headers and footers — and draw regions over anything non-searchable like scans, stamps and signatures.
  2. Apply real redaction. The tool must remove the content under each region from the PDF's content streams — text, images and vector graphics — not paint over it.
  3. Sanitize the whole document. Metadata, annotations, bookmarks, embedded files, form values, JavaScript and old revisions all get scrubbed, and the file is rebuilt from scratch rather than appended to.
  4. Verify. Re-open the output and run the attacker's checklist above. At minimum: copy-paste everything and search for the redacted terms.

This is exactly the pipeline our free PDF redaction tool runs in your browser: it applies true redaction with the MuPDF engine, scrubs every layer listed below, then automatically re-opens the result and searches for your terms — showing "Verified: 0 matches remain" only when nothing is extractable. The file never leaves your device, which matters when the content is sensitive enough to redact in the first place.

The sanitization checklist

Whatever tool you use, a complete redaction covers all of these layers:

LayerWhat must happenFailure it prevents
Page contentText, images and vector art under each region deleted from content streamsCopy-paste from under black boxes (Manafort)
Metadata / XMPAuthor, title, producer and dates wipedNames and case details in file properties
AnnotationsComments, highlights, links removedSecrets sitting in sticky notes
BookmarksOutline removed or filteredNumbers leaking via section titles (AstraZeneca)
Embedded filesAttachments removedThe unredacted spreadsheet riding inside the PDF
Form fieldsFlattened or hidden values removedData in invisible field values
JavaScriptScripts removedData and logic embedded in the file
RevisionsFull rebuild, never incremental saveOld object versions in the file body
FontsUnused glyphs subsetted outCopies of deleted characters in embedded fonts

A note on scans and stubborn files

Scanned documents are a special case: the page is a photograph, and any "text" in it exists only as an invisible OCR layer. Search-based redaction misses whatever the OCR got wrong, so mark regions manually and treat the whole page as an image. For maximum assurance on suspicious files — odd encodings, broken structures, documents from untrusted sources — flatten the page: render it to an image and rebuild the PDF from those images. You lose the text layer entirely, but nothing can leak from a layer that no longer exists. Remember that flattening pages does not clean document-level metadata — that step still has to happen.

Redaction is not alteration

One legal boundary is worth stating plainly. Removing information the recipient has no right or need to see — account numbers, unrelated transactions, other people's identifiers — is legitimate privacy hygiene. Changing what remains so the document tells a different story is not redaction; it is forgery. Recipients can usually see that content was removed, and that is fine: a visibly redacted document says "some things here are private", while an altered one says nothing until it is examined — and then it says the worst possible thing about you.

Redacting for a specific situation

The mechanics are the same everywhere, but each document type has its own checklist of what to remove and what to keep:

The bottom line

Redaction is deletion. If the text can be selected, searched, extracted or found in metadata, bookmarks or attachments, the document is not redacted — no matter how black the boxes look. Mark, delete, sanitize, then verify like an attacker would. Only then send.

Need to fill a form instead of redacting one? Fill PDF forms online — W-9, I-9, DS-11, DS-82, W-4, Schengen and more — free, no sign-up, no upload.

Working with paper printouts too? Read why black marker redaction doesn't work — the physical version of the same failure, and the only safe way to redact on paper.

Comparing privacy-first PDF tools? See PlainFile vs PrivacyScanPDF — an honest look at pricing, open source and verified redaction.

Redact a PDF right now — free, no upload

True redaction with automatic verification, entirely in your browser. No sign-up, files never leave your device.

Open the tool