Home/Redact/Black boxes

A black box on a PDF doesn’t remove the text

Draw a rectangle over a number, flatten it, send it. The rectangle is real. So is the number underneath, in the same file and the same order, two keystrokes away.

Drop the PDF you want to redact

or choose a file

Confirm first that the file really holds something that must not get out. Redaction cannot be undone.

Why the text survives the box

A PDF page is a list of drawing instructions. Text is one kind: put this character at these coordinates, in this font, at this size. A rectangle is another kind: fill this area with this color. Painted after the text, the rectangle hides it.

Hiding and removing are different operations, and the file only performed the first one. The text runs are still in the instruction list, in the order they were written.

The clipboard doesn’t read pixels. Select-all walks the text runs, so whatever is still in that list comes out, black box or no black box.

Four ways a black box gets made

These are the four things people mean by “redacted”. Only the last one removes anything.

  • A shape or freehand annotation drawn over the text. By far the most common, and the one that leaks: selection, search and copy all still find the covered words.
  • A filled rectangle plus the text recolored to match it. Identical on screen. The characters are still in the content stream and still extractable.
  • The characters deleted from the content stream. The words are gone. The layout usually isn’t fine afterwards, because a gap opens where the line was, which is why so few tools do it.
  • The page redrawn as an image. Nothing is left to extract, because there’s no longer any text, only a picture of the page. The Redact tool on this site does this page by page, and only for the pages you box.

Ten seconds to check any redacted PDF

Do this before trusting a file, whoever sent it and however official it looks.

  1. Open it in any reader and press Ctrl+A, then Ctrl+C.
  2. Paste into a plain text editor. Not a word processor. You want the raw characters, not formatting.
  3. Search for the digits, the name, the string you were told had been removed.
  4. If it comes back, the sender covered the text in a picture. The file still contains it, and so does every copy of the file.

Why this comes up so often

A redacted document is usually going somewhere it shouldn’t be readable: a landlord, a contractor, a support inbox, a public filing. The box is the reassurance. The text underneath is the state of the file, and it travels exactly as far as the box does.

The Ctrl+A test is routine for anyone who checks documents. Journalists, regulators and opposing lawyers run it as a matter of routine. By the time they do, the document has been published for days. Ten seconds before sending costs nothing, and ten seconds after costs whatever was in the file.

Straight answers

Are black boxes ever acceptable?

On paper, or in a screenshot, yes, because there’s nothing to extract from pixels. As a PDF file, no: the covered words are still in the content stream.

Does flattening the PDF fix it?

Usually not. Flattening merges annotations into the page, so the rectangle becomes part of the content stream with the text still sitting underneath it. It only helps if your exporter rasterizes while flattening, and most don’t by default.

What about deleting the page and re-inserting it?

Only if the page you put back has no text in it. Rebuilding a page around the original text leaves the original text.

I already sent a file like this. What now?

Run the same test on your own copy. If the string comes out, assume the recipient can do the same, and decide what that means before anyone asks you about it.

More on redact

The full tool, with every option: Redact.