Skip to main content
Privacy & Security
PDFixel Editorial Team••7 min read

How to Redact a PDF So the Text Is Actually Gone

A black rectangle over a name does not remove it — the text underneath stays selectable. Here is what real redaction does and how to check your file.

Direct Answer & Key Takeaway

Drawing a black box over text in a PDF does not remove the text. The words remain in the page's content stream and can be recovered by selecting and copying the area or by any PDF parser. Real redaction requires replacing the page with a flattened raster image so no text layer survives, and then deleting the original page object from the saved file instead of only unlinking it. Verify the result by selecting across the redacted area in the exported file and pasting it into a text editor.

Every few months a court filing, a contract or a government report goes out with names blacked out, and within hours someone has posted the names. The document was not carelessly prepared — it looked correct on screen. The problem is that in a PDF, covering something and removing it are two completely different operations, and the one most tools make easy is the one that does not work.

Why a Black Box Is Not a Redaction

A PDF stores what a page says and what a page looks like in the same content stream, as a sequence of drawing instructions. The words are glyph-positioning commands. When you draw a filled rectangle over them, you have not edited those commands — you have appended one more instruction that paints black pixels afterwards. The text is still there, underneath, fully intact.

Recovering it takes no skill and no special software. Selecting across the blacked-out area and pressing copy lifts the words straight out. So does any text-extraction tool, any script using a PDF library, and in several common viewers simply dragging the cursor over the region highlights the hidden characters.

These are all the same mistake wearing different clothes:

  • Drawing a filled black rectangle with a shape or annotation tool.
  • Using a highlighter annotation set to black.
  • Painting over the area with an eraser or white-out tool.
  • Retyping the sentence on top of the old one.
  • Exporting to a new PDF afterwards, which carries the content stream along unchanged.

If you can still select the text under the black box, so can every person who receives the file. Looking at the page is not a test of whether the content is gone.

What Actually Removing Content Requires

There is one dependable way to remove text from a page while leaving the rest of the page looking exactly as it did: stop storing the page as text. The page is rendered to a raster image at high resolution with the redaction painted in, that image becomes the page, and the original content stream is thrown away. Nothing can extract the words afterwards because there is no longer a text layer to extract them from.

PDFixel renders the affected page at 2.5× scale, which keeps printed output and zoomed reading sharp rather than soft, then swaps the raster in for the original page.

The part almost nobody accounts for is the throwing away. Removing a page from a PDF's page tree does not delete anything — it only unlinks the reference. The page object stays registered in the file, its content stream untouched, and a raw parser reads it back out happily while the editor reports a clean save. PDFixel therefore deletes the original page from the file itself, together with its content stream, its form fields and everything else only that page used, so it is never carried into the file you download. The rest of the document stays as it was: bookmarks and links that pointed at the page now point at its flattened copy.

And if that removal cannot be completed, the export fails and produces nothing. Handing back a file that still contains the text while telling you it has been removed is worse than handing back no file, so that is the behaviour the tool chose.

When a page cannot be flattened for any reason, PDFixel does not quietly fall back and call it done. It names the page and tells you plainly that the redaction on it is only a black box over live text, and that the hidden text can still be extracted.

Step by Step: Redacting a Page

The work happens in your browser. The file is never uploaded, which matters more here than on most tasks — a document you are redacting is, by definition, one whose contents you do not want other people to have.

  • Open the PDF in the editor. Nothing is sent anywhere; the file is read straight from your disk into the page.
  • Pick the Redact tool, then drag a box over each piece of content you want removed. Cover the whole area, including any trailing punctuation or partially visible characters.
  • Check every page. Names and reference numbers tend to repeat in headers, footers and appendices, and a redaction applies only to the box you drew.
  • Export. Pages carrying a redaction are rasterised and their originals deleted from the file, which takes noticeably longer than an ordinary save — that pause is the work being done.
  • Read the notices on the result screen before you send the file anywhere. They are the record of what was and was not flattened.

What a Redacted Page Gives Up

Flattening is not free, and knowing the trade in advance is better than discovering it after you have sent the document.

The redacted page becomes an image. Its text stops being searchable and selectable — which is the entire point for the words you removed, but it applies to every other word on that page too. Pages you did not redact keep their text layers and are unaffected.

That page will usually also grow. A page of text is a few kilobytes of instructions; the same page as a 2.5× raster is a photograph. If size matters, compress the finished document afterwards rather than lowering the render quality.

Form fields on a redacted page go with it. The page is flattened as the PDF showed it, so a value you typed into one of its fields in the editor is not in the saved file. Fields on the other pages stay fillable. PDFixel tells you when a typed value was lost this way rather than leaving you to find out.

Most importantly: the eraser and the text editor are not redaction tools, and should never be used as substitutes. The eraser paints a white stroke over content and the words stay in the file. Retyped text is drawn over a white patch with the original wording still underneath. In both cases PDFixel lists the affected pages by number and tells you to use Redact if the content genuinely has to go.

Redact first, then compress. Doing it the other way round means recompressing a page you are about to replace with a raster anyway.

How to Verify the Text Is Gone

Never ship a redacted document on the strength of how it looks. Two checks take under a minute and are the only evidence that counts.

First, open the file you actually exported — not the editor tab — and try to select across each redacted area. Copy, then paste into a plain text editor. On a properly flattened page there is nothing to select and nothing arrives on the clipboard.

Second, run the exported file through a text extractor and read the output. Searching that text for the names or numbers you removed is a far more thorough check than dragging a cursor around, because it catches content in headers, footers and metadata that you may not have looked at.

Document metadata is worth a separate look. Author names, original filenames and editing history live outside the page content and no amount of redaction on the page touches them.

  • Select across each redacted area in the exported file, copy, and paste into a text editor.
  • Extract all the text from the file and search it for every term you removed.
  • Check the document properties for author names, titles and original filenames.
  • Re-read the export notices for any page the tool said it could not flatten.

Summary

Covering text in a PDF and removing it are different operations, and the easy one does not work — a black rectangle is just another drawing instruction painted over words that remain fully intact and recoverable. Genuine redaction means rendering the page to a raster and deleting the original page, content stream included, from the file rather than leaving it sitting there unlinked. That costs you the text layer on that page, some file size, and the form fields on that page, and it is the only approach that survives inspection. The eraser and the text editor do not qualify. Verify by extracting the text from the file you exported and searching it, because the page looking right proves nothing at all.

Need to do this now?

PDF Editor

Redact, edit text, fill forms and sign — with the page flattened locally so removed content is genuinely gone.

Open Tool

Related Articles

View all →