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
- Search the file for the SSN with dashes, without dashes, and for the last four digits.
- Drag-select across each black box and paste what you copied into a text editor.
- Click into form fields, or open the form-fields panel in your PDF app, and look for leftover values.
- Open the document properties and check the title, author and keywords.
- 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
- Federal Judicial Center: Unredacted personally identifiable information in federal court PACER documents (April 2026)
- Bland, Iyer and Levchenko: Story Beyond the Eye: Glyph Positions Break PDF Text Redaction (2023)
- Columbia Journalism Review: the Manafort filing (January 2019)
- Apple: annotate and redact a PDF in Preview
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.
More guides
- Is it safe to upload your tax return to ChatGPT, Claude or Gemini?What ChatGPT, Claude and Gemini keep, train on and let people review when you upload a tax return, and three safer ways to get AI help with your taxes.
- How to use ChatGPT or Claude to review your tax returnA step-by-step way to have ChatGPT or Claude check your return: remove the identifiers, give it context, ask specific questions and verify the answers.
- What to redact on a W-2 and 1040 before you share themA box-by-box list of the identifiers on a W-2, Form 1040 and common schedules, what to keep for tax help, and the hidden places people miss.
- Bank statements and AI: upload, link with Finances, or redact first?Compare uploading a bank statement to ChatGPT, linking accounts with ChatGPT Finances, and redacting first: what each shares and what to remove.
- Can tax preparers use ChatGPT or Claude on client returns?Section 7216, the FTC Safeguards Rule and IRS OPR Alert 2026-19 applied to AI in a tax practice, with a workable AI policy for your WISP.