PDF Text Redactor

Find and remove sensitive text from a PDF, entirely in your browser.

Free in-browser PDF text redactor. Search for a name, number or phrase and remove it from a text-based PDF's content streams so it cannot be copied back out. Uses native browser compression APIs — no upload, no server. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

How is this different from drawing a black box?

Drawing a black rectangle only hides text visually — it can still be copied or extracted underneath. This tool deletes the matched characters from the PDF's content streams, so a copy-paste from the output reveals nothing.

Redacting a PDF properly means the sensitive text must be gone, not just hidden behind a black box that anyone can remove or copy through. This tool searches a text-based PDF for a phrase you specify and deletes those characters from the file’s content streams, all inside your browser so the document is never uploaded.

How it works

A text-based PDF stores its visible text as literal strings inside content streams, usually compressed with FlateDecode. The redactor works directly on those streams rather than rendering the page and drawing over it:

  1. Parses the raw PDF bytes and locates each stream … endstream object.
  2. For FlateDecode streams, inflates the data using the browser’s native DecompressionStream("deflate") — no external library is needed.
  3. Inside the decoded text-showing operators (Tj and TJ), finds your phrase within the parenthesized PDF strings and replaces each matched character with a space, so the glyphs vanish from the text layer.
  4. Re-compresses the stream with CompressionStream, fixes the stream’s /Length, and reassembles a valid PDF for download.

Because the characters are removed rather than covered, selecting and copying the redacted region in the output yields nothing — the text is structurally absent, not merely hidden visually.

Why black boxes are not enough

This is the most important concept in document redaction. Drawing a black rectangle on a PDF is an annotation or a drawing instruction layered on top of the content stream — the text underneath is still there, still selectable, and still extractable by any PDF parser, copy-paste operation, or command-line tool. Numerous real-world disclosures of sensitive information have happened because organisations used visual overlay redaction rather than content-stream deletion. This tool removes the characters from the stream itself.

What this tool can and cannot redact

Works on: digitally created PDFs exported from Word, LibreOffice, InDesign, LaTeX, and most modern document tools. These store real text in content streams and the characters are literal ASCII or Unicode strings.

Does not work on: scanned PDFs where each page is a photograph with no text layer — the text is pixels, not characters, so there is nothing to delete from a content stream. Run OCR to generate a text layer first if needed.

May not work reliably on: PDFs using heavily subset-encoded fonts that store glyph indices instead of readable characters. In these cases the tool will report no match found even if the text is visible on screen, because the stored character codes do not correspond to the literal characters you typed.

Verification after redaction

Always re-open the downloaded PDF and:

  1. Try to select and copy the redacted area — paste into a text editor and confirm nothing appears.
  2. Use a PDF inspector or command-line tool to check the content stream if you need higher confidence.
  3. Never share the document without verifying — assume the redaction failed until you have confirmed it succeeded.

Everything runs locally in your browser; the PDF is never transmitted.