PDF Redactor – True PII Redaction (Emails, Phones, IBAN, Cards)
Pricing
from $10.00 / 1,000 pdf redacteds
PDF Redactor – True PII Redaction (Emails, Phones, IBAN, Cards)
Redact PDFs for real: automatic PII detection (emails, phone numbers, IBAN, credit cards with Luhn check, SSN and national IDs, dates) plus your own terms and regex. Redacted text is permanently removed, not just covered, and verified by re-extraction. OCR for scanned pages. No external APIs.
Pricing
from $10.00 / 1,000 pdf redacteds
Rating
0.0
(0)
Developer
Camp8 fr0
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
a day ago
Last modified
Categories
Features
Share
PDF Redactor – Permanently Redact PII from PDFs (Emails, Phones, IBAN, Credit Cards, SSN)
PDF Redactor finds personal data in PDFs and removes it for real. Many "redaction" tools just draw a black rectangle over the text, and the hidden text can still be copied or extracted. This Actor rebuilds every affected page without the redacted content, then re-extracts the output and verifies that none of the redacted text survives. It detects emails, phone numbers, IBANs, credit card numbers (Luhn-checked), SSNs and national IDs, dates, IP addresses and URLs, plus your own words, names and regular expressions, and can OCR scanned pages. Everything runs inside the Actor: no external APIs, and your documents never leave Apify.
What does PDF Redactor do?
- 🕵️ Built-in PII detection with validation to avoid false positives: IBAN mod-97 checksum, credit card Luhn + issuer prefixes, phone numbers validated with Google's libphonenumber (plus any number after Tel / Phone / Fax / Mobile labels), US SSN rules, UK NINO, IDs after keywords such as SSN, TIN, passport, tax ID, Steuer-ID, DNI, PESEL.
- ✍️ Custom rules: literal terms (names, companies, addresses, case numbers; case-insensitive, whole-word, robust to line breaks) and JavaScript regular expressions.
- 🔥 True removal: pages with redactions are re-rendered as images with opaque boxes; the original text, fonts and drawing operators of those pages are gone. Hidden text (white text, text under images, off-page text), comments, form-field values and links (
mailto:) on those pages are removed too. - 🔎 Still searchable: the non-redacted words are written back as an invisible text layer (optional), so the rest of the page can still be searched and copied. Redacted words are never written back.
- ✅ Verified output: the finished PDF is parsed again; every detector is re-run and every redacted string is searched for. If anything is found, the affected pages are rebuilt without a text layer; if it still fails, no file is produced and nothing is charged.
- 📄 Untouched pages stay original: pages without findings are copied unchanged (vector quality, small files), unless you choose Rebuild every page.
- 🧾 Redaction report: page, bounding box (PDF points, top-left origin), category, rule and a masked preview (
j**e.d*e@e*****e.com) for every redaction. The report contains no personal data unless you ask for it. - 🧹 Clean metadata: the output is a new document without the original title, author, XMP metadata, bookmarks, attachments or JavaScript.
- 🖨️ Scanned pages: optional OCR finds personal data on image-only pages.
- 🔐 Encrypted PDFs (password), detection-only mode, and an HTTP API (Standby mode).
Use cases
- GDPR / CCPA / HIPAA compliance before sharing documents with third parties
- Freedom-of-information (FOIA) and e-discovery releases
- Anonymizing documents for AI: remove personal data before sending PDFs to LLMs, RAG indexes or annotation teams
- Sharing invoices, contracts, bank statements and HR files without exposing contact details, bank accounts or IDs
- Auditing: run in detection-only mode to find out which documents contain personal data
How to use it
- Click Try for free and paste one or more PDF URLs.
- Choose which personal data to detect and add your own terms or regular expressions (optional).
- Enable OCR scanned pages if your PDFs contain scans.
- Click Start. Each PDF becomes one row with the redacted file (
outputUrl), counts by category, the verification result and the list of redactions.
Call it as an HTTP API (Standby mode)
# GET with query parameterscurl "https://<your-standby-url>/?pdfUrls=https://example.com/contract.pdf&piiTypes=email,phone,iban" \-H "Authorization: Bearer <APIFY_TOKEN>"# POST with a JSON body, redacted PDF inline as base64curl -X POST "https://<your-standby-url>/" \-H "Authorization: Bearer <APIFY_TOKEN>" -H "Content-Type: application/json" \-d '{"pdfUrls":["https://example.com/contract.pdf"],"terms":["Jane Doe"],"regexes":["CASE-\\d{6}"],"returnBase64":true}'
Response: { "count": 1, "items": [ ... ] }
You can also use the Apify API (run-sync-get-dataset-items), the Apify MCP server, Make, Zapier, n8n and other integrations. AI agents can pay per call with x402 (USDC) through Apify's agentic payments, without needing an Apify account.
Input example
{"pdfUrls": ["https://raw.githubusercontent.com/invoice-x/invoice2data/master/tests/compare/QualityHosting.pdf"],"piiTypes": ["email", "phone", "iban", "credit_card", "national_id"],"terms": ["Jane Doe", "Project Falcon"],"regexes": ["INV-\\d{6}"],"ocrScannedPages": false,"keepTextSearchable": true,"dpi": 200}
| Field | Description |
|---|---|
pdfUrls | PDFs to redact (also data:application/pdf;base64,...) |
piiTypes | email, phone, iban, credit_card, national_id, date, ip_address, url |
terms / regexes | Your own literal terms and JavaScript regular expressions (/pattern/flags or plain) |
caseSensitive / wholeWords | Matching options for terms (default: case-insensitive, whole words) |
phoneCountry | Two-letter code (e.g. US, DE) to also detect national numbers without + |
ocrScannedPages / ocrLanguage | OCR pages without a text layer (charged per page) |
keepTextSearchable | Write the non-redacted words back as invisible text (default on) |
rasterizeAllPages | Rebuild every page, not only pages with findings |
dpi | Resolution of rebuilt pages (100-400, default 200) |
boxColor | Redaction box colour (default #000000) |
includeMatchedText | Put the original matched text in the report (default off) |
outputPdf | Turn off for detection-only runs |
maxPages | Larger PDFs are rejected (no partial redaction) |
password | Password for encrypted PDFs |
returnBase64 | Standby API only: include the redacted PDF as base64 |
Output example
{"pdfUrl": "https://raw.githubusercontent.com/invoice-x/invoice2data/master/tests/compare/QualityHosting.pdf","outputUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/QualityHosting-2e4c9135c0db-redacted","pageCount": 2,"redactionCount": 9,"categories": { "phone": 4, "email": 3, "iban": 2 },"redactedPages": [1, 2],"rebuiltPages": [1, 2],"ocrPages": [],"verification": { "passed": true, "checkedPages": 2, "bannedStrings": 5, "leaks": [] },"redactions": [{ "page": 1, "category": "phone", "bbox": { "left": 68.8, "top": 792.4, "width": 64.1, "height": 9 }, "source": "text", "preview": "+** 6**1 9*6 ** **" },{ "page": 1, "category": "email", "bbox": { "left": 76, "top": 816.5, "width": 72.4, "height": 9 }, "source": "text", "preview": "i**o@q************g.**" },{ "page": 1, "category": "iban", "bbox": { "left": 415.4, "top": 800.3, "width": 88.9, "height": 9 }, "source": "text", "preview": "D********************7" }],"outputBytes": 528697,"processingMs": 712}
source is text, ocr or annotation:<type> (form field, comment, link). Annotation findings that are not visible on the page have bbox: null: they are removed together with the rebuilt page.
Pricing
This Actor uses pay-per-event pricing:
| Event | Price |
|---|---|
| PDF redacted (any number of pages, verification included) | $10 per 1,000 PDFs ($0.01 each) |
| OCR page (only with OCR scanned pages) | $3 per 1,000 pages ($0.003 each) |
Failed downloads, broken PDFs and outputs that fail verification are free. Apify platform usage (compute) is billed separately. Set Maximum cost per run to cap your spend. A PDF is either fully processed or not at all: if the OCR it needs doesn't fit into the remaining budget, it is skipped rather than partially redacted.
FAQ
Is the redaction really permanent? Yes. Pages with findings are replaced by freshly rendered images with opaque boxes; the original text objects of those pages are not copied into the output. The output is then re-parsed and checked for every redacted string and every PII pattern. Pages without findings are copied unchanged; enable Rebuild every page if you also want to strip hidden layers and comments from those.
Why is the redacted page an image? Rebuilding the page as an image is the only method that is guaranteed to work on every PDF (any font encoding, Type 3 fonts, text drawn in pieces, overlapping objects). With Keep remaining text searchable the page still behaves like a text page for search and copy, minus the redacted words. File size grows by roughly 100-500 KB per rebuilt page at 200 DPI.
How accurate is the detection?
Validated detectors (IBAN checksum, Luhn, libphonenumber) give very few false positives. Phone numbers without a + are only detected after a label (Tel, Phone, Fax...) unless you set phoneCountry. Names are not detected automatically: add them as terms. Always review the report for sensitive releases.
Does it work with scanned PDFs?
Yes, with OCR scanned pages (Tesseract, 100+ languages). Without it, image-only pages are listed in scannedPagesNotChecked with a warning. Handwriting is not reliably recognized.
What is not covered? Text drawn as vector outlines (no text layer, but not a scan either) and text inside images on pages that do have a text layer are not analyzed. Rotated text is found and boxed, but not written back to the searchable layer. Pure XFA forms are rendered as their placeholder page.
Which languages are supported? Pattern detectors are language-independent; keyword-based detectors understand English, German, French, Spanish, Italian, Dutch and Polish labels. Terms work in any language and script. OCR supports all Tesseract languages.
Is it legal? Is my data private? Redacting personal data is how organisations comply with GDPR, CCPA and FOIA obligations; you remain responsible for checking that the result meets your legal requirements. Files are processed inside your Apify run and stored only in your run's key-value store; nothing is sent to third-party services, and the report masks the redacted values by default.
Licenses? pdf.js (Apache-2.0), @cantoo/pdf-lib (MIT), libphonenumber-js (MIT), tesseract.js and tessdata (Apache-2.0), @napi-rs/canvas (MIT). All allow commercial use.