Blackline Guides Open the tool

Why redacted PDFs leak: how a black box gives the text back

Almost every "redaction" that has ever embarrassed a law firm, a government department or a newsroom failed the same way: the black box was drawn on top of the text, and the text stayed in the file.

What actually happens inside the PDF

A PDF page is not a picture. It is a list of drawing instructions — place this glyph here, fill this rectangle there — plus the fonts and images they refer to. When a tool "redacts" by drawing a filled black rectangle, it appends one more instruction to that list:

... (Employee salary: 184000) Tj     <- the words, still in the file
0 0 0 rg  120 540 220 14 re  f       <- a black rectangle, drawn after

Your eye sees a black bar because the rectangle is painted last. Every other consumer of the file — a text extractor, a search index, a screen reader, the copy-paste buffer — reads the text instruction and never looks at the rectangle at all. Nothing was deleted. Something was covered.

The five ways it comes back out

  1. Copy and paste. Select over the black bar in any PDF reader and paste into a text editor. This is the one that has burned the most people, because it needs no tools and no skill.
  2. Text extraction. pdftotext report.pdf - dumps every text object on the page, redacted or not.
  3. Deleting the annotation. If the box was added as an annotation or a form field rather than page content, it can simply be removed and the page is back to its original state.
  4. Attachments and earlier versions. PDFs support incremental saves. An edited file can still carry the whole previous revision inside it, which is recovered by reverting to the earlier cross-reference table.
  5. Metadata. Author, original filename, the software used, and often a full title line survive in the document information dictionary and the XMP packet, even when every visible page is clean. See removing PDF metadata.

The most-reported public examples over the last two decades all sit in the first two rows of that list — court filings and official reports published with black bars that could be selected and pasted straight out. The technical cause was never sophisticated. It was that the exporting tool was asked to draw, not to delete.

Blur and pixelation are not safer — they are worse

Blurring or pixelating a name or a face is a reversible transform. The original detail is not removed, it is smeared across neighbouring pixels in a way that carries information about what it was. Public research tooling has demonstrated recovery of pixelated text by rendering candidate strings through the same pixelation and matching the result, and a well-known criminal case in 2007 was broken by reversing a swirl filter applied to a face. If a region matters enough to hide, fill it with a solid colour. Never blur it, never mosaic it, never lower its opacity.

Test any file you are about to send, in one command

pdftotext redacted.pdf - | grep -i "the secret word"

If it prints anything, the redaction failed. If pdftotext is not installed, open the PDF, select the whole page, copy, and paste into a plain text editor — same test, no install. Do this on every file before it leaves your hands. It takes ten seconds and it is the only check that actually proves anything.

What a real redaction has to do

How Blackline does it

Blackline renders each page, composites your black boxes into the page pixels, and writes a new PDF from those flattened pages. The original text objects are not carried over, because the page is rebuilt rather than annotated. The trade-off is honest and worth stating: the output is no longer selectable text anywhere, and the file is usually larger. That is the price of the covered words being genuinely gone. Everything runs in your browser — the file is never uploaded, and the tool keeps working with your network disconnected.

The repository ships the test that proves it: a PDF carrying a known canary string is run through the deployed app, and the output is asserted to contain no trace of the canary in its raw bytes, to return empty text extraction on every page, to have pure black pixels inside the box and readable text outside it, and to carry empty metadata fields.

Redact a file now — free, nothing uploaded