Scanned Document Redaction: Why OCR Must Come First

Extract text from images and redact sensitive regions locally. Tesseract WASM runs in your browser — no uploads, no server, no account needed.

ZERO UPLOAD · ALL LOCAL
  1. Drop a JPEG, PNG, or WebP image onto the drop zone — OCR starts automatically.
  2. Wait for text extraction to complete. The image appears on the left, extracted text on the right.
  3. Draw rectangles over sensitive regions on the canvas to redact them. Covered words become block characters in the text panel.
  4. Use Undo Last or Clear All to adjust redactions at any time.
  5. Export with Download PNG (redacted image), Download PDF, or Download Text.

What this page covers

  • SSN fields named in the worked example as a field not required by the filing
  • Pricing fields named in the second worked example for an archived contract
  • Party identity fields named in the second worked example for an archived contract

Zero upload guarantee

Your file never leaves this device. OCR runs locally via WebAssembly — no server, no account, no logs.

Drop an image here

or click to select · JPEG, PNG, WebP · max 20 MB

Initialising OCR engine…

Extracting text… 0%

SOURCE IMAGE

EXTRACTED TEXT

Scanned Document Redaction: OCR First, Then Redact Sensitive Fields

Scanned documents need OCR before any word-aware redaction can happen. A scanner produces a flat raster image: pixels arranged on a grid with no inherent text meaning. Without OCR, redaction tools can only add black rectangles on top of those pixels visually, with no connection to the underlying content. Running OCR first creates the bounding box map that links image regions to text strings, enabling the redaction layer to simultaneously cover the visual content and remove the corresponding words from the text export.

The OCR Redactor handles this two-step sequence automatically. Drop the scanned image into the tool and OCR runs immediately. By the time you start drawing redaction rectangles, the bounding box data is ready, and each rectangle you draw updates the text panel in real time.

Why OCR quality determines redaction quality

A poorly scanned document produces noisy OCR output with misread characters, missing words, and incorrect bounding box positions. When bounding boxes are inaccurate, drawn rectangles may not perfectly align with the actual word positions in the image. Drawing the rectangle slightly larger than the target text region accounts for bounding box imprecision and ensures the words are caught.

Scanning best practices for reliable bounding box alignment

Consequently, scanning quality is the foundation of the entire workflow. Scan at 300 DPI or higher, use Black & White mode for typed text, and ensure no skew or rotation.1 A straight, high-contrast scan produces accurate bounding boxes that align precisely with your drawn rectangles. CapyToolkit's overlap detection works best when the OCR bounding boxes accurately reflect the visible text positions, which starts with a clean, well-aligned scan.

Handling multi-page scanned documents

The OCR Redactor processes one image per session. Multi-page scanned documents must be processed as individual page images. Scan the document and save each page as a separate JPEG, or configure your scanner software to save individual pages rather than combining them into a PDF. Drop each page image into the tool, draw redactions, and export the page PNG. After processing all pages, combine the exported PNGs into a single PDF using any local PDF assembly tool. Building on this, pages that contain no sensitive information can be exported directly from your scanner without the redaction step; process only the pages where sensitive content appears to save time.

Verifying completeness of redaction after OCR

After placing all redaction rectangles, review the text panel by searching for the sensitive terms you redacted. If a name, number, or identifier still appears in the text panel, a rectangle does not fully overlap its bounding box. Expand the rectangle or add a second rectangle to cover the remaining portion. Furthermore, some OCR tools split compound words or multi-word strings across multiple bounding boxes. A name like "John Smith" may appear as two separate bounding boxes. Drawing one rectangle over both words in the image catches both bounding boxes if the rectangle fully overlaps the name region. Visual inspection of the final exported image remains the definitive check before sharing any redacted document.

Preparing physical documents for scanning before redaction

Document preparation before scanning directly affects the OCR accuracy you get from the extracted text. Flatten any folded or creased pages and remove staples and paper clips before placing documents in the feeder or on the platen glass. Wrinkled areas create shadow gradients that Tesseract may interpret as text artifacts, adding false tokens near creases and making identifier searches less reliable.

Scan settings for high-accuracy OCR output

Scan in Grayscale or Color at 300 DPI minimum for standard body text at 10pt or larger. Documents with handwriting or very small printed fonts below 9pt benefit from 400 DPI, which gives Tesseract better bounding box precision on individual characters.2 Save or export as JPEG at maximum quality or as PNG to avoid compression artifacts on character edges.3 If your scanner exports to PDF and you need a single page image for the OCR Redactor, rasterize the page with ImageMagick at 300 DPI before dragging the output image onto the tool's upload zone.4

Post-export audit of the redacted text file for remaining identifiers

The OCR Redactor's Download Text export produces a plain text file containing the OCR transcript of the document, with redacted tokens replaced by block characters. This file is separate from the exported image and provides a searchable audit record for verifying that every target identifier is covered before the document leaves your control.

Using the text export for identifier verification

Open the downloaded text file in any text editor and use the Find function to search for each target identifier: full names, reference numbers, date patterns, and any other sensitive strings you redacted from the image. If any search returns a match, the corresponding rectangle in the image does not fully cover that token's bounding box. Return to the OCR Redactor, expand or add rectangles over the affected region, and export again. This verification step adds two to three minutes per document and produces a concrete record that each identifier was absent from the final exported PNG.

Make the search step part of your export checklist rather than an afterthought. CapyToolkit's OCR Redactor replaces redacted tokens with block characters in the text file, so a clean Find result across all target strings is the proof that the image rectangles aligned correctly. Saving that text file alongside the redacted PNG gives you a plain-text record you can recheck later if the document is ever challenged or re-shared, which is why teams block a scanned form before digital filing and keep the audit trail.

When to use this

Use this tool when you need to redact sensitive fields from a physical paper document before digital distribution, when a document exists only as a scanned image with no source digital file, or when you need a text-layer-free export of a partially redacted scan.

Examples

Redacting a scanned paper application form before filing

Scan the form at 300 DPI. Drop the page image into the OCR Redactor. Draw rectangles over fields not required by the filing (such as SSN fields on a form where only the name and date fields are needed). Export the PNG.

Processing a scanned contract for redacted archive copy

Scan each contract page. Redact pricing and party identity fields not needed in the archive. Export each page PNG and combine into a redacted archive PDF. Retain the original scans separately for the fully confidential copy.

Sources
  1. 1.

    Tesseract OCR, "Improving the quality of the output," tesseract-ocr.github.io, accessed June 2026. https://tesseract-ocr.github.io/tessdoc/ImproveQuality.html

  2. 2.

    Tesseract OCR, "FAQ (tess3)," tesseract-ocr.github.io, accessed June 2026. https://tesseract-ocr.github.io/tessdoc/tess3/FAQ-Old.html

  3. 3.

    Tesseract OCR, "png vs jpg recognition results are different," github.com, 2019. https://github.com/tesseract-ocr/tesseract/issues/1895

  4. 4.

    ImageMagick, "Command-Line Options: -density," imagemagick.org, accessed June 2026. https://legacy.imagemagick.org/script/command-line-options.php/

FAQ