Sample redacted PDF: before, badly covered, and redacted
A fictional separation agreement in three versions, made for testing redaction tools and redaction checkers. Every name, number and address in it is made up, and each hidden secret is a unique code, so you can tell exactly which one leaked.
The unredacted agreement. Two pages, with a secret hidden in each of the places listed below, and a second saved revision.
The common mistake: black rectangles drawn over the visible secrets with a PDF library, then saved. Looks redacted. Isn't.
The output of this site's redaction tool for the same file, with the marks described below.
Try it yourself: open sample-covered.pdf in any PDF reader, drag across a black box, copy and paste. Then run both files through the redaction checker, or load the original into the redaction tool with its “Try it on a sample file” link.
What's hidden in the sample
The person and company are fictional. The data uses values set aside for examples, so none of it can belong to anyone:
- SSN 987-65-4329 is in the 987-65-4320 to 4329 block the Social Security Administration reserves for advertising.
- Phone (555) 010-0147 is in the 555-0100 to 0199 range reserved for fictional use.
- Email addresses use example.com, a domain reserved for documentation.
| Where | Code to search for |
|---|---|
| Page text (matter reference) | RDX-TEXT-7731 |
| Inside the signature image | RDX-IMAGE-5512 |
| Document title | RDX-INFO-2291 |
| Document author | RDX-AUTHOR-8830 |
| Document subject | RDX-SUBJECT-4415 |
| Document keywords | RDX-KEYWORDS-1204 |
| XMP metadata | RDX-XMP-6650 |
| Comment text | RDX-NOTE-3318 |
| Comment author | RDX-NOTEAUTHOR-9021 |
| Visible form field | RDX-FIELD-4410 |
| Hidden form field | RDX-HIDDENFIELD-7781 |
| Attached text file | RDX-ATTACH-5059 |
| Document JavaScript | RDX-JS-6120 |
| Bookmark title | RDX-BOOKMARK-3390 |
| Invisible (OCR-style) text | RDX-INVISIBLE-8842 |
| White text on the white page | RDX-WHITE-2207 |
| Text under a drawn black box | RDX-COVERED-1180 |
| Page 2 text deleted in the second saved version | RDX-REV1-6034 |
The redacted sample was made by searching for the name, the matter reference and the employee ID; confirming the email, phone, SSN-style and date matches; and drawing one box over the signature image. Nothing was done about the comment, the hidden field, the attachment, the script, the bookmark, the white and invisible text or the old revision: the tool drops them on its own because it copies nothing but page images.
Which secrets survive
| Hidden in the sample | Black rectangles drawn over it | Redacted copy from this tool |
|---|---|---|
| Text under a black box | Still in the file | Not in the file |
| An image under a black box | Still in the file | Not in the file |
| Title, author, subject and keywords | Still in the file | Not in the file |
| XMP metadata | Still in the file | Not in the file |
| A comment and its author | Still in the file | Not in the file |
| A filled-in form field | Still in the file | Not in the file |
| A hidden form field | Still in the file | Not in the file |
| An attached file | Still in the file | Not in the file |
| Document JavaScript | Still in the file | Not in the file |
| A bookmark title | Still in the file | Not in the file |
| White text on the white page | Still in the file | Not in the file |
| Invisible text (as in OCR layers) | Still in the file | Not in the file |
| Text deleted in a later save | Still in the file | Not in the file |
“In the file” means the secret could be read with a PDF text extractor, found in the raw bytes, or found after decompressing the file's streams. Test run 2026-12-01, pdf.js 6.5.438.
Full test results
Our test script builds these files, drives the real tool in a headless Chrome browser, downloads the result and checks it with code that is separate from the tool: text extraction with pdf.js, a search of the raw bytes, every compressed stream decompressed with zlib, the file structure read with pdf-lib, and the page images decoded and sampled at the exact spot where each secret was drawn. It also runs the same checks on the original and the badly covered file, which must fail. This is our own test, not an independent security audit.
Setup
- Passpublic pdf.js worker matches node_modules/pdfjs-dist
- Passthe sample page lists every hidden code
The sample hides what it should
- Passinput text layer contains the text, white, invisible and covered tokens · RDX-TEXT-7731, RDX-INVISIBLE-8842, RDX-WHITE-2207, RDX-COVERED-1180, Jordan Q. Avery, 987-65-4329, jordan.avery@example.com, (555) 010-0147, 03/14/1979
- Passinput's current revision no longer shows the revision-1 token
- Passrevision 1 (truncated at its %%EOF) contains the revision-1 token
Controls: the checks catch a bad redaction
- Passchecks fail on input (unredacted) · 7 of 7 checks fail: pdf.js text extraction; raw bytes have; every FlateDecode stream; no Info dictionary; no annotations, forms,; single revision (no; only page rasters
- Passchecks fail on naive black boxes · 6 of 7 checks fail: pdf.js text extraction; raw bytes have; every FlateDecode stream; no Info dictionary; no annotations, forms,; only page rasters
Redacting the sample in the browser
- Passmarks created in the UI · find matches 4, pattern matches 4, Marks (9)
- Passexport downloaded · separation-agreement-redacted.pdf 156299 bytes
- Passin-page self-check shows no problems · No selectable text in the copy. | All 9 marked areas are solid black in the copy (checked by rendering the copy). | None of the 7 marked words appear in the copy's text, metadata, file structure or text streams. | No met
- Passno page errors
The redacted copy (exact page images)
- Passpdf.js text extraction has no secrets · 0 chars extracted
- Passraw bytes have no secrets (plain, UTF-16, hex)
- Passevery FlateDecode stream inflated has no secrets · 4 Flate streams, 0 failed to inflate
- Passno Info dictionary or XMP metadata
- Passno annotations, forms, attachments, JavaScript, bookmarks
- Passsingle revision (no incremental updates) · 1 xref section(s)
- Passonly page rasters as images; original image data absent · 2 images for 2 pages
- Passpixels at every secret's drawn position are solid black · 10 regions
The redacted copy (JPEG page images)
- Passpdf.js text extraction has no secrets · 0 chars extracted
- Passraw bytes have no secrets (plain, UTF-16, hex)
- Passevery FlateDecode stream inflated has no secrets · 2 Flate streams, 0 failed to inflate
- Passno Info dictionary or XMP metadata
- Passno annotations, forms, attachments, JavaScript, bookmarks
- Passsingle revision (no incremental updates) · 1 xref section(s)
- Passonly page rasters as images; original image data absent · 2 images for 2 pages
- Passin-page render check: marked areas solid (JPEG tolerance) · All 9 marked areas are solid black in the copy (checked by rendering the copy).
A letter printed to PDF by Chrome, with embedded fonts
- Passpdf.js text extraction has no secrets · 0 chars extracted
- Passraw bytes have no secrets (plain, UTF-16, hex)
- Passevery FlateDecode stream inflated has no secrets · 2 Flate streams, 0 failed to inflate
- Passno Info dictionary or XMP metadata
- Passno annotations, forms, attachments, JavaScript, bookmarks
- Passsingle revision (no incremental updates) · 1 xref section(s)
- Passpixels at every secret's drawn position are solid black · 10 regions
- Pass“leave the last 4 digits” keeps 4321 visible · black share: last four 0.21, first kept digit 0.26 (987-65 is checked with the secrets above)
The redaction checker on all three files
- Passflags the unredacted input · flagged: covered, invisible, revisions, metadata, annotations, forms, attachments, javascript, terms; revisions shows rev-1 token: true
- Passfinds text under the black box in the input
- Passfinds the white and invisible text in the input
- Passflags the naive black-box file · flagged: covered, images, metadata, annotations, forms, attachments, javascript, terms
- Passcovered text list includes the name and SSN · Page 1: “RDX-TEXT-7731”; Page 1: “Jordan Q. Avery”; Page 1: “987-65-4329”; Page 1: “03/14/1979”; Page 1: “jordan.avery@example.com”; Page 1: “(555) 010-0147”; Page 1: “RDX-COVERED-1180”; Page 2: “Jordan Q. Aver”
- Passreports nothing to review on our output
- Passshort common words don't match binary data in our output · ClearWords you redactedNone of the 4 words appear in the text, metadata, annotations, file structure or any stream that holds text.“the”: not found“and”: not fo
Network during the whole run
- Passno request to another host
- Passno request carries file bytes, names or secrets · 212 requests, 0 with a body ()
Per hiding place
- Passnaive black boxes leave secrets in the file · left in the naive file: text, image, info, xmp, note, field, hiddenField, attachment, js, bookmark, white, invisible, rev1
- Passour copy leaves none of them
Run on 2026-12-01 with pdf.js 6.5.438.