Calendar Icon White
October 21, 2026
Clock Icon
5
 min read

How to redact PDF?

How to redact a PDF so the data is really gone: manual steps, the Strac Redaction API with OCR, and automatic PDF redaction in Zendesk, Gmail, and AI tools.

How to redact PDF?
ChatGPT
Perplexity
Grok
Google AI
Claude
Summarize and analyze this article with:

TL;DR

  • Redacting a PDF means deleting sensitive data from the text layer, the images, and the hidden data inside the file. A black box drawn on top hides the words on screen and leaves them in the file.
  • Manual redaction works for one contract. It does not work for the PDFs that arrive every day as support attachments, email files, shared drive exports, and uploads to AI tools.
  • Strac redacts PDFs three ways in 2026: through the Redaction API, inline inside apps like Zendesk and Gmail, and for AI agents through MCP DLP.
  • OCR reads scanned PDFs and photos of IDs, and the same detectors run on every surface Strac covers, from SaaS apps to endpoint DLP.
  • This post covers PDFs. For redaction across every file type and app, start with data redaction software.

‍

What Is PDF Redaction?

PDF redaction is the permanent removal of sensitive content from a PDF. The words, numbers, or images are deleted from the file and replaced with a solid mark or a label like [REDACTED]. Anyone who opens the redacted copy sees the mark, and there is nothing underneath it.

A PDF holds data in more places than the page you see:

  • The text layer. The characters you can select, search, and copy.
  • Images. Scanned pages, photos of a driver's license, signatures, and screenshots pasted into a report.
  • Hidden data. Metadata such as author and file path, comments, form field values, bookmarks, attachments, and earlier versions saved inside the same file.

Real redaction clears all three. Covering text hides it from the reader. Redacting removes it from the file.

Why Most PDF Redaction Fails

Most redaction mistakes come from three habits.

The first is drawing a black rectangle or highlighting text in black. The page looks redacted, but the text layer is untouched. Select the area, copy it, paste it into a note, and the full Social Security Number comes back.

The second is searching a scanned PDF. A scan is a picture of text, so a search for "SSN" finds nothing, and the reviewer assumes the file is clean. Without OCR, the sensitive data stays in the image.

The third is forgetting the hidden data. A comment that says "customer's account number is in section 4" or a form field that still holds a date of birth will leak even when the visible page is perfect.

Then there is volume. A legal team redacts a handful of PDFs a week. A support team receives hundreds of PDF attachments a day: bank statements, medical forms, tax documents, ID scans. Nobody opens each one in an editor.

How to Redact a PDF by Hand

For a single file that needs a human decision on every line, manual redaction still makes sense. Follow these steps:

  1. Save a copy. Keep the original somewhere access-controlled and redact the copy.
  2. Use a real redaction tool. Open the PDF in an editor that has a redaction feature. Shape, highlight, and comment tools are not redaction tools.
  3. Mark text and areas. Select the words to remove, and use area selection for images, signatures, and scanned sections.
  4. Search for patterns. Search for names, account numbers, emails, and phone numbers so you do not rely on your eyes alone. Run OCR first if the file is a scan.
  5. Apply the redactions. Marking is not redacting. Until you apply, the content is still there.
  6. Remove hidden information. Clear metadata, comments, attachments, form data, and bookmarks.
  7. Save as a new file and test it. Search for a word you removed and try to copy text from a redacted area. Both should come up empty.

This works for a court filing or a records request. It breaks for an inbox, a ticket queue, or a shared drive with ten years of exports.

✨ How to Redact a PDF with the Strac Redaction API

The Strac Redaction API redacts PDFs in code, so you can build redaction into your own app, upload flow, or document pipeline. It takes three calls.

Step 1: Upload the PDF.

curl -X POST 'https://api.test.tokenidvault.com/documents' \
 -H 'X-API-Key: <api_key>' \
 -F 'file=@drivers-license.pdf'

Step 2: Redact it.

curl -X POST 'https://api.test.tokenidvault.com/redact' \
 -H 'X-API-Key: <api_key>' \
 -H 'Content-Type: application/json' \
 -d '{"document_id": "<document_id>"}'

Step 3: Download the redacted copy.

curl -X GET 'https://api.test.tokenidvault.com/redacted-documents/<document_id>' \
 -H 'X-API-Key: <api_key>' > redacted-drivers-license.pdf

Test keys start with sk_test_ and call the test endpoint. Live keys start with sk_live_ and call api.live.tokenidvault.com. Document uploads can be up to 10 MB.

What the API handles in 2026:

  • Scanned and image-based PDFs. OCR reads text inside scans, photos, and screenshots, so a photographed driver's license is redacted the same way as a typed form. The same engine reads JPEG, PNG, DOCX, XLSX, and .msg email files.
  • The data elements you choose. Pick from Strac's built-in detectors, such as Social Security numbers, passports, driver's licenses, bank accounts, card numbers, names, addresses, and API keys, or add your own with regex. The full list is in the Strac catalog of sensitive data elements.
  • The redaction style. Replace a value with [REDACTED], mask it as XXXXXXX, remove it entirely, or swap it for a link to the original in the Strac document vault, so an authorized person can still retrieve it.
  • Results without the values. The API reports which data types it found and where, not the sensitive values themselves, so the response does not leak what you just removed.

Full request and response details are in the Strac API docs. For keeping the original values usable in other systems, see data masking and tokenization vs encryption.

✨ Redact PDFs Before an AI Agent Reads Them

AI agents now open PDFs on their own: a W-2 in a shared folder, an invoice attached to a ticket, a contract pulled through an MCP connector. Whatever the agent reads goes into a prompt and then to a model provider.

Strac ships an open-source MCP server for this. Add it to Claude Code, Claude Desktop, Cursor, or VS Code, and the agent gets two file tools. detect_file scans a PDF and reports what sensitive data it holds without changing it. redact_file writes a redacted copy next to the original, never edits the source file, and refuses to overwrite it.

That tool redacts when the agent asks. Strac MCP integrations redact whether it asks or not: when an agent pulls a Drive file or a Salesforce record through MCP, Strac removes the sensitive data before the agent receives it. Asking an agent to redact is a request. Redacting at the connector is a control. Read more in MCP DLP and AI DLP.

Automatic PDF Redaction Where PDFs Actually Land

The API is for PDFs you control. Most sensitive PDFs arrive in apps you did not build. Strac connects to those apps through their APIs and redacts attachments as they arrive, plus the ones already sitting there.

✨ Strac: One Detection Engine for Every PDF

Strac runs the same detectors on the API, the MCP server, and every connected app, so a PDF is judged by one policy wherever it shows up.

  • Find it first. The PII scanner and data discovery and classification read PDFs, spreadsheets, ZIP files, and images across SaaS and cloud storage, including old files.
  • Detect accurately. Strac ships 191 built-in data elements across 10 categories, covering IDs from around 60 countries, financial accounts, health data, and secrets like AWS keys. Custom elements use your own regex or trained model.
  • Act in order. When Strac finds sensitive data in a PDF, it follows your policy:
    • Redact / mask. Removes the value from the PDF in Slack, email, tickets, docs, Google Drive, SharePoint, and Box.
    • Block. Stops the PDF from reaching an AI tool, a personal upload site, a USB drive, or an agent's context.
    • Warn and coach. Tells the person what was found and where the file should go instead.
    • Revoke access. Removes public links and outside sharing from PDFs that hold sensitive data.
  • Prove it. Every finding and fix is logged with time, location, data type, and action, ready for HIPAA, PCI DSS, SOC 2, and ISO 27001 evidence.

See DLP remediation for how each action works. SaaS integrations connect in under 10 minutes with no agent and no code.

Related reading:

Your PDF Redaction Checklist

  • ☐ Redactions are applied, not just marked or drawn
  • ☐ Scanned PDFs and images go through OCR before review
  • ☐ Metadata, comments, form fields, and attachments are removed
  • ☐ Support and email attachments are redacted as they arrive
  • ☐ Old PDFs in shared drives and cloud storage have been scanned
  • ☐ PDFs uploaded to AI tools and read by agents are checked first
  • ☐ Every redaction is logged for audits

The Bottom Line

Drawing a box on a PDF hides data from the person reading it, not from the file. Real redaction deletes the data from the text, the images, and the metadata, and in 2026 it has to happen in tickets, inboxes, drives, and AI tools, not only in an editor. Every other control fails eventually, so the data layer is the backstop: redact the PDF the moment it lands, and a leaked file holds nothing worth stealing.

‍Book a demo to see Strac redact PDFs across your stack.

🌶️ Spicy FAQs on How to Redact a PDF

Is redacting a PDF the same as blacking it out?

No. Blacking out draws a shape over the text, and the text stays in the file where anyone can copy it. Redacting deletes the text, image content, and hidden data, then puts a mark in its place. Only redaction removes the data.

Why not just use the redaction tool in my PDF editor?

An editor works one file at a time and depends on someone opening the file. Most sensitive PDFs arrive as ticket and email attachments that nobody reviews. Strac redacts them automatically inside Zendesk, Gmail, and Google Drive.

Will automatic redaction slow down my support team?

No. Strac removes only the sensitive values and leaves the rest of the PDF readable. Agents still see the statement period, the transaction list, and the form answers they need. You can also delay redaction until the ticket is solved.

Can automatic redaction catch everything in a PDF?

Not everything. Handwriting, very low-quality scans, and data types you never defined can slip past any tool. That is why legal disclosures still get a human review, and why redacting at every entry point matters: what does get caught never spreads.

Can I redact a PDF before uploading it to ChatGPT or Claude?

Yes. Strac checks PDF uploads in the browser and redacts or blocks sensitive data before the file reaches the AI tool, and does the same for agents through MCP. See AI data governance for the full picture.

Discover & Protect Data on SaaS, AI, MCP, Endpoints & Cloud
Strac provides end-to-end data loss prevention for all SaaS and Cloud apps. Integrate in under 10 minutes and experience the benefits of live DLP scanning, live redaction, and a fortified SaaS environment.
Trusted by enterprises
Data Security + Compliance Automation

Latest articles

Browse all

Get Your Datasheet

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Close Icon