OCR Document Redaction: Extract and Redact in One Step

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

  • Party names named as a redaction target in the tool's worked example
  • Signature blocks named as a redaction target in the worked example
  • Pricing sections named as a redaction target in the worked example

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

OCR Document Redaction: Extract Text and Redact in One Workflow

OCR and redaction belong in the same workflow. Scanning a document and redacting it in two separate tools creates a gap: you export an image from one tool, open another, and manually mark regions without any text intelligence. The OCR Redactor closes this gap by extracting text first and then using those bounding boxes to determine exactly which words fall inside your drawn rectangle.

Every word whose bounding box overlaps a redaction rectangle disappears from the text panel simultaneously. Drawing a rectangle over a name in the image removes that name from the exported text file automatically, with no manual search-and-delete required. The exported PNG and PDF contain no underlying text layer, so redacted content cannot be recovered by selecting text in a PDF reader.

How OCR and redaction work together

Tesseract OCR produces two outputs: the recognized text and the bounding box coordinates for every word in the image.1 The redaction step uses those coordinates directly. When you draw a rectangle on the image canvas, the tool compares the rectangle's pixel bounds against every word's pixel position and removes any word whose box overlaps yours. This means you never need to search the text panel manually for words you covered on the image.

Ensuring full word coverage with bounding box overlap

Drawing the rectangle slightly larger than the visible text region ensures that words at the edge of a bold heading, which Tesseract sometimes assigns wider bounding boxes than their visible ink suggests, are caught by the overlap check correctly. CapyToolkit uses pixel-level overlap detection rather than center-point inclusion, so even words whose bounding box extends slightly beyond the visible character strokes get covered when your rectangle overlaps any portion of the box.

This overlap approach matters most on dense documents where fields sit close together. CapyToolkit's OCR Redactor highlights the covered words in the text panel as you draw, so you see the bounding box match update live instead of guessing where Tesseract placed each token. Slightly enlarging the rectangle is safer than drawing it tight to the visible ink, because a box that extends beyond the character still gets caught by the overlap check.

Why raster export matters for redaction

Standard PDF redaction tools add a black rectangle on top of visible content but leave the underlying text layer intact.2 Any PDF reader can remove that overlay by selecting the edit or remove redactions function in compatible software, or simply selecting all text and copying it. The OCR Redactor exports a raster image, which is a flat PNG or PDF containing only pixels, with no text layer whatsoever. Consequently, recovering redacted text from the exported file is technically impossible because there is no text layer to extract. This makes raster export the correct output for redacted documents shared with external parties who cannot be trusted to handle an improperly redacted PDF responsibly.

The full OCR redaction workflow step by step

Drop a JPEG, PNG, or WebP image onto the OCR Redactor drop zone. Tesseract begins extraction immediately, and the text appears in the right panel within a few seconds for a typical letter-size page. Review the extracted text to confirm the OCR captured the sensitive fields correctly. Draw redaction rectangles on the image by clicking and dragging over the regions to redact. The text panel updates in real time as each rectangle covers matching word bounding boxes. When all redactions are placed, export using Download PNG for a lossless image, Download PDF for a single-page raster PDF, or Download Text to save the clean version with redacted words replaced by block characters.

Handling multi-word names and compound identifiers in redaction

Tesseract produces word-level bounding boxes, so a two-word name like "Maria Johnson" corresponds to two separate entries in the OCR output. Drawing a rectangle that fully overlaps both words covers both bounding boxes, and both tokens appear as block characters in the text panel. If the rectangle only overlaps the first name, the last name remains visible in the text panel as plain text.

Verifying multi-part identifiers are fully covered

After drawing each rectangle, search the text panel for the identifier you just redacted. If any fragment still appears, the rectangle does not fully cover that token's bounding box and needs expanding, or a second rectangle placed over the remainder. Account numbers, invoice numbers, and case reference numbers can span multiple OCR tokens depending on how Tesseract segmented the line, so always confirm these in the text panel after marking them in the image.

Confirming the exported file has no recoverable text

A PNG exported from the OCR Redactor is a raster image with no embedded text layer. It carries no hidden text in an XML metadata field, an ICC profile comment, or a text chunk. Standard image viewers show only the visual pixel data, and the redacted regions appear as solid black rectangles. The PNG format does not support multiple layers or hidden data channels,3 which makes it inherently safer than PDF for distributing redacted documents where the recipient should not have any technical path to recover the covered content.

Checking PNG metadata with a local inspection tool

If your organization requires metadata verification before distributing redacted images, ExifTool (available at exiftool.org and running entirely locally) can inspect all metadata embedded in a PNG file.4 Running ExifTool with the strip-all flag removes every metadata field, leaving only the pixel data. For most documents, the PNG export from the OCR Redactor contains only standard image metadata such as dimensions and color space, with no readable content from the source document, which is what the OCR-and-redaction PNG export is designed to guarantee. Adding a brief ExifTool pass to your distribution checklist takes under five seconds per file and provides documented evidence that the shared file contains no residual text data or identifying metadata from the original scan.

When to use this

Use this workflow when you need to produce a redacted copy of a scanned document for sharing, legal filing, or compliance review, particularly when the original is a physical paper document without a digital source.

Examples

Redacting a scanned contract before sending to a client

Draw rectangles over party names, signature blocks, and pricing sections. Export the redacted PNG. The client receives a clean image with no hidden text layer and no ability to recover the covered content.

Extracting only the non-sensitive text from a medical record scan

After OCR completes, review the text panel and manually delete sensitive lines before downloading the text file. The image export retains your redaction rectangles covering those regions on the visual layer.

Sources
  1. 1.

    tesseract-ocr, "tesseract::BoxWord Class Reference," tesseract-ocr.github.io, accessed June 2026. https://tesseract-ocr.github.io/tessapi/5.x/a02698.html

  2. 2.

    ISO, "Information technology — Security techniques — Specification for digital redaction," ISO/IEC 27038:2014, iso.org, 2014. https://www.iso.org/standard/44382.html

  3. 3.

    W3C, "Portable Network Graphics (PNG) Specification (Third Edition)," w3.org, June 2025. https://www.w3.org/TR/png/

  4. 4.

    Phil Harvey, "ExifTool," exiftool.org, accessed June 2026. https://exiftool.org

FAQ