How to redact a PDF safely

A black box over a name looks final. In a PDF it often is not: the words underneath can still be selected, searched and copied. Here is why, how to check, and what works instead.

By NoUploadPDF ยท Published

Why covering is not removing

On paper, a black marker over a line of text destroys it. A PDF is not paper. Its pages are built in layers: text is stored as text, images as images, and shapes are drawn on top. When you draw a black rectangle over a name, you add a shape above the text. The text is still there, one layer down, exactly as it was. It is simply hidden from view.

Anything that reads the text rather than looking at the picture of the page will find it: selecting and copying, searching, a screen reader, a search tool, or any program that pulls the text out of a file. Published documents have been undone this way many times, by people doing nothing more advanced than copying the blacked-out lines into a text editor.

There are three common ways a redaction fails:

  • A box drawn on top. A rectangle added with a drawing or comment tool. If it was added as a comment, it can also be deleted or hidden in a reader's settings, revealing the text on screen.
  • Highlighting in black. A highlight is a comment too. It changes how the words look, not whether they exist.
  • Cropping. Cropping a page moves the visible edge inward. Whatever lies outside the new edge is hidden, not deleted, and anyone with a PDF editor can move the edge back. Crop PDF says so on its own page, for this reason.

There is a quieter fourth. Many programs save changes by adding them to the end of the file, leaving the earlier version inside it. A document redacted and saved that way can still contain the unredacted version, recoverable with the right software.

How to test a redaction

Before sending anything you have redacted, try to defeat it yourself. It takes two minutes:

  1. Open the redacted file in a PDF reader, select all the text on a redacted page, copy it and paste it into a plain text editor. Read what arrives.
  2. Use the reader's search to look for a word you redacted, such as a surname or the last digits of an account number.
  3. Try to select the area under the box by dragging across it.
  4. Check the document's details, and any comments and attachments. Inspect PDF lists the stored details, attachments and form fields in one report.

If any of these turns up what you meant to hide, the redaction has failed. If the file is image-only, step 1 will paste nothing at all, which is what you want.

What works

Which approach is right depends on how much has to go.

Whole pages: remove them

If the sensitive material fills whole pages, such as a page of bank details or an appendix meant for someone else, delete those pages. A removed page is not hidden; it is simply not in the new file. Remove pages and Extract pages both write a brand new document containing only the pages you keep, rather than editing the old one, so no earlier version of the file survives inside the result.

Part of a page: a real redaction feature

For a name, a number or a paragraph, the proper tool is a dedicated redaction feature in a full PDF editor. These differ from drawing a box: you mark the areas first, then apply the redaction, and the editor deletes the text, the parts of images and the drawing beneath each mark before painting the box. Look for a command named Redact rather than a rectangle or highlighter tool. Many editors also offer to remove hidden information and earlier versions as part of the same step.

This site does not have a redaction tool. Removing part of a page safely means proving that no text, no pixels and no earlier version survive under each mark, and offering anything less would invite exactly the failure this guide describes.

When in doubt: turn the pages into pictures

If you have covered the text in some other way and cannot be sure it is gone, there is a blunt but dependable fallback: convert every page into an image and build a new PDF from those images. A picture of a page contains only what the page showed. Text hidden under a box is not in the picture, because it was never visible.

  1. Cover what must not be seen, in whatever program you use, and save the file.
  2. Open PDF to PNG, choose the file, and set the quality to For printing. PNG keeps text sharp; PDF to JPG makes smaller files with a faint haze around letters. Every page becomes an image of 300 dots per inch: an A4 page becomes 2480 by 3508 pixels.
  3. Unzip the archive. The images are named in page order, such as report-page-03.png, so they sort correctly. Open a few of them and check that every box is there and covers what it should: the images show exactly what will be in the new file, so a cover that is missing or too small in a picture is missing or too small in the result.
  4. Open PNG to PDF (or JPG to PDF for JPG pictures) and add them all, or choose the folder, which adds them sorted by name. Set the page size to the paper size of the original, such as A4 or Letter, and the margin to 0.
  5. Convert, then run the test above on the new file.

Choose a paper size rather than Fit each page to its picture. That option makes every page exactly as many points as the image has pixels, and since a point is a seventy-second of an inch, a 300 dots-per-inch image would become a page more than a meter tall.

This approach has real costs, and they are why it is a fallback rather than the first choice:

  • The text can no longer be selected, searched or read aloud by a screen reader. For a document someone must work with, that matters.
  • Links, bookmarks and form fields are gone.
  • The file is usually much larger than the original, because every page is now a large picture.
  • It removes hidden text only. Anything visible on the page, including a box that does not fully cover a word, is copied faithfully into the image.

Then clear the details

Redaction deals with the pages. The document's stored details are separate: an author name, a title that repeats a redacted name, or creation dates. A PDF built from images starts with fresh details, but any file you send should still be checked. Run it through Remove metadata as the last step and confirm the result in Inspect PDF. PDF metadata explained covers what those details are.

A checklist before you send

  • Whole pages that should not go have been removed, not covered.
  • Every redaction was applied with a real redaction feature, or the pages were turned into images.
  • Copying all the text and searching for redacted words finds nothing.
  • There are no comments, attachments or form contents you did not mean to send.
  • The stored details have been cleared and checked.
  • You are sending the new file, not the original.

The tools for this

More on privacy and security