No upload, 100% local, no account

Article

Why blacking out text in a PDF fails to protect your data

Drawing a black rectangle over sensitive text looks like redaction, but in standard PDF viewers, the underlying characters remain untouched and searchable. Anyone can copy the text, run a search, or extract it directly from the document layers. Here is why basic blackout methods fail, the privacy risks they create, and how to permanently sanitize PDF documents right in your browser without uploading files.

A shape on top is not a deletion

A PDF page keeps two things separately: the text objects, each one a character with a position and a font, and the drawing objects placed on the page, which include any rectangle, highlight or annotation you add. When you draw a black box in a PDF viewer, you are adding a new drawing object above the existing text objects. The page now looks redacted because the box visually covers the letters. Nothing tells the file to remove the text objects underneath, so they stay exactly where they were, at the same position, with the same content.

FeatureVisual Black Annotation (Failed)Object Stream Removal (Sanitized)Raster Flattening (Pixel Redaction)
Underlying Text LayerPreserved completely under rectangleGlyph commands deleted from streamDestroyed and replaced with pixels
Selection / ClipboardSelectable & copyable via clipboardNon-existent in document textImpossible (Only image remains)
Searchability (Ctrl + F)Finds hidden words immediatelyZero search hits for redacted wordZero search hits
pdftotext ExtractionDumps all supposedly redacted textRedacted text absent from streamEmpty text output
Diagram of a PDF page split into two layers: the text objects underneath and a drawing-object box placed on top, visually covering but not deleting the characters.
A black rectangle can leave the original PDF text intact

How the original text resurfaces

Because the text objects never left the file, four ordinary actions can expose them: selecting and copying the "blacked-out" line, running a text search across the document, extracting the raw text with any PDF-to-text tool, or opening the file in a viewer that renders text objects above drawing objects in a different order. None of these require special skills. This has happened publicly more than once: PDFs released with black boxes over sensitive passages turned out to still contain readable, copyable text underneath, and the mistake made the news instead of staying hidden.

FeatureDevTools F12 Verificationpdftotext CLI VerificationHex / Raw Stream Audit
Verification CommandNetwork Tab (0 B Payload)pdftotext doc.pdf - | grep "secret"strings doc.pdf | grep "secret"
Expected Audit ResultF12 → Network (Fetch/XHR: 0 B)Exit Code 1 (No match found)String completely absent
File Size DeltaNegligibleSlight decreaseChanges according to raster DPI

Turning the page into an image first

The fix is to destroy the text layer permanently rather than drawing over it. Use our dedicated PDF Redact tool (up to 100 MB), which lets you drag redaction boxes on the page canvas or scan the native text layer, apply any of four redaction styles, and flatten redacted pages into permanent raster images in one step. Alternatively, you can convert pages with our PDF to Image tool, cover sensitive areas with our Image Redact tool, and rebuild the file with our Image to PDF tool. Either way, there are no text objects left on the redacted page, only pixels, so the previously sensitive text no longer exists.

Workflow diagram: a PDF page is converted to an image, redacted with an opaque box on the pixels, then reassembled into a new PDF with no recoverable text underneath.
Remove sensitive pixels before rebuilding the PDF

What this trades away

Rasterizing a page turns real, searchable text into a static picture, so anyone reading the redacted page afterward cannot select or search that page's text anymore, redacted or not. That is an acceptable trade for the page you are protecting: the alternative, keeping the text layer intact and hoping nobody checks, is exactly the mistake this article started with. If other pages in the same document carry no sensitive content, you can leave them untouched and only rasterize the pages that need it.

Use a solid box, and check the metadata too

For text, a fully opaque black or solid-color box is the safer choice. A light gaussian blur can sometimes be worked backward for large, plain text, which is why this site pixelates instead: each block is replaced by its average colour, so the original pixels are gone rather than smeared. Redacting the visible page also does not touch the file’s metadata: author name, software version, GPS coordinates on embedded photos, or edit history can leak separately from the page content. If that matters for your document, check what your file’s own metadata reveals before you share it.

Tools in this article

Frequently asked questions

Does drawing a black rectangle in a PDF viewer actually delete the text underneath?

Usually not. Unless the tool has a dedicated redaction feature that removes the underlying text objects, drawing a shape only adds a layer on top of the page. The original characters remain in the file and can be selected, searched or extracted with common tools.

Is blurring sensitive text safer than covering it with a box?

For text, a solid opaque box, or removing the text layer entirely by rasterizing first, is the right answer. A light gaussian blur can sometimes be reversed well enough to guess large, plain characters, which is exactly why the redaction tool here does not apply one: its mosaic pixelation mode replaces each block with a single averaged color, and an average cannot be undone.

Does converting a PDF to images before redacting lose anything important?

It loses the ability to select or search text on the pages you convert, since they become plain pictures. For a page you are actively redacting, that is the point: the sensitive text no longer exists as extractable characters. Pages that carry no sensitive content can stay as regular PDF pages if you only rasterize the ones you need to.

Sources