Skip to main content
Back to blog
7 min read

How to redact a PDF in your browser, without uploading sensitive data

Redacting bank statements, ID scans, or contracts on a server you don't control is the privacy version of asking a stranger to hold your wallet. Here's the browser-only alternative, pattern-detect emails / SSNs / cards or paint black bars manually.

You've seen the headlines: someone screenshot-redacts a court filing in Word with a black highlight, exports a PDF, and the marked-up text is fully selectable underneath. Or a journalist publishes a leaked memo with names "blacked out" that anyone can copy-paste to read.

Redaction is one of those tasks that lookstrivial and is in fact subtle: the visible bar must be there AND the underlying text must be gone. Free online redaction tools that require you to upload your sensitive PDF first are also a bad deal, you're paying with the entire document to hide a few characters.

The browser-only approach

LovedPDF's redactor does the whole job in your browser. Two redaction paths, both private:

  1. Pattern detection. Toggle on email addresses, phone numbers, US SSNs, credit card numbers, IBANs, IPv4 addresses, Indian PAN, Indian GSTIN, we scan all pages, show you every match with context, you select which to redact.
  2. Custom words / regex. Type a name, an account number, or a regex (e.g. EMP-\d4) and we'll find every instance.

What "real redaction" means

Three properties matter, in order:

  • Visual coverage. A solid opaque rectangle painted over the area. This is the bit most tools get right.
  • Text removal.The underlying text in the PDF's content stream is replaced or deleted so it can't be selected or copied through the box. Many tools skip this step.
  • Metadata scrub. Author, title, creator software, edit history, all stripped. Important for documents that came from corporate templates.

Common "redacted but not really" failure modes

  • Highlighter tool in Word/Pages. Just changes the colour behind the text. Underlying text fully present.
  • Drawing a black rectangle as an annotation.PDF annotations sit on top of the page; they don't modify the page content stream. Selectable underneath.
  • Black text on black background. Copy-pasteable and the colours are stored separately from the glyphs.
  • Image-overlay screenshots. Some tools take a screenshot of the page and paste it back as an image. This works for visual + text removal but bloats the file and ruins searchability everywhere else.

When to use server-side redaction instead

Browser-only redaction handles the 90% case. For the remaining 10%, when the source PDF has unusual encodings, complex non-Latin scripts, or you need court-grade redaction with an audit log, you'll want a desktop tool like Adobe Acrobat Pro or open-source LibreOffice with the right scripts. The browser still beats a random web tool because at least the desktop app doesn't upload anything.

A workflow we'd trust

  1. Run pattern detection in /redact-pdf
  2. Add custom words for specific names / IDs
  3. Use /edit-metadata to strip the Author, Title, Subject, Keywords, Creator fields
  4. If the document needs to be image-only for extra paranoia: /pdf-to-jpg then /jpg-to-pdf
  5. Test: open the result, try to select text in the redacted area, try to copy. Should give junk or nothing.

Related

Tools mentioned in this post

Read next