OCR7 min

Tesseract in the Browser: How Zro7 Runs OCR With Zero Uploads

Tesseract.js compiles Google's OCR engine to WebAssembly so recognition happens in your browser. Here's how it works, what accuracy to expect, and why the trained models load once and cache forever.

Zro7 OCR runs Tesseract.js in a Web Worker. The image and the recognized text never leave your device.

Zro7 OCR uses Tesseract.js — Google's Tesseract 5 engine compiled to WebAssembly plus a Web Worker wrapper. You drop an image or PDF into Image to Text, the engine tessellates and recognizes characters entirely in your browser, and the result is copyable text. No cloud OCR API, no per-page pricing, no upload.

How it works, end to end

  1. First run: Tesseract.js downloads tesseract-core.wasm (~2 MB) and the language model (eng.traineddata.gz, ~10 MB compressed) once. Both are cached in the browser's Cache Storage — subsequent runs are instant and fully offline.
  2. The image is decoded to a canvas and handed to a Web Worker.
  3. Tesseract's LSTM neural net (trained on ~400k lines per language) runs page segmentation → line detection → character recognition.
  4. Output: plain text + optional HOCR/TSV with bounding boxes and per-word confidence.

Accuracy you can actually expect

  • Clean digital PDF rendered to 300 DPI — 98–99% word accuracy. Use PDF OCR.
  • Modern phone photo of a printed document — 92–97% with straight framing; drops fast with skew, glare, or shadow.
  • Receipts / thermal print — 80–92%; specialized post-processing helps (Receipt Scanner).
  • Handwriting — Tesseract wasn't trained for it. Expect <60% and unusable output.

Why WASM Tesseract holds up vs cloud OCR

Cloud services (AWS Textract, Google Vision) are more accurate on hard documents — they layer detection, layout analysis, and language models on top of Tesseract-class recognition. But for 90% of everyday jobs — screenshots, printouts, forms, business cards — WASM Tesseract is within a few percentage points and doesn't ship your documents to a third party. That trade often makes it the correct choice.

Performance tips

  • Feed 300 DPI, black-on-white if possible. Double the DPI and speed halves; drop below 150 DPI and accuracy tanks.
  • Straighten before OCR — a 5° skew costs 3–8% accuracy. Deskew via Zro7's built-in preprocessing toggle.
  • For multi-page PDFs, run pages in parallel Web Workers (Zro7 does this automatically up to navigator.hardwareConcurrency).
  • Only load the languages you need. Adding 'jpn' or 'chi_sim' bumps model download to ~40 MB each.

Steps

  1. Open Image to Text (or PDF OCR).
  2. Drop your image / PDF and pick a language.
  3. Wait for the first-time model download (once per language, then cached).
  4. Copy the text or download as .txt.

Frequently asked questions

Does Tesseract.js support multiple languages at once?

Yes — pass an array like <code>['eng','fra']</code>. Downloads and RAM scale linearly.

Can it output searchable PDFs?

Yes — Tesseract can emit PDF with a hidden text layer overlaid on the original image. Use <a href="/pdf-ocr">PDF OCR</a> and choose 'Searchable PDF'.

How much RAM does it need?

About 300–500 MB per Worker for eng. Multi-language jobs on large pages can hit 1 GB — comfortably within browser limits on desktop.

Is it slower than cloud OCR?

Yes, but only the first page — after model load, throughput is roughly 1–3 seconds per page on modern laptops. Batch OCR overlaps CPU and I/O.

Any upload?

None. The image, the model, and the recognized text all stay in your browser.

Related posts

← Back to blog