If you need to share a scanned document but can’t risk exposing the full contents to a third party, you’re not alone. Lawyers, researchers, support teams, and financial professionals face this exact constraint daily: how do you extract text from an image without creating a privacy liability? The traditional approach, uploading to a cloud OCR service, can be the wrong move for sensitive work. Those services can temporarily store submitted documents and results, log request metadata, and operate under retention and disclosure policies you do not control.12
CapyToolkit’s Offline OCR & Document Redactor that extracts text and redacts sensitive regions entirely in your browser changes that equation entirely. By running Tesseract in your browser via WebAssembly, it extracts text and lets you redact sensitive regions without any upload. Document data stays on your machine; processing never sends file contents to external servers. The tradeoff is a larger initial download and a dependency on scan quality, but in return you keep complete control over the document lifecycle. This article covers how the tool works, how to use it reliably, and how to integrate it into a complete client-side document privacy workflow.
Why Offline OCR Eliminates Cloud Privacy Risks
Uploading a document to a cloud OCR service means sending your sensitive data to someone else’s server. Consider the privacy implications:
- Server logs and retention: Processed documents live on the provider’s servers for undefined periods, subject to their data retention policies.
- Data-use terms: Providers vary. Some explicitly state they do not train models on customer documents unless a separate data-sharing agreement exists, so the terms still need review before upload.2
- Legal exposure: Law enforcement or civil subpoenas can compel providers to hand over stored documents, removing your control over disclosure.
- Breach risk: Any server-side system is a target; a breach at the OCR provider exposes everything you’ve ever processed.
CapyToolkit’s OCR redactor runs Tesseract entirely in your browser via WebAssembly. The engine downloads as a WebAssembly binary and language data, caching them locally for reuse. Working offline is possible once these assets are cached, though initial setup and adding new languages requires an internet connection. Nothing that passes through the tool is transmitted to external servers during processing. The alternative: cloud OCR services can temporarily retain submitted documents and results, and their training, logging, and disclosure policies vary by provider. The tradeoff is clear: control versus convenience.3
The zero-trust verification is simple: load the tool once with an internet connection to cache the WASM binary and language data, then disconnect your network and process a file. The tool works without a connection, confirming that core processing doesn’t require server-side calls. For anyone handling documents that must stay within a controlled environment, that offline capability matters more than cloud-scale accuracy improvements.
Inside Tesseract WASM: How Browser-Based Text Extraction Works
Tesseract OCR, the open-source engine that powers most browser-based text extraction, has been the standard for over two decades. Originally developed by HP and later sponsored by Google, it is now a community-maintained project supporting more than 100 languages.4 Porting a C++ library designed for native execution into a web browser required a fundamental re-architecture: enter WebAssembly, the browser technology that runs compiled code at near-native speed. WASM lets compiled code run at near-native speed inside the browser’s sandbox, making OCR feasible without extensions or plugins.5
The tool runs Tesseract inside a dedicated WebWorker. That separate thread keeps the main UI responsive while OCR processes in the background; you can still pan, zoom, or draw without the interface freezing.6
Caching the WASM binary and core language data means the initial download happens once; the base English engine is roughly 10 MB. Subsequent sessions launch quickly, working offline once those assets are cached. The tool requests additional language packs on demand when you select a new language; those also cache locally for future offline use, assuming the browser’s standard caching behavior isn’t cleared. However, while the software infrastructure operates offline after assets are cached, OCR accuracy still heavily depends on physical scan quality. Tesseract works best on images with at least 300 DPI, and accuracy can degrade with lower resolutions, handwriting, or decorative fonts.7
Redaction Workflow: From Image to Securely Redacted Export
Automatic OCR extraction and side-by-side text panel
Drop a JPEG, PNG, or WebP image onto the canvas, up to 20 MB, and extraction starts immediately. The tool parses the image through Tesseract, returning both visual bounding boxes and a plain text transcription. The interface splits the workspace: the source image on the left, extracted text on the right. As recognition completes line by line, a live progress indicator shows completion percentage, and the text panel populates in real time.
Each detected word gets an associated bounding box: coordinates mapping exactly where that word appears on the image. That spatial data powers the redaction interaction. The text panel is editable; you can correct OCR errors, delete stray lines, or annotate before export. Nothing is final until you download.
Drawing redaction boxes that permanently block sensitive content
To redact, you draw opaque rectangles directly on the image canvas. The tool checks each rectangle against every word’s bounding box. Any word whose area overlaps the redaction zone gets replaced with block characters (███) in the text view immediately. The visual redaction is destructive in the exported file, but during your session it’s non-destructive; Undo Last removes the most recent rectangle, Clear All resets the canvas, and the original image data stays in memory unmodified.
The overlap behavior demands care: if a word’s bounding box only partially intersects your rectangle, that word might slip through. The safe approach is to draw slightly larger than the sensitive region, ensuring complete coverage. Visual feedback in the text panel confirms which words are covered; block characters appear as soon as the rectangle overlaps enough to trigger removal.
Exporting redacted outputs in PNG, PDF, or plain text
Three export formats serve different threat models. By selecting Download PNG, you write the redacted canvas as a raster image: no hidden layers, no embedded text data, just pixels. That’s the most privacy-locked option since the output contains only visual information. For formal submissions, the Download PDF option embeds that same raster image into a non-searchable PDF container, intentionally blocking text extraction tools from finding embedded characters. Finally, Download TXT provides the cleaned text file with redactions already replaced by block characters, useful when you need the textual content but not the imagery.8
Post-export verification is mandatory. Open the downloaded file, zoom into redacted regions, and confirm no legible text survives. A quick visual check catches edge cases where bounding box overlap failed. If something remains, redo the redaction with a larger rectangle and export again.
Choosing the Right Export Format for Your Threat Model
Consider your threat model when selecting an export format:
| Format | Security Properties | When to Use | Caveats |
|---|---|---|---|
| PNG | Raster only, zero text layer | Visual evidence, maximum privacy | Larger file size, not searchable |
| PDF (raster, non-searchable) | Prevents text extraction tools | Legal submissions, official documents | Cannot search within document |
| TXT | Plain text only | When textual data needed without imagery | No visual context, only extracted text |
PNG and the intentionally non-searchable PDF are the privacy benchmarks. PNG outputs contain only pixel data with no embedded text layer. Non-searchable PDFs embed the raster image without any hidden OCR text. Both formats ensure no selectable text or hidden data remains in the file structure. Searchable PDFs, the kind generated by standard OCR software, embed a full text layer that defeats redaction. Avoid them entirely for sensitive documents. Use TXT only when you need to share the extracted content itself and imagery is irrelevant.8
Privacy Guarantees and Limitations
Zero-Upload Architecture
Because all image decoding, OCR text extraction, and redaction rendering happen entirely on your local machine, the tool never transmits document contents to external servers, utilizes zero server-side session storage, and completely omits invasive third-party analytics scripts that could capture interactions. For high-assurance workflows, you can inspect network traffic in browser devtools to confirm only the initial asset downloads occur.
CapyToolkit’s broader privacy promise extends across every tool: all utilities run locally. No accounts, no cloud processing, no data retention. The OCR redactor fits that stack naturally alongside the PII Scrubber and EXIF Scrubber; they’re designed as composable pieces for a complete offline document sanitization pipeline. Explore the full suite at CapyToolkit’s browser-based privacy tools that run without any accounts or data uploads.
Known Limitations
Understand these limitations to use the tool safely:
-
Bounding box partial overlap: If a word’s box extends beyond your rectangle even slightly, that word might survive in the text export. The countermeasure is deliberate overdraw: make rectangles larger than you think necessary. Visual inspection in the text panel after drawing is non-negotiable; scan for any remaining words in sensitive regions before exporting.
-
Reduced OCR accuracy with poor scans: Handwriting, decorative fonts, and very low-resolution scans reduce OCR accuracy. The tool might miss words entirely, or misrecognize characters. That impacts redaction coverage because undiscovered text can’t be redacted. For critical documents, pre-process images to improve clarity: increase contrast, straighten rotation, and aim for at least
300 DPI. -
Single-page processing only: Multi-page documents require per-page processing; batch upload isn’t supported. Take screenshots or export individual pages as images first. PDFs themselves aren’t directly accepted; convert pages to images before dropping.
-
Initial
WASMdownload requirement: The initialWASMdownload is roughly10 MBfor the base engine, a one-time cost that means the tool won’t work in a permanently air-gapped environment without that first online bootstrap.
Integrating OCR Redaction into a Privacy-First Document Workflow
PII Scrubbing after OCR extraction
Redacting the visual document is only half the equation. The extracted text might still contain personal data that survived visual redaction or was introduced through OCR errors. Copy the cleaned text panel into CapyToolkit’s PII Scrubber to detect names, emails, phone numbers, addresses, and other sensitive entities before sharing the textual content. This two-way verification, image redaction followed by text sanitization, closes residual leakage paths.
The workflow is intentionally manual; because automated systems inherently lack context—where a name might be public record in one file but strictly confidential in another—human verification must remain the final, definitive authority before any data is exported.
Document Integrity Verification
After redaction, compute cryptographic hashes of both the original and redacted files using CapyToolkit’s File Hash Verifier. Record the original hash in an audit log before processing, then record the redacted hash afterward. The difference proves that modifications occurred and lets auditors confirm exactly what changed. SHA-256 is the recommended default; it produces a 256-bit message digest and is widely accepted for compliance evidence.9
Hash verification serves two purposes. It provides tamper evidence for legal or regulatory reviews. It also documents the redaction process itself: you can show that the exported file corresponds precisely to the redacted version you created, with no hidden modifications.
Combining with EXIF Scrubbing for Source Images
Before feeding an image into OCR, strip its metadata with CapyToolkit’s EXIF & Image Metadata Scrubber. Photos from cameras and phones can embed GPS coordinates, timestamps, device information, and sometimes thumbnails of the full image. That metadata could reveal information you meant to keep private: a document photographed in a secure facility, for instance.10
The holistic pipeline becomes: EXIF scrub → OCR redaction → PII scan → hash log. Each step removes a different privacy layer. Metadata scrubbing handles the image file itself. Visual redaction covers document content in the image. Text sanitization catches anything the visual step missed. Hashing documents completes the transformation. Together they form a complete, client-side document sanitization workflow with no external dependencies.
Real-World Use Cases: Where Client-Side Redaction Is Essential
Client-side OCR redaction becomes essential whenever sensitive documents must be sanitized before sharing. Common scenarios include:
- Legal discovery: redacting legal documents to strip privileged clauses, client names, and financial terms from scanned contracts avoids transmitting attorney-client privileged information to cloud services.
- Personal identification: obscuring passport numbers, faces, and signatures on IDs before submitting visa applications or loan verifications.
- Financial documents: covering account numbers and balances on bank statements to prevent fraud or identity theft.
- Screenshots: removing API keys, internal URLs, and customer data from bug reports, UI mockups, or error logs before public distribution.
- Academic research: redacting medical records to de-identify patient data before sharing satisfies ethics board requirements and privacy regulations.
In each case, processing documents entirely in your browser eliminates exposure to third-party services. The document owner retains full control, with no full-source data ever leaving their machine.
Avoiding Common Pitfalls: Best Practices for Reliable Redaction
Follow these practices to ensure redactions are complete and secure:
-
Verify exported files at high zoom. Always open the downloaded file and zoom into redacted regions at
200%or higher. The human eye catches what the bounding box algorithm might miss: stray characters, partially covered words, or misaligned rectangles. If any text remains visible, redo that region with a larger box. -
Choose appropriate DPI for scan quality. For standard printed documents, aim for at least
300 DPI. Huge images slow processing and make precise rectangle drawing harder. For tiny print, increase DPI before processing, though OCR accuracy still depends on legibility. -
Redact multi-word phrases with single rectangles. When a full name, account number, or classified project codename needs redaction, draw one rectangle covering the entire phrase. This avoids partial overlap failures where individual word bounding boxes might extend beyond their respective rectangles.
-
Combine image redaction with PII Scrubber. Even perfectly redacted images might leave residual text in the OCR output panel that could be copied accidentally. A final PII scan catches those remnants. In high-stakes workflows, treat the two tools as a mandatory pair.
-
Periodically clear site data on shared workstations. If you use the tool on a public or shared computer, explicitly clearing your browser data after your session ensures that no residual image blobs, canvas data, or extracted text fragments remain in the browser’s local storage. That cleanup is essential; otherwise the next user could recover sensitive material from the browser’s cache, IndexedDB, or memory snapshots.
Embedding Document Privacy Into Your Security Culture
Make client-side redaction a mandatory step before sharing any scanned document. Build a checklist: EXIF scrub → OCR redact → PII scan → hash log. Document that procedure in your team’s security playbook and enforce it with training. People need to understand why the extra step matters, not just that it exists.
Train team members to verify offline capability themselves. Have them disconnect from the network and run a test document. That simple act demonstrates that processing occurs locally and builds confidence in the tool’s privacy design. Explain the bounding box limitations clearly: redaction isn’t magic; it requires deliberate drawing and verification.
In an era of cloud convenience, retaining control over document contents is a foundational privacy practice. Processing documents in your browser means no logs persist on external servers, no retention policies you can’t audit, and no risk of a provider breach exposing your data. That control is the reason these tools exist. Use them consistently, verify thoroughly, and keep your documents in your own hands.
- 1.
Microsoft, “Data, privacy, and security for Document Intelligence,” learn.microsoft.com, February 2026. https://learn.microsoft.com/en-us/azure/ai-foundry/responsible-ai/document-intelligence/data-privacy-security
- 2.
Google Cloud, “Document AI security and compliance,” docs.cloud.google.com, June 2026. https://docs.cloud.google.com/document-ai/docs/security
- 3.
Microsoft, “Data, privacy, and security for optical character recognition (OCR),” learn.microsoft.com, February 2026. https://learn.microsoft.com/en-us/azure/ai-foundry/responsible-ai/computer-vision/ocr-data-privacy-security
- 4.
tesseract-ocr, “Tesseract OCR,” github.com, accessed June 2026. https://github.com/tesseract-ocr/tesseract
- 5.
WebAssembly, “WebAssembly,” webassembly.org, accessed August 2026. https://webassembly.org/
- 6.
MDN Contributors, “Web Workers API,” developer.mozilla.org, April 2025. https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API
- 7.
tesseract-ocr, “Improving the quality of the output,” github.com, accessed June 2026. https://github.com/tesseract-ocr/tessdoc/blob/main/ImproveQuality.md
- 8.
World Wide Web Consortium, “PDF7: Performing OCR on a scanned PDF document to provide actual text,” WAI, w3.org, accessed June 2026. https://www.w3.org/WAI/WCAG22/Techniques/pdf/PDF7
- 9.
National Institute of Standards and Technology and Quynh Dang, “Secure Hash Standard,” FIPS 180-4, nist.gov, August 2015. https://www.nist.gov/publications/secure-hash-standard
- 10.
“Exif,” Wikipedia, accessed June 2026. https://en.wikipedia.org/wiki/EXIF