pdfblah.com

Guide

How to redact a PDF (really remove the text)

Most "redaction" just draws a black rectangle over the words. The text is still in the file, so anyone can copy it, search it, or move the box aside. Real redaction takes the words out of the PDF. Here is how to do it properly.

Redacting text in a PDF, with a bar drawn and the change highlighted in a free preview

Why a black box is not redaction

Drawing a filled box over text only hides it visually. The characters are still in the content stream underneath. Select the area and copy, run pdftotext, or open the file in another viewer and the "redacted" text is right there. Plenty of real leaks have happened exactly this way.

The right way: delete the text, then mark it

Proper redaction removes the words from the PDF itself, so search and copy return nothing. A bar is drawn on top afterward only as a visible mark, over a spot that is already empty. pdfblah does both: it deletes the matched text from the content stream and draws the bar, so the bar never hides text that is still there.

Step by step

  1. Open pdfblah.com and drop in your PDF. It runs a quick check and shows what is inside.
  2. Add a rule and set the action to Redact. Type the text to remove (a name, an account number, an address).
  3. Pick the scope. Redact the first match, every match, or the Nth. You can ignore case, match whole words, or use a regular expression.
  4. Preview for free. You see a bar over each spot, and the change is highlighted, before you pay anything.
  5. Download. The words are gone from the file. Verify with copy, Ctrl+F, or pdftotext.

Redact a PDF now

Remove the text for real and see it before you pay.

Redact a PDF

Redact a lot of things at once

To remove every email, card number, IBAN, SSN, or phone number in one click, use the Scrub PII preset instead of typing each one.

From the command line

The same engine is open source:

pipx install pdfblah
pdfblah redact in.pdf out.pdf --find "Account 12345"
pdfblah redact in.pdf out.pdf --find "\d{3}-\d{2}-\d{4}" --regex   # every SSN

See the pdfblah project on GitHub.