Zero-Trust File & Document Sanitization

File Scrubbing: Local RAM PII Redaction Across PDFs, Office Docs & Images

Definition: File scrubbing removes Personally Identifiable Information (PII), Protected Health Information (PHI), payment card numbers, secrets, and hidden document metadata across all file layers before external sharing or AI analysis. Unlike visual black-box overlays that leave selectable text and author tags intact, client-side Zero-Trust Data Sanitization (ZTDS) scrubs visible text, scanned image pixels via local WebAssembly OCR, and binary metadata inside device RAM with zero server uploads.

0 Bytes
File Cloud Egress

100% local volatile RAM parsing

< 1 ms
Text Layer Latency

Zero WAN upload round-trips

3 Layers
Full File Coverage

Text, scanned OCR & binary metadata

30 Profiles
Industry Taxonomies

HIPAA, Legal, Finance, HR & DevOps

01 · Threat Surface Breakdown

Three Data Exposure Layers Inside Business Files (And Why Black Boxes Fail)

Most file leaks happen when users mistake visual concealment for data sanitization. Drawing black rectangles over a PDF in a preview tool, deleting a single spreadsheet tab, or pasting redacted paragraphs into an online converter leaves hidden identifiers embedded inside the underlying file container. Effective PII scrubbing must sanitize all three structural layers deterministically.

1. Selectable Text Streams & XML Runs

PDFs, Word documents (DOCX), and spreadsheets (XLSX/CSV) store characters as structured content streams, XML text nodes, cell formulas, and hidden worksheet columns. Superficial overlay boxes sit visually above the glyph stream; any recipient or parser can copy-paste the covered Social Security Number, IBAN, or client name directly out of the file. True file scrubbing mutates the underlying token or rasterizes and flattens the page completely.

2. Scanned Images & Rasterized Regions

Tax returns (IRS W-2 and 1040), medical intake packets, driver licenses, and signed contracts frequently arrive as image scans or screenshots inside PDFs. Standard text-regex scrubbers skip rasterized images entirely. PrivacyScrubber runs local WebAssembly OCR and canvas pixel burn-in completely inside browser memory to detect PII coordinates and burn permanent solid redactions over sensitive visual regions.

3. Hidden Binary Metadata & Revision Trails

Business files carry silent forensics even when every visible word looks clean. Office containers embed author names, company properties, tracked changes, and inline comments. Images store smartphone EXIF models, timestamps, and exact GPS latitude/longitude coordinates. PDFs retain XMP packets, Info dictionaries, and incremental save history. Client-side file scrubbing strips hidden metadata headers automatically before export.

02 · Format Coverage & Output Modes

Supported File Formats, Parsing Mechanics & Redaction Modes

Every file format introduces different leakage vectors. PrivacyScrubber applies specialized local RAM document parsing without transmitting bytes to external cloud APIs. Depending on whether the recipient is a frontier AI model (ChatGPT, Claude, Gemini) or an external human party (litigation discovery, auditor, regulator), teams select either Reversible Surrogate Tokenization or Permanent Flattened Blackout.

File TypeHidden Risks AddressedLocal RAM Scrubbing OutputRecommended Surface
Digital & Scanned PDF (.pdf)Selectable text layers, multi-column financial tables, embedded scanned pages, XMP/Info author metadataTokenized text extract with 1-click Reveal OR flattened solid blackout PDF with metadata strippedOffline PDF & OCR Workspace
Word Documents (.docx)Paragraph XML text, client signatures, tracked changes, author properties, headers and footersTyped surrogates ([NAME_1], [CONTRACT_ID_1]) ready for LLM contract review and local re-identificationDocument Sandbox (?mode=doc)
Spreadsheets (.xlsx, .csv)Multi-tab payroll ledgers, customer emails, national IDs, account balances while keeping ledger math intactCell-level tokenization with consistent entity indexing across rows and preserved numeric contextExcel & CSV Cell Scrubber
Images (.jpg, .png, .webp)EXIF camera serials, GPS coordinates, XMP provenance tags, and sensitive text photographed on screenBinary EXIF/GPS/XMP header strip + visual OCR coordinate blackout before vision model uploadWorkspace & SDK Vision Module
Code, Logs & JSON (.txt, .json, .log, .env)AWS keys, JWT tokens, PEM private keys, stack trace emails, nested JSON user records prior to RAG indexingSub-millisecond key/PII tokenization preserving JSON schema types, booleans, and timestampsPII MCP Server & Batch Zip

Mode A: Reversible Surrogates for AI Analysis

Blindly overwriting names and dates with identical [REDACTED] tags causes severe context rot—an LLM can no longer distinguish Plaintiff from Defendant or Opening Balance from Escrow Date. PrivacyScrubber maps distinct entities bijectively in local volatile RAM ([NAME_1], [NAME_2], [IBAN_1]). After ChatGPT, Claude, or Gemini returns its draft analysis, 1-Click Reveal restores real values on your machine. Teams can also pass sealed token dictionaries peer-to-peer via Protocol V5 Session Handoff without server storage.

Mode B: Permanent Visual Blackout & Batch Export

When preparing court filings, FOIA releases, HIPAA patient packet exports, or external vendor uploads where identities must never be recoverable, users switch to irreversible flattening and Bulk Folder Redaction. Pages are rendered into isolated canvas frames, sensitive bounding boxes are overwritten permanently in pixel memory, original metadata dictionaries are discarded, and multiple sanitized files export cleanly as a local archive.

03 · Architecture Tradeoffs

Local Client-RAM File Scrubbing vs. Cloud DLP Proxies vs. Manual Redaction

Organizations evaluating file scrubbing typically choose between endpoint RAM execution, centralized SaaS DLP inspection APIs, or manual redaction in PDF editors. Each architecture solves a distinct operational problem and carries concrete latency, compliance, and cost tradeoffs.

Evaluation CriterionPrivacyScrubber (Local RAM ZTDS)Cloud DLP / SaaS Proxies (e.g. Strac, Nightfall)Manual Desktop PDF Editors
Raw File Upload / Network Egress0 bytes leaving device; parses in local RAM100% of raw document must transit vendor cloud servers first0 bytes (unless saved to synced cloud drive)
Processing Latency<1ms text / local CPU WebAssembly OCR150ms–400ms+ network hop plus remote file queue time5–25 minutes per contract due to manual boxing
AI Prompt Compatibility (Reverse Reveal)Yes — deterministic bijective tokens restored locallyLimited; often destructive masking or gateway proxy requiredNo — permanently breaks automated entity correlation
EXIF & Document Metadata ScrubbingAutomatic binary EXIF/GPS/XMP and PDF info stripVaries by connector; frequently inspects text/storage buckets onlyRequires separate "Sanitize Document" step (often forgotten)
Third-Party Vendor / Subprocessor ScopeZero scrubbing-content backend subprocessorsRequires security review, vendor DPA, and BAA chainDesktop software licensing only
Air-Gapped & Offline EnvironmentsFull operation with Wi-Fi / Airplane Mode enabledNot possible; relies on SaaS control plane or APIsSupported offline after local install
Pricing ModelFree tier (15k/5k), PRO $15/mo ($110 lifetime), TEAMS $99/mo flatTypically quote-based enterprise SaaS or metered per-GB/API call$20–$30 per named user/month (per-seat licensing)
Engineering Decision Boundary: Choose a centralized Cloud DLP/DSPM platform (reviewed in our PrivacyScrubber vs. Strac analysis and DLP Latency Benchmark) when your security team strictly needs retroactive SaaS-at-rest scanning inside third-party cloud buckets like Slack, Salesforce, or Google Drive. Choose PrivacyScrubber when sensitive files must never leave user devices before reaching ChatGPT, Claude, Copilot, or local RAG vector pipelines.
04 · Empirical Verification

Verify Zero Cloud Egress in 60 Seconds (5-Step Airplane Mode Audit)

Security teams should never have to accept a vendor promise regarding document confidentiality. Every PrivacyScrubber file workflow can be audited independently in Chrome, Edge, or Brave using standard Developer Tools.

  1. Open the Document Workspace: Load the PrivacyScrubber File Workspace so static application scripts initialize cleanly in browser memory.
  2. Enable Network Inspection: Press F12 (or Cmd+Option+I), select the Network tab, enable Preserve log, and clear existing entries.
  3. Disconnect All Networks: Turn on operating system Airplane Mode, disable Wi-Fi, or toggle DevTools Network throttling to Offline.
  4. Scrub a Synthetic Sensitive File: Drop a multi-page PDF, DOCX contract, XLSX ledger, or geotagged JPEG photo and run OCR extraction, metadata stripping, and PII tokenization.
  5. Inspect Output & Export Compliance Receipt: Confirm zero outbound XHR/Fetch document packets appeared in DevTools, download the scrubbed artifact or copy tokenized output, and generate an offline-verifiable SHA-256 Audit Receipt.
05 · Statutory Risk Minimization

Industry-Specific File Scrubbing Workflows (30 Profiles)

Generic entity regex over-redacts financial metrics and under-redacts domain-specific IDs. PrivacyScrubber ships 30 dedicated vertical profiles tailored to preserve AI reasoning utility while supporting Technical Safe Harbor under GDPR Articles 25 & 32, Israel PPL Amendment 13 Sec. 17, SOC 2 Type II (CC6.1), and HIPAA Safe Harbor (45 CFR § 164.514(b)).

06 · Programmatic File & Image Pipelines

Automate File & Image Scrubbing with @privacyscrubber/sdk & MCP

Engineering teams embedding sanitization into backend ETL jobs, RAG ingestion pipelines, or AI coding agents can run the identical zero-egress engine headlessly in Node.js or over local stdio Model Context Protocol (MCP) — eliminating 500MB+ containerized NLP services and external subprocessor transfer exposure.

@privacyscrubber/sdk & /sdk/visionFull SDK Docs →
import fs from 'fs';
import { sanitize, restore } from '@privacyscrubber/sdk';
import { stripExifMetadata } from '@privacyscrubber/sdk/vision';

// 1. Strip binary EXIF/GPS/XMP from uploaded scans (<0.2ms)
const rawImage = fs.readFileSync('claim_scan.jpg');
const { cleanBuffer, bytesSaved } = stripExifMetadata(rawImage);

// 2. Scrub extracted document text before LLM or vector indexing
const { scrubbedText, tokenMap } = sanitize(docText, { profile: 'finance' });
@privacyscrubber/mcp-server (Local Stdio)MCP Config →
{
  "mcpServers": {
    "privacyscrubber": {
      "command": "npx",
      "args": ["-y", "@privacyscrubber/mcp-server"]
    }
  }
}
// Exposes sanitize_file, redact_file, audit_directory_for_pii,
// and generate_compliance_report inside Cursor, Claude & Windsurf.

Simple Flat Pricing — Zero Per-Page or Per-Character Metered Fees

Start free in browser RAM with zero accounts, or deploy unlimited team and pipeline capacity under flat pricing.

Compare Full Pricing Table →
Free & PRO Individual
$0 Free / $15 mo PRO

Free tier covers 15,000 chars General, 5,000 chars Specialized profiles, and single .txt/.docx files. PRO ($15/mo or $110 Lifetime) unlocks offline PDF/OCR, Excel, and batch files.

Launch File Workspace
TEAMS Flat Organization
$99 / month flat

Unlimited seats across the company. Includes Chrome Extension MDM policy lock, Outlook Pre-Send Guard, shared custom regex rules, and Protocol V5 encrypted session handoff.

Deploy TEAMS
Developer SDK Unlimited
$299 / mo ($2,990 / yr)

Unlimited backend production nodes, Node.js/TypeScript/Python pipelines, binary EXIF/GPS image stripping, and offline Ed25519 air-gapped license validation.

Explore Developer SDK

Frequently Asked Questions About File Scrubbing

How is client-side file scrubbing different from drawing black boxes on a PDF?

Drawing black boxes inside an everyday PDF viewer only covers visual text while keeping underlying character streams copyable and metadata intact. Client-side file scrubbing either replaces identifiers directly in the text layer with reversible surrogate tokens or runs local WebAssembly OCR and pixel burn-in before flattening the page and stripping author and XMP metadata.

Does PrivacyScrubber upload PDFs, Word files, or Excel spreadsheets to a cloud server?

No. All document parsing, OCR recognition, EXIF removal, and PII masking execute inside volatile client memory on your own device with zero bytes transmitted to external scrubbing servers. You can verify this by disconnecting from the internet and scrubbing a test file in Airplane Mode.

Can I scrub images and scanned PDFs without losing readable layout?

Yes. For scanned PDFs and photos, local WebAssembly OCR extracts text inside browser memory for prompt tokenization, or burns solid blackouts directly over matched PII coordinates while preserving surrounding clauses, tables, and numerical schedules cleanly.

How does reversible scrubbing work when sending file text to ChatGPT or Claude?

Instead of overwriting sensitive entities with identical redaction strings that confuse LLMs, PrivacyScrubber maps each person, organization, or ID deterministically to numbered tokens like NAME_1, IBAN_1, and EMAIL_1. Once the AI completes its summary or draft, one click restores the original identities inside your local browser memory.

What hidden metadata gets removed during image and document scrubbing?

Image binary scrubbing strips EXIF camera identifiers, timestamps, GPS latitude and longitude coordinates, and XMP headers from JPEG, PNG, and WebP buffers in under a millisecond. Flattened document export removes author fields, creator tools, and revision properties from output artifacts.

What happens to the free tier and paid plans for document and SDK scrubbing?

The Free Community Tier supports 15,000 characters per scrub for General PII, 5,000 characters across all 30 specialized profiles, and single TXT or DOCX files with zero account signup. Individual PRO ($15 per month or $110 Lifetime) unlocks offline PDF/OCR, Excel, and batch redaction, TEAMS ($99 per month flat) covers unlimited company seats, and the Developer SDK ($299 per month) runs on unlimited backend production nodes.