How to redact a PDF properly
· 6 minute read
Drawing a black box over text does not remove it. How real redaction works, the mistakes that have exposed documents, and how to check yours.
Redaction is the removal of sensitive information from a document before it is shared. The principle is simple and the execution is routinely botched, because the thing that looks like redaction, a black rectangle, is not redaction at all.
Why a black box is not enough
A PDF page is built from layers. Text is one layer, and a drawn rectangle is another, placed on top. Covering a word with a black rectangle hides it from the eye and does nothing to the text underneath. Select the area and copy, and the word is pasted. Search for it, and it is found. Open the file in a text extractor, and it is there in plain view.
This has been the cause of real embarrassments, where documents were published with names or figures "blacked out" that could be recovered in seconds by anyone who pressed Ctrl+A.
What real redaction does
Proper redaction removes the text from the page’s content, not just from view, and then draws the box where it used to be. When you are finished there is nothing underneath to select, copy or search. The rest of the line is unchanged.
Steps for doing it well
- Make sure the document has real text. If it is a scan, make it searchable first with OCR PDF, since a tool cannot find words that are only pixels.
- List everything that must go, including variants: "J. Smith", "John Smith" and "Smith" are three different searches. Add account numbers, addresses and anything else that identifies someone.
- Run the redaction and look at the changed pages.
- Test the result. Open the saved file and search for several of the words. It should find none. Try selecting the box area and pasting into a text editor.
- Keep the original somewhere secure. Redaction cannot be undone, and you may need the unredacted version later.
The places people forget
- Metadata. The file’s hidden properties can carry an author name or a title that gives the game away. Remove them with Remove metadata.
- Images of text. A scanned name inside a picture has no text to find. It needs covering in the image, or the page needs recognising first.
- Other places in the same document. A name redacted on page 2 may appear again on page 40. Search the whole file, which a good tool does for you.
- Contextual clues. Redaction removes the words you name, not the facts around them. A job title and a date can identify a person even after the name is gone.
Where to do it
Redaction is the one task where you most want a file to stay on your own machine. The document you are redacting is, by definition, the unredacted one. A tool that works in your browser never receives it. We discuss the case for that in is it safe to upload PDFs online.
Tools mentioned
- Redact — Take words out of the file, not just paint over them.
- OCR PDF — Make a scan searchable by reading the words off it.
- Remove metadata — Take off the author, the software and the dates the file carries.