Sanitize.
Guides

How to redact an SSN from a PDF, and check it's really gone

A black box drawn over a number leaves the number in the file. Here's how to remove it for real and confirm it worked.

Updated · How we write these guides

The short answer

Use a tool that deletes the text, not one that draws over it. Acrobat Pro's Redact tool, Preview's Tools > Redact on a Mac and LibreOffice Draw's Redacted Export all remove it. You can also cover the number with any tool and then flatten each page to an image. Afterward, search the file for the number and try to copy the text under each box. If neither turns it up, it's gone.

Why a black box isn't enough

A PDF page is a list of drawing instructions. One instruction draws your SSN. If you add a black rectangle, the file gains another instruction that paints over it. The SSN is still in the file. Anyone can select it, copy it, or search for it, and an AI tool that reads the text layer never sees the box at all.

This is how a lot of supposedly redacted documents leak. In January 2019, lawyers for Paul Manafort filed a court document with black bars over sensitive passages, and reporters revealed the hidden text by copying and pasting it. In December 2025, readers did the same with some redacted pages in the Justice Department's Epstein file releases. Purpose-built tools aren't immune either: a 2023 academic study of 11 PDF redaction tools found two that left the redacted text in the file.

It happens to SSNs all the time. A Federal Judicial Center study published in April 2026 sampled federal court filings and found 22,391 exposed SSNs and ITINs. Filers had tried to redact a third of them. In one case, 6,198 SSNs sat under black boxes that anyone could remove or copy around.

Real redaction removes the text from the file. Afterward there's nothing under the box to recover.

Three ways to do it properly

1. A redaction tool that deletes the text

Use a feature that's actually called Redact, not a highlighter, shape or comment tool.

  • Adobe Acrobat Pro. Use the Redact tool, mark each SSN, then apply. Its "Find text" option can mark every match at once. Then run the option to remove hidden information so metadata goes too.
  • Preview on a Mac. Since macOS Big Sur, Preview has Tools > Redact, which removes the text. The trap is the rectangle in the Markup toolbar. A filled black shape looks the same and removes nothing.
  • LibreOffice Draw (free). Open the PDF, use the Redact tool, then export with Redacted Export. The result is page images, so no text survives.
  • Stirling PDF (free, self-hosted). Has manual and pattern-based redaction. You write the patterns, so test them against your own documents.

2. Flatten the pages to images

If the page is a picture, there's no text layer underneath to leak. Redact with any tool, then export or print each page as an image and make a new PDF from the images.

Be careful with "Print to PDF". It usually keeps text as text, so the SSN under your box survives the print. You need an option that explicitly produces images, such as exporting pages as PNG or JPEG.

The cost is that the result isn't searchable and its text can't be copied out. That matters if you want to paste the text into an AI tool afterward.

3. Work from the text, not the PDF

If all you want is to ask an AI tool about the numbers, you may not need a PDF at all. Copy the text out, replace identifiers with placeholders such as [SSN_1], and paste the result. Search for each value in every format it might appear in: with dashes, without dashes, with spaces between the digits, and the last four alone.

Problems specific to tax forms

Tax PDFs are harder than ordinary documents, and a find-and-replace on 123-45-6789 often misses.

  • Boxed digit cells. Forms print an SSN as nine separate boxes. The text often comes out as 1 2 3 4 5 6 7 8 9, with pipes or line breaks between the groups.
  • Fillable form fields. Tax software often saves the SSN in a form field as well as on the page. Redacting the page can leave the field. Sometimes each digit sits in its own field, so no single field looks like an SSN.
  • Separated labels. The text can come out with the value far from its label, or before it. A rule that looks for "SSN" followed by digits won't fire.
  • Barcodes. Printed returns, state returns especially, can carry a 2D barcode holding the return data, SSNs included. Cover the whole barcode, because partial covers can be undone by its error correction.

Our W-2 and 1040 checklist lists every identifier on those forms.

How to check a PDF is really redacted

  1. Search the file for the SSN with dashes, without dashes, and for the last four digits.
  2. Drag-select across each black box and paste what you copied into a text editor.
  3. Click into form fields, or open the form-fields panel in your PDF app, and look for leftover values.
  4. Open the document properties and check the title, author and keywords.
  5. Look at the file name.

If any step turns up the number, the redaction failed. Start again from the original, not from the failed copy.

Doing it automatically

Sanitize handles the tax-form cases above: SSNs split across boxed cells, values stored in form fields, separated labels and barcodes. It then shows you every page to review before you download. The redacted PDF contains flattened page images with the covers burned in. The text download replaces each value with a stable placeholder, so you can paste it into an AI tool. Everything runs in your browser, and nothing is uploaded.

Questions

Can a redacted PDF be unredacted?

If the redaction only covered the text, yes, with nothing more than copy and paste. If the text was removed, or the page was flattened to an image, there's nothing left to recover. That's why checking the result matters more than which tool you used.

Can I redact a PDF for free?

Yes. LibreOffice Draw and Stirling PDF both do real redaction for free, and on a Mac, Preview's Redact tool removes text. Avoid free online editors that upload your file, since that hands a copy of the SSN to a stranger's server.

Does Print to PDF remove redacted text?

Usually not. Most print-to-PDF drivers keep text as text, so a black box printed over an SSN still leaves the SSN selectable. Export the pages as images instead.

Is it safe to redact a PDF in an online tool?

Only if the tool processes the file on your device. Many online PDF editors upload the file to their server to work on it. Check the tool's privacy notice, or check whether it still works with your Wi-Fi turned off.

Should I redact the last four digits of my SSN?

Yes, if the document is leaving your hands. The last four are what banks and phone companies use to verify you.

Can I redact an SSN on my phone?

Phone markup tools draw on top of the page, which is the black-box problem again. Use a tool that removes the text, or take a screenshot of the marked-up page and share the screenshot, which has no text layer. Check the screenshot covers the whole page you need.

How do I redact an SSN from a scanned PDF?

A scan is already an image, so a box drawn on it and then flattened covers the number for good. Check whether the scan has an invisible OCR text layer, which many scanners add. If you can select text on the page, that layer needs redacting too, or flatten the page to an image.

Sources

Redact it on your own computer

Sanitize finds SSNs, account numbers, addresses and the names you add, then gives you a redacted PDF and a text file to paste into an AI tool. It runs in your browser, and after setup it works in airplane mode. Redacted downloads up to 3 pages are free, with no account.

Open Sanitize

More guides