KeepLocalHubGet the app

Home / Learn

Module 4: PDFs: size, scans, passwords and signaturesLesson 20 of 266 min read

Redacting a PDF properly: why black boxes are not enough

You need to send a bank statement but not your account number, or publish a letter without the name of the person it is about. Drawing black boxes works on paper. In a PDF it often doesn't, and this mistake has exposed secrets in government documents for years.

Why a black box hides nothing

A PDF page is built in layers, in the order things are drawn: first the text, then anything drawn after it. A black rectangle added later sits on top of the words, so you no longer see them, but the words are still on the page underneath, with their letters and positions.

Anything that reads text instead of looking at the picture finds them: selecting and copying, searching with Ctrl+F, a screen reader, a search engine, or a tool that pulls the text out. The same goes for a picture that was covered with a shape, or shrunk until it looks unreadable: the original image is still stored at full size.

Try it on a covered PDF

Open the PDF, press Ctrl+A (select all) and Ctrl+C, then paste into a plain text editor. If a covered word shows up in the editor, the redaction failed.

Leaks that happened this way

In December 2009 the US Transportation Security Administration's airport screening manual turned out to be readable in full. It had been posted on a procurement website in redacted form, but anyone who copied the text into Word or Notepad could read the blacked-out sections, including settings for X-ray machines and explosives detectors, as Washington Technology reported.

The same report recalls a 2005 memo from the Multi-National Force-Iraq whose classified parts had been blacked out rather than removed, and could be revealed by copying and pasting. After such cases the US National Security Agency published guidance called "Redacting with Confidence" (13 December 2005).

The three mistakes the NSA names

The NSA guidance was written for reports converted from Word to PDF, but its list of the most common mistakes fits any PDF:

  • Covering text, charts, tables or diagrams with black rectangles, or highlighting text in black.
  • Covering parts of a picture with separate shapes, or making a picture "unreadable" by shrinking it.
  • Forgetting the metadata and document properties, which the guidance calls often as sensitive as the document itself.

What works on paper

All three work on a printout, because paper keeps only what you see. The NSA's point is that a digital file keeps much more than what you see.

What a real redaction removes

A proper redaction deletes the hidden information instead of covering it. There are two ways to get there. Professional PDF editors remove the marked words from the page's content and redraw what is left. The other way, used by our Redact PDF tool, is to turn each marked page into a picture with the boxes painted in: no text is left on that page at all, so nothing can be copied out. The text on those pages can then no longer be selected or searched, and the file gets bigger. Pages without boxes stay as they were.

A redaction also has to clear the places you don't see on the page:

  • Document properties: title, author, subject and keywords. A title such as "Statement for Alex Morgan" undoes the box over the name.
  • XMP metadata, a second copy of those properties stored as XML.
  • Bookmarks, comments, form fields and attachments, which can repeat the text of the page.
  • Earlier versions: a PDF saved with incremental updates can still contain the previous version of a page further up in the file.

White-out is not redaction

Edit tools that put a white box over a mistake are fine for corrections. They cover the text, exactly like a black box does, so never use them to hide private details.

Check before you send

Redact a copy and keep the original somewhere private. Then check the new file, not the one you worked on:

  • Search it (Ctrl+F) for each word, name and number you removed, in every way it is written: with and without spaces, short and long forms.
  • Select all, copy and paste into a plain text editor, and read what comes out on the redacted pages.
  • Look at the document properties in your PDF reader (often under File, Properties) and make sure no field names what you hid.
  • Read every page, not only the ones you marked: the same account number often appears in a header, a footer or on the last page.

Draw boxes or find words, and the marked pages are rebuilt with the text removed, plus a check of the result.

Redact PDF

Quick check

Three questions. Pick an answer to see why.

  1. You drew black rectangles over an account number and saved the PDF. What can someone who receives it do?

    Show the answer

    Answer: Copy the text under the boxes and paste it somewhere readable The rectangle sits on top of the text; the text itself is still in the file.

  2. Which of these can give away a name you blacked out on every page?

    Show the answer

    Answer: The PDF's title in the document properties Metadata is one of the three mistakes the NSA guidance names.

  3. What is the quickest way to check a redacted PDF before sending it?

    Show the answer

    Answer: Search it for the removed words and copy-paste its text into an editor Both read the text layer, which is exactly where a failed redaction leaks.

Rules change

File formats and official photo rules change. Each guide shows the date it was last checked; for forms and official photos, the authority's own page has the final word.

Sources

Last checked November 9, 2026

Free tools for files you have the right to use. Everything runs on your device; check important results (forms, prints, official photos) before you send them. Terms of use.