Why blacking out text in a PDF often fails
A black box over PDF text hides nothing: copy and paste brings the words back. See why it fails, three documented cases and a 5-step self-test.
A black rectangle drawn over text in a PDF does not remove the text. It only sits on top of it. Anyone can still select the words, copy them, search for them or pull them out with a simple tool. Real redaction removes the content from the file, or turns the page into a flat image.
What is the difference between what you see and what the PDF contains?
A sheet of paper has one layer. Ink on top hides ink below. A PDF is closer to a stack of transparent sheets. The text is stored as characters, each with a position on the page. A black rectangle is a separate object placed above them. Your screen shows the stack from the top. The file still holds every sheet.
The US National Security Agency made this point in its guidance Redacting with Confidence (2 February 2006). Black rectangles work on printed material. They are not effective, in general, for computer documents shared over networks. The NSA calls covering text with black the most common mistake.
How does copy and paste reveal blacked-out text?
Jane Example, a made-up sender, emails a contract as a PDF. She drew black boxes over her home address and her IBAN. The recipient selects all, copies, and pastes into a text editor. Both appear in full. The UK regulator, the ICO, shows the same test in its 2018 guide How to disclose information safely, on text blacked out with a highlighter: the black formatting is not copied across. Other ways in:
- Search. Type a masked name in the search box. If the viewer finds it, it is still there.
- Extraction. Text extraction tools and screen readers read the text layer, not the drawing above it.
- Editing. In a PDF editor, a rectangle added as a shape or an annotation can be moved or deleted.
Which public redaction failures are well documented?
Three cases stand out. Their sources: a US inspector general report (OIG-10-37, January 2010) and FCW for the TSA, the Columbia Journalism Review for Manafort, and The Register for the Commission.
| Year | Who | What went wrong |
|---|---|---|
| 2009 | US Transportation Security Administration (TSA) | An airport screening manual went online with black boxes over sensitive parts. Copying the text into another program revealed them. |
| 2019 | Lawyers of Paul Manafort, US federal court | A filing of 8 January had passages under thick black bars. A reporter pasted them into a new document and read them. |
| 2021 | European Commission | The published AstraZeneca vaccine contract was redacted, but redacted details were visible in the PDF bookmark view. The file was replaced. |
The TSA report is the most instructive. The redactions were not applied properly, and quality controls were missing. Staff believed their procedure produced a locked image, with no retrievable text under the black boxes. It did not. The file went online in March 2009. The alarm came only in December.
The Commission case shows a second trap. The bars may hold while a copy of the words lives elsewhere in the file: bookmarks, comments, document properties or an attachment.
What does a real redaction tool do differently?
It deletes the content. The ICO puts the goal in one line: redaction must irreversibly remove the information from the copy you release. Adobe's Acrobat tutorial (as of September 2026) describes two stages: you mark the items, then you apply the redactions. Only then, Adobe says, are the redactions and hidden information permanently removed and saved to a new file.
Apple's guide for Preview on Mac says a redaction becomes permanent once you close the document. It also warns that table of contents entries linking to redacted text are not removed. So check the side panels too, and always work on a copy.
Is turning the pages into images a safe alternative?
Yes, if the bars are burned into the picture. Flattening, or rasterizing, turns each page into an image. Letters and bars all become pixels. No text layer is left, so nothing sits under the bar. The ICO's 2018 guide says redaction software generally works this way. So does LibreOffice: its help page says the redacted content is replaced by a block of pixels. This route has a price.
- No selectable text. The ICO notes that the result is no longer machine-readable. The text can no longer be copied, searched or processed.
- Less accessible. The TSA report noted that locked image files stop assistive technology from reading the text that was not redacted.
- A heavier file. A page stored as a picture usually takes more space than the same page stored as letters.
ONYRI Sanitize, the tool made by the publisher of this blog, combines automatic detection with flattening. Detection and masking run inside the browser, the file is never uploaded, and the export is always a flattened PDF or PNG with nothing under the masks. Its limits: detection is not exhaustive, so you review each item in the preview. There is no restore function, so keep your original.
How can you test your own PDF in five steps?
- 1Take the final file, the exact one you will send. Reopen it in a different PDF viewer, such as a web browser.
- 2Select all, copy, and paste into a plain text editor. No masked word may appear. A flattened file pastes nothing.
- 3Search for a name or number you masked. You must get zero results.
- 4Open the side panels: bookmarks, comments, attachments, document properties. Look for masked words and the author's name.
- 5On a copy, in a PDF editor, move or delete a black bar. If words appear underneath, the redaction failed. Start again with a real tool.
The TSA report makes the case for this routine: a text search was the office's only quality check, with no second reviewer. So ask a colleague to run the five steps too.
Frequently asked questions
- Does Print to PDF or Save as PDF remove the text under a black box?
- Not reliably. According to the ICO (UK), the PDF format can keep the black mark as mere formatting, with the text still underneath. Printing, blacking out and scanning is a fallback named by the Saxony and Lower Saxony authorities (Germany). Both warn that marker ink can stay readable against a lamp or with image filters. Lower Saxony advises covering or cutting out the passages, then copying the sheet.
- Is white text any safer than a black box?
- No. The ICO describes text hidden by matching the font colour to the background, white on white or black on black. It stays in the file, and highlighting it or changing the font colour exposes it. The ICO says this practice should be avoided.
- Can a black box on a screenshot or a photo be removed?
- Sometimes. In a layered image file, the box can sit on its own layer and be removed. The ICO advises exporting the redacted image to a simple un-layered format. The Lower Saxony authority (Germany) agrees: an opaque black bar, then a format without layers such as JPG. It advises against blur and pixelation.
- Is a failed redaction a personal data breach under the GDPR?
- It can be (EU). Article 4(12) of the GDPR covers the unauthorised disclosure of personal data. Under Article 33(1), the controller notifies the supervisory authority without undue delay and, where feasible, within 72 hours of becoming aware of it, unless the breach is unlikely to result in a risk to people's rights and freedoms. Replace the file and alert your data protection officer, if you have one.
Sources & references
- Redacting with Confidence: How to Safely Publish Sanitized Reports Converted From Word to PDF (report I333-015R-2005, 2 February 2006) — US National Security Agency, copy archived by the Internet Archive
- How to disclose information safely, version 1.2 (PDF) — Information Commissioner's Office (UK)
- TSA's Breach of Sensitive Security Information (Redacted), report OIG-10-37, January 2010 (PDF) — US Department of Homeland Security, Office of Inspector General
- In wake of TSA breach, a refresher on redacting PDFs (9 December 2009) — FCW / Nextgov
- Thank you to everyone who can't redact documents properly (10 January 2019) — Columbia Journalism Review
- European Commission redacts AstraZeneca vaccine contract, but forgets to wipe the bookmarks tab (29 January 2021) — The Register
- Remove sensitive information (Redact a PDF tutorial) — Adobe Experience League
- Annotate a PDF in Preview on Mac (Redaction Selection tool) — Apple Support
- Redaction — LibreOffice Help, The Document Foundation
- Datenschutzkonformes Schwärzen: Darauf sollten Sie achten! (30 August 2024, in German) — Sächsische Datenschutz- und Transparenzbeauftragte
- Hinweise zum Schwärzen von Dokumenten (as of July 2025, in German) — Der Landesbeauftragte für den Datenschutz Niedersachsen
- Regulation (EU) 2016/679 (GDPR), Articles 4(12) and 33 — EUR-Lex
Mask a document without uploading it
ONYRI Sanitize finds names, identifiers, bank details and secrets in a PDF, a Word file or a scan, and masks them in your browser. You check the preview, then download a flattened copy.