Secure PDF Redactor
Black out names, numbers or areas in a PDF for real: the text is removed, not just covered.
How it works
Finds words, phrases, regular expressions or typical personal data (e-mails, phone numbers, IBANs, card numbers) and any rectangles you specify, then rebuilds the affected pages as images with black boxes so the hidden text is truly gone. Optionally re-runs OCR so the rest of the page stays searchable, strips metadata, and proves the result with a text search of the output.
- Word positions come from Poppler (pdftotext -bbox-layout). Each text line is searched for your words/phrases (spaces may vary), regular expressions and the chosen patterns; every word that overlaps a match gets a black box with 1.5 pt padding. A match that wraps onto the next line is not found as one phrase; the final check reports it.
- Pages with at least one box are rendered to an image at the chosen DPI, the boxes are painted black into the pixels, and the page is rebuilt from that image. The original text, fonts and vector content of those pages are discarded — covering text with a black rectangle (the common mistake) would leave it copyable.
- With OCR on, Tesseract re-recognises the remaining visible text of rebuilt pages, so they stay searchable without the redacted words. Pages without hits are copied unchanged (text stays selectable).
- The document is reassembled with qpdf from scratch, which drops: Document information (title, author, subject, keywords, creator, producer, creation and modification dates); XMP metadata stream; Bookmarks (outline), named destinations and page labels; Attachments (embedded files) and document-level JavaScript; Interactive form (AcroForm) definitions; Page-level metadata and application data (/Metadata, /PieceInfo). With "Remove comments…" on, all annotations (comments, links, form widgets) are removed from every page.
- Patterns: phone numbers must start with +, 00 or a 0 trunk prefix, have 7–15 digits with the usual separators and are skipped when they are a date or part of an IBAN; card numbers must pass the Luhn checksum and are skipped inside IBANs.
- Verification: the text of the finished PDF is extracted again with pdftotext and every term and pattern is searched; the report lists matches before and after. Only "0 after" for every row means the text-level redaction succeeded.
Text inside images (scans, screenshots) and text drawn as outlines cannot be found by search; use areas for those, and always review the redacted pages visually before sharing.
Use this tool in an app
These free programs for your browser have this tool built in, next to everything else the task needs.
-
Paperwell Document studio: PDFs, OCR, redaction, forms & contract reading
Your paperwork in one dossier: PDF tools, OCR, redaction, forms and contract reading.
Related tools
- Searchable PDF OCR – Make scanned PDFs searchable and copyable with OCRmyPDF and Tesseract, optionally as PDF/A.
- PDF Form & Signature Studio – List and fill PDF form fields, and place a visible signature image or typed name on a page.
How to use the Secure PDF Redactor
Really remove names, e-mails, phone numbers, IBANs or areas from a PDF, so the text is gone and not just covered, and check the result with a built-in text search.
What it is for
Before you share a contract, a court document, an invoice or a report, some things must go: names, account numbers, contact details. The classic mistake is drawing black rectangles over the text in a PDF editor. The text underneath stays in the file and can be copied out in seconds.
This redactor does it properly. It finds your words or phrases, regular expressions, built-in patterns (e-mail, phone, IBAN, card number, date) and any areas you give in coordinates. Every page with a hit is rebuilt as an image with black boxes painted into the pixels, so the original text on that page is discarded. Optionally OCR makes the rest of the page searchable again. Metadata, bookmarks, attachments, JavaScript and form definitions are stripped. Finally, the output is searched again to prove the terms are gone.
Text inside images (scans, screenshots) can't be found by search. Use areas for those, and always look at the pages before sharing.
Worked example
A one-page invoice with the customer's name twice, an e-mail address, a phone number and an IBAN. Settings: term Maria Keller, presets e-mail, phone and IBAN, OCR on, 150 DPI.
Black boxes: 5; redacted pages: 1 of 1. Verified: none of the search terms remain in the text of the output.
The verification table:
| Term or pattern | Before | After |
|---|---|---|
| Maria Keller | 2 | 0 |
| E-mail addresses | 1 | 0 |
| Phone numbers | 1 | 0 |
| IBANs | 1 | 0 |
One box per hit: two for the name, one each for the e-mail address, the phone number +49 30 1234567 and the IBAN. The invoice number 2026-114 in the heading, the due date and the digits inside the IBAN are not phone numbers: the phone pattern only accepts numbers that start with +, 00 or a leading 0, have 7 to 15 digits, and aren't a date or part of an IBAN.
The re-OCR'd text still had the street, amount and due date, plus a few stray characters next to the boxes.
How to read the result
- Metrics: redacted pages, black boxes, matches left after redaction (must be 0) and file size.
- Verification callout and table: matches before and after for each term and pattern. Only "0 after" on every row means the text-level redaction worked.
- Black boxes: page, position and the reason for every box.
- Removed from the document: the metadata and structures that were dropped.
- Preview of the first redacted page and the download.
Tips and common mistakes
- Add name variants as separate terms:
M. Keller,Keller, Maria, the e-mail username. Search only finds what you list. - A phrase that wraps onto the next line isn't found as one phrase. The final check reports it, so add the parts as separate terms if needed.
- Presets are patterns, not a list of your data. The phone pattern needs a leading
+,00or0, so local numbers written without the trunk prefix (such as555 0132) aren't found; add them as terms. Check the box list, and use precise regular expressions such as\bDE\d{20}\bif a preset grabs too much or too little. - For signatures, stamps, photos and scanned pages, use areas (page, x, y, width, height in points from the top-left, or in %).
allapplies an area to every page. - Redacted pages become images. 150 DPI is readable; choose 300 DPI for small print.
- Keep "remove comments, links and form fields" on. Comments often repeat exactly the names you are hiding.
FAQ
Can the redacted text be recovered?
Not from the redacted pages: their original text and vector content are discarded and replaced by an image with the boxes burned in. Pages without hits are copied unchanged.
Why is part of my document no longer selectable?
Redacted pages are images. With OCR on, the remaining visible text is recognised again, so it can be searched, but it's OCR text, not the original.
Does it find text in scanned PDFs?
Not by search, because there's no text layer to search. Black out those parts with areas, or add a text layer first with the Searchable PDF OCR tool and check the preview carefully.
Which OCR languages are available?
English and German can be selected for re-OCR, if installed on the server. Pick the one that matches the remaining text.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://securepdfredactor.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://securepdfredactor.usefulweb.site/mcp· tool namesecure_pdf_redactor
Example request
curl -s -X POST https://securepdfredactor.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{…see OpenAPI examples…}'