Skip to main content
Online PDF Editor Team

How to Redact a PDF: Remove Sensitive Info Safely

True redaction permanently removes text/images — not just covers them. Learn why black boxes aren't enough, and how to properly redact (with tool gap disclosure).

redact pdfpdf redactionremove sensitive infopdf securitydata privacy
PDF document with properly redacted text showing black bars over sensitive information

What Is Redaction?

Redaction is the permanent removal of sensitive content from a document — text, images, metadata — so it cannot be recovered by any means. Not hidden. Not covered. Removed. The underlying data structures are rewritten; the bytes are gone.

This is not the same as drawing a black rectangle over text. That's "masking" — the text is still there, selectable, copyable, searchable, extractable. True redaction is surgical: the content is excised from the PDF's internal streams.

Why Black Boxes (Highlighter/Shapes) Fail

We've all seen the news: government report released with "redacted" black highlighter boxes. Journalists select the text, copy, paste — the classified content appears in plain text.

Why? Because PDF annotations (highlighter, rectangle, text box) are layers on top of the page content. The original text layer underneath is untouched. Anyone with a PDF viewer can:

  • Select text "under" the black box → copy → paste
  • Delete the annotation object → text revealed
  • Search (Ctrl+F) → finds the "redacted" words
  • Extract text via CLI tools (pdftotext, pikepdf) → gets everything
  • Accessibility tools (screen readers) → read the hidden text

This isn't a bug — it's how PDF works. Annotations are separate objects. The page content stream is separate. Redaction must modify the page content stream, not add an annotation.

What Proper Redaction Does

  • Removes text/glyphs from the page content stream — the drawing commands for those characters are deleted
  • Removes images or image regions — the image XObject is replaced or cropped
  • Removes metadata — XMP, document info, hidden layers, revision history
  • Sanitizes — scrubs JavaScript, form actions, embedded files, annotations
  • Applies visual marker — optional colored box (black, red) with "Redacted" label, purely cosmetic
  • Rebuilds cross-reference table — ensures file integrity after removal

The result: the content is gone. Not hidden. Not recoverable. The file size often decreases (removed streams).

Free Redaction Options (With Honest Gaps)

Adobe Acrobat Pro (Paid) — Gold Standard

Tools → Redact. Mark for redaction → Apply. Sanitizes metadata. Certifies redaction. $239/year.

PDF-XChange Editor (Windows, Freemium)

Free tier includes redaction. Mark → Apply. Good for Windows users. Watermarks on some free outputs.

iLovePDF / Smallpdf / Sejda (Server-Based, Freemium)

Upload → redact → download. Free tiers: limited pages/day. Your document uploads. Not for sensitive data.

Our Toolkit — No Redaction Yet (Client-Side Gap)

We don't offer redaction. Why? True redaction requires modifying page content streams — surgically removing glyphs/images from the PDF's drawing commands. This is complex C++ logic (parsing content streams, identifying text runs, rebuilding streams). Porting to WebAssembly is feasible but heavy (large Wasm module, memory intensive). We're evaluating it for a future release.

For now: use a desktop tool (Acrobat Pro, PDF-XChange) for real redaction. Then bring the sanitized PDF to our toolkit for merge, compress, protect, watermark, page numbers — all client-side, private.

How to Redact Properly (Desktop Tools)

Adobe Acrobat Pro

  1. Tools → Redact
  2. Mark for Redaction → Text & Images / Pages / Find Text
  3. Select content to redact
  4. Apply → Save
  5. Sanitize Document (removes metadata, hidden layers, scripts)

PDF-XChange Editor

  1. Home → Redact
  2. Mark Region / Mark Text
  3. Apply Redactions
  4. File → Save As

Verification Step (Critical)

  1. Open redacted PDF
  2. Ctrl+F → search for redacted terms → should find nothing
  3. Select all (Ctrl+A) → copy → paste into Notepad → check for leaked text
  4. Run pdftotext redacted.pdf - (CLI) → verify output
  5. Open in text editor (VS Code) → search for redacted strings in raw PDF

Client-Side Workarounds (Our Toolkit)

If you can't use a desktop redaction tool, these client-side approaches reduce risk — but are not true redaction:

Rasterize → Redact Image → Rebuild PDF

  1. PDF to JPG at 300 DPI (or PNG for lossless)
  2. Open images in image editor (Paint, Preview, Photoshop, online)
  3. Paint black boxes over sensitive areas — on the image pixels
  4. Save images
  5. JPG to PDF to rebuild

Result: no text layer exists (it's all pixels). Black boxes are burned into pixels. Cannot be "selected away." But: file size larger, no searchability, no accessibility, quality depends on DPI.

Print to PDF (OS-Level)

Open PDF → Print → "Microsoft Print to PDF" / "Save as PDF" (macOS) → in print dialog, some drivers let you obscure content. But this is flaky — often preserves text layer.

Redaction Best Practices

  • Never use highlighter/shape annotations for redaction. Ever.
  • Always sanitize metadata after redacting — hidden data leaks more than visible text.
  • Verify programmatically — Ctrl+F is not enough. Use pdftotext or pikepdf.
  • Keep the original secure — redacted copy for distribution, original in vault.
  • Redact before converting — don't redact a Word doc then export to PDF. Redact the final PDF.
  • Use distinct redaction colors — black for classified, red for PII, blue for proprietary — helps reviewers verify.
  • Document what was redacted — redaction log (page, reason, authority) for audit trail.

FAQ

How do I redact a PDF for free?

Desktop: PDF-XChange Editor (Windows, free tier). Server-based: iLovePDF/Smallpdf (free tiers, upload required). Client-side browser: not currently available (we're evaluating).

Can I redact a PDF online?

Yes — server-based tools (iLovePDF, Smallpdf, Sejda). But your document uploads. For sensitive data, use desktop tools.

How do I remove sensitive information from a PDF?

True redaction (Acrobat Pro, PDF-XChange) permanently deletes content. Masking (black highlighter) does NOT work — text remains selectable/copyable.

Is blacking out text in a PDF secure?

No. Drawing a black box (annotation) leaves the text underneath intact. Anyone can select, copy, or extract it. You must use a true redaction tool that modifies the page content stream.

Can I redact a PDF in the browser?

Server-based: yes (upload required). Client-side: not yet widely available. Our toolkit doesn't have redaction yet — it's on our roadmap.

What's the difference between redaction and highlighting?

Redaction = permanently removes content from the PDF stream. Highlighting = adds an annotation layer on top. The content remains underneath, fully recoverable.

How do I verify a PDF is properly redacted?

Ctrl+F search for redacted terms. Select all → copy → paste. Run pdftotext. Check raw PDF in text editor. If any redacted text appears: redaction failed.

Need to work with redacted PDFs? Our toolkit handles the rest: Merge PDF, Compress PDF, Protect PDF, Watermark PDF, Add Page Numbers. All client-side. Free. Private.