PdfEditorOnlineFree

3 min readPrivacy and security

Redact a PDF so the text is really gone

Black rectangles are not redaction. Learn why hidden text survives cosmetic edits, what a defensible redaction workflow removes, and how to verify a file before releasing it.

Drawing a black rectangle over text in a PDF hides it visually while leaving the original characters in the file, where anyone can copy or extract them. Real redaction removes the underlying content: the affected page regions are rasterised so the covered pixels no longer exist, and hidden structures such as metadata and annotations are cleared before the file is released.

  • A drawn rectangle is an annotation layered above text; the text underneath is still extractable.
  • Defensible redaction destroys the covered content itself, not just its appearance.
  • Verify by extracting text and searching the released file for the values you removed.

Redaction failures are embarrassingly common, and they follow the same pattern almost every time: someone drew black boxes in a general-purpose editor, exported the file, and shipped a document whose "redacted" names could be recovered by pressing Ctrl+A and Ctrl+C.

Why the black box fails

A PDF page is a stack of independent drawing instructions. Adding a filled rectangle appends one more instruction to the end of that stack. It changes what is painted last; it changes nothing about the text operators already in the content stream.

So the text remains present and, depending on the tool used, still:

  • selectable and copyable in any reader,
  • returned by text extraction and search indexing,
  • visible in accessibility trees and screen-reader output,
  • recoverable by simply deleting the rectangle annotation.

The same applies to white boxes, cropped page boxes, and shrinking a page's visible area. Cropping in particular hides content without deleting it; the material outside the crop box is still in the file.

What real redaction has to do

To be defensible, redaction has to remove the content, not the view of it. In practice that means:

  1. Destroy the covered pixels. The affected regions are rendered and rewritten so that the original glyphs no longer exist as text or vectors in the output.
  2. Rebuild the page without the original operators. The output page is generated from the redacted rendering, not patched on top of the source.
  3. Clear the surrounding structures. Document metadata, annotations, attachments, bookmarks pointing at removed sections, and form field values are all places where a redacted value can survive.
  4. Prove absence afterwards. Extract the text of the finished document and search it for the removed values.

The redaction workspace is built around that order: find the text or draw the regions, burn the redactions into rasterised pages, scrub hidden structures, and validate the output before it is downloadable.

Finding everything worth removing

Manual selection misses things. Repeated identifiers, page headers, footers, and values that appear once in an unexpected place are the usual escapes. Two techniques help:

  • Search-driven redaction. Search the document's own text layer for the exact string and redact every hit, rather than scrolling and clicking.
  • Pattern detection. Structured values such as account numbers, government identifiers, phone numbers, and email addresses follow predictable shapes. The automatic PII review proposes matches so you can approve or reject each one, which is faster and more complete than reading every page yourself.

Automated detection is an assistant, not an authority. Approve each finding deliberately, because a false negative in a released document cannot be recalled.

The cost you should expect

Genuine redaction is destructive, and it has visible consequences:

Consequence What it means in practice
Affected pages become images Text on those pages is no longer selectable
File size can grow Rasterised pages are usually larger than text pages
Accessibility is reduced Re-run recognition if the document must stay searchable
The change is irreversible Always keep an unredacted master copy in a controlled place

That trade-off is the point. If the output still contains selectable text where the redaction was applied, the redaction did not happen.

Check the document, not just the pages

Before release, audit what else travels with the file: author names, editing software, revision history, embedded attachments, invisible text layers from old recognition passes, and outbound links. The privacy risk scanner enumerates these so you find them before a recipient does. Where interactive content is the risk, flattening forms and annotations with the flatten tool removes the interactive layer that would otherwise carry values along.

A verification routine you can repeat

  • Extract the text of the released file and search for every removed value.
  • Search for partial forms too, such as the last four digits of an identifier.
  • Confirm the redacted regions contain no selectable text at all.
  • Inspect document properties for author, title, and producer leftovers.
  • Compare the page count and page order against the source.

Tools used in this guide

Each workspace runs in this browser tab. Open one directly to apply the steps above to your own document.

Written by The PdfEditorOnlineFree team. Published . Product behaviour described here reflects the linked workspaces at the time of review; check the tool page for current limits.