December 6, 2025 · Damien B., Founder of Redact PDF AI

How to Redact Sensitive Data from PDFs Using AI

Can AI detect sensitive data inside a PDF? Yes. An AI redaction tool reads the full text of a PDF (running OCR first if the file is a scan), recognises names, email addresses, phone numbers, postal addresses, dates, bank account numbers and card numbers, and then deletes those spans from the file rather than painting a black box over them. The output is a flattened PDF with no recoverable text layer.

Manual redaction fails in a predictable way: someone carefully blacks out every field they can see, saves the file, and ships it — not realizing the underlying text layer is still fully extractable. A PDF with a black rectangle drawn over a Social Security number is not a redacted document; it is a hidden-data document. One copy-paste proves it.

This guide covers what AI can and cannot detect, how to redact a PDF in five steps with Redact PDF AI, how to clean a document before you hand it to ChatGPT or another LLM, and how to automate the whole thing from Node.js.

Analyze with AI finds every name, date, address, email, phone number and IBAN in the lease; the downloaded PDF has them removed.

Why "Cover It Up" Is Not Redaction

Standard PDF editors let you draw black boxes over text. The problem: that text usually remains in the document's content stream. Anyone who opens the file in a text editor, runs it through a PDF parser, or simply copies the "blacked out" region can recover the original content.

Black box drawn over textTrue redaction
Text layerStill present, searchable, copyableRemoved from the content stream
Metadata and annotationsUntouchedStripped
Reversible?Yes, in secondsNo
Safe to share externally?NoYes

True redaction requires three steps:

  1. Detect the sensitive content (ideally automatically, to avoid human oversight errors).
  2. Destroy the content at the source — remove the characters from the content stream, not just paint over them.
  3. Flatten and rasterize the output so no editable layer, metadata field, or hidden annotation remains.

Redact PDF AI performs all three. Every redacted file is flattened and rasterized — there is no hidden text layer, and the original document metadata is stripped. The result is a solid-masked PDF that is irreversibly clean.

What AI Detects Automatically

The PII detection engine in Redact PDF AI recognizes eight categories out of the box. You switch each one on or off per upload:

CategoryWhat it catchesTypical documents
PersonFull names, initials, signatures in textHR files, contracts, court filings
EmailEvery standard email formatSupport exports, correspondence
PhoneNumberLocal and international formatsCVs, intake forms
AddressStreet, city, postal codeLeases, invoices, medical records
OrganizationCompany and institution namesDeal documents, due diligence
DateDates in any common formatBirth dates, appointment records
IBANInternational bank account numbersBank statements, payroll
CreditCardCard numbers across major networksReceipts, expense reports

Choosing categories per upload matters. A due-diligence file may contain company names you want to keep while personal names must go, so you would leave Organization off. You can also pin specific values in either direction: excluded terms keep a value visible even if the AI flags it (a project deadline like "March 15" that the Date detector would otherwise remove), and included terms force a value to be redacted even if the AI misses it (an internal codename, a case number).

AI OCR extends detection to scanned documents, faxes, and handwritten notes in over 100 languages. Inputs can be PDF, JPG, or PNG; the output is always a flattened, irreversibly-redacted PDF.

What AI does not do on its own: it will not know that a particular name is the one you are allowed to keep, and it cannot read text that is not there (an unreadable scan stays unreadable). That is why the workflow below keeps a review step before anything is applied.

Step-by-Step: Redacting a PDF with Redact PDF AI

1. Upload your file

Go to Redact PDF AI and upload a PDF, JPG, or PNG. Your first document, up to 5 pages, is free with no credit card. For multiple files, use the batch upload to process an entire folder at once.

2. Select PII categories

Choose which entity types to redact. For a standard HR document you might select Person, Email, PhoneNumber, and Address. For a financial statement you might add IBAN and CreditCard. Uncheck categories that are irrelevant to avoid unnecessary removals.

Add any excluded terms to protect specific values from being flagged, and included terms for values that must always disappear.

3. Run the analysis

The AI scans the document — including any scanned or handwritten content — and highlights all detected instances. For scanned files it runs OCR first, then entity detection on the recognized text.

4. Review in the Studio editor

The Studio lets you inspect every proposed redaction before committing. You can:

  • Accept or reject individual suggestions
  • Manually mark additional regions for redaction
  • Manually highlight content you want to preserve
  • Rotate pages for better review on mobile or desktop

5. Apply and download

Confirm your selections. The engine removes the content, flattens the PDF, and makes it available for download. With batch jobs, download everything as a single ZIP. The original file is deleted immediately after processing (ephemeral mode) or after 14 days — your choice.

Redacting a PDF Before Uploading It to ChatGPT or Another LLM

A growing share of redaction now happens for a new reason: people want to summarise, translate, or analyse a contract, a medical report, or a bank statement with ChatGPT, Claude, Gemini, or Copilot — without sending client names and account numbers to a third party. The public chat products may retain conversations and, depending on your plan and settings, use them for training, so a document should be cleaned before it leaves your machine.

The workflow is the same five steps above, with two adjustments:

  • Keep what the model needs to reason about. For a contract summary, redact Person, Email, PhoneNumber, Address, IBAN, and CreditCard, but consider leaving Date and Organization on the page so the LLM can still answer "when does this expire?" and "who are the parties?". Use excluded terms for any specific value you need preserved.
  • Use ephemeral retention. The original is deleted immediately after processing, so the only copy that persists is the redacted PDF you download and paste into the chat.

Because the output is rasterized, the LLM receives an image-backed PDF with no hidden text under the masks. Nothing can be recovered by asking the model to "read the redacted parts": there are no redacted parts to read. This is also why redaction, not a black-box overlay, is the right preparation step — a covered-up PDF handed to an AI assistant exposes every field the moment the model extracts the text layer.

Automating It: API and Node.js

If you redact sensitive data from PDFs on a schedule — every incoming invoice, every closed support ticket, every discovery batch — the REST API runs the same detection with the same per-job PII controls. A job is a multipart POST with the file, the categories, and the retention mode; you poll until the documents are redacted, then download the output:

const form = new FormData();
form.append('files', new Blob([fs.readFileSync('contract.pdf')], { type: 'application/pdf' }), 'contract.pdf');
form.append('pii_categories', '["Person","Email","PhoneNumber","IBAN"]');
form.append('retention', 'ephemeral');

const job = await fetch('https://www.redact-pdf.ai/v1/jobs', {
  method: 'POST',
  headers: { 'X-API-Key': process.env.REDACT_API_KEY, 'X-Idempotency-Key': 'invoice-2026-0912' },
  body: form,
}).then(r => r.json());

The full Node.js quickstart covers polling and download; there are matching Python and curl examples, webhooks for completion notifications, and an OpenAPI spec. Team members on Business or Enterprise plans can review batch results through shared org dashboards with role-based access.

Choosing the Right Retention Mode

Redact PDF AI offers two retention modes that affect how long your originals stay on the platform:

  • Ephemeral: Originals are deleted immediately after processing. Use this when the raw file must never persist on a server.
  • Studio: Originals and masks are retained for review. Use this when your team needs to audit redactions before finalizing or when you need multiple reviewers to sign off.

Both modes use AES-256 encryption at rest and TLS 1.2+ in transit. All data is hosted on Microsoft Azure in Europe (EU and Swiss regions). Documents are auto-deleted after 14 days at the latest — and never used to train AI models.

Compliance Considerations

Redact PDF AI's security posture covers the main compliance frameworks organizations encounter:

  • GDPR / Swiss DPA: Azure EU/Swiss hosting, data minimization by design, no content used for model training.
  • HIPAA: HIPAA-eligible under Microsoft's Business Associate Agreement. AES-256 at rest, TLS 1.2+ in transit.
  • SOC 2 Type II and ISO 27001/27017/27018: Third-party audited controls covering security, availability, and privacy.

See the full security overview for details.

Redaction Checklist Before You Share

Before distributing any redacted document, run through this checklist:

  • All target PII categories were selected before analysis
  • Excluded and included terms were reviewed for false-positive and false-negative risks
  • Studio review confirmed no missed instances in high-risk sections (footnotes, headers, tables)
  • File was downloaded as a new PDF (not the original)
  • Redacted PDF was opened in a second application and searched for known sensitive strings — none should appear
  • Original file deleted or confirmed auto-delete is scheduled

Frequently Asked Questions

Can AI detect sensitive data inside a scanned PDF? Yes. Scanned pages, faxes, and photographed documents have no text layer, so the engine runs OCR first and then detects entities in the recognised text. Detection quality follows scan quality: a legible 200 dpi scan is handled reliably, a blurry phone photo less so — which is what the Studio review step is for.

Can ChatGPT redact a PDF for me? Not safely. Asking a chat assistant to "remove the names" means uploading the unredacted document first, which is the exposure you were trying to avoid, and the result is a new text file rather than a redacted copy of the original. Redact the PDF before the upload, then use the assistant on the clean version.

Can I recover redacted content if I make a mistake? No. Redaction in Redact PDF AI is irreversible. The file is flattened and rasterized — there is no undo. Use the Studio review step to verify every redaction before you apply it.

Does the OCR work on poor-quality scans? Yes. The OCR engine is designed for real-world documents including faxes and handwritten notes across 100+ languages. Quality affects accuracy, but the system is built to handle degraded images.

What happens to my files? Files are stored encrypted on Azure in Europe. They are deleted immediately after processing in ephemeral mode, or within 14 days otherwise. Files are never used to train AI models.

Is there a free tier? Yes. Your first document, up to 5 pages, is fully redacted and downloadable for free with no credit card. After that, pay-as-you-go credits start at $10 for 50 pages, and monthly plans start at $50 for 1,000 pages.

Can I set default PII categories for my team? Yes. You can save default category selections so every upload in your organization starts with the same configuration, reducing setup time and the chance of missing a category.


For industry-specific guidance, see healthcare record redaction, accounting document workflows, and all use cases.


Related guides: How to redact a PDF (step-by-step) · What is PII? · How to securely redact bank statements