Skip to content
OCR2text

How it works

Capture, clean, recognise, correct, export

Recognition is the part everyone talks about, and the part that has been solved for years. What separates a useful OCR tool from a frustrating one is everything on either side of it.

  1. 1

    Capture

    Camera, file, clipboard or PDF page — all become the same kind of page.

  2. 2

    Clean

    Geometry first, then resolution, then tone. Order matters.

  3. 3

    Recognise

    Tesseract compiled to WebAssembly, running in a Web Worker.

  4. 4

    Correct

    Confidence per word, reviewed against the original pixels.

  5. 5

    Export

    Files built in the browser, saved straight to your device.

Why the browser can do this at all

Tesseract is a mature C++ OCR engine. Compiled to WebAssembly — with SIMD instructions where your browser supports them — it runs at a perfectly respectable speed on an ordinary laptop or phone. OCR2text loads it into a Web Worker, so a long recognition never freezes the interface, and the engine is only fetched once you actually choose an image. The landing page does not pull down an OCR engine you may never use.

The preparation pipeline

Auto enhance is not a fixed chain of filters. OCR2text measures the image first — median brightness, contrast spread, gradient noise, how flat the background is, how many distinct colours there are — and chooses from that.

  • Screenshots are left alone. Thresholding a crisp render makes it worse, so the only thing applied is an inversion when the text is light on dark.
  • Photographs get grayscale, a contrast stretch when the range is narrow, a median filter when there is sensor speckle, and an adaptive threshold when there is a real light/dark separation to work with. Where there is not, it sharpens instead.
  • Small images are upscaled, because a recogniser needs enough pixels per character to see letter shapes.

Whatever it decides, it tells you in plain words, and the Original toggle lets you see exactly what changed. Enhancement is not always an improvement, and pretending otherwise would be dishonest.

Straightening and flattening

Skew is estimated from the horizontal projection profile: when text lines are level, the row-by-row ink histogram has sharp peaks, so its variance peaks too. OCR2text searches ±10° and only applies a rotation when the winning angle clearly beats both a level page and the average — a confident wrong rotation is far more damaging than leaving a slight tilt alone.

Perspective is different: it solves an eight-parameter homography from the four corners you place and resamples the page bilinearly into a rectangle. On a page photographed at an angle this is usually the single biggest accuracy win available.

Honest progress, and cancelling

The progress bar reflects the stage the engine reports — preparing the image, loading recognition data, recognising, formatting. When the engine does not expose a number for a stage, you get indeterminate motion rather than an invented percentage sitting at 97%.

Cancel stops the work by tearing the worker down, which is the only way to genuinely interrupt a running recognition. A fresh worker starts on the next job, so nothing is left in a broken state.

Confidence and review

Tesseract reports a confidence for every word. OCR2text marks the ones below 75 subtly in the text, and summarises the page as high confidence, needing review, or low confidence — never as a made-up overall accuracy percentage, which would mean nothing.

Review mode then steps through those words one at a time, showing a magnified crop of the actual pixels the engine read next to an editable field. Correcting OCR this way is dramatically faster than proof-reading a whole document against the original.

Cleaned text is not rewritten text

The Cleaned view normalises whitespace, rejoins words split by a hyphen at a line break, and merges lines that are clearly one wrapped sentence — judged by line length, punctuation and whether the next line looks like a bullet or a heading. It never changes a word, fixes spelling or rephrases anything, and no language model is involved. Exact OCR is always one click away.

The same principle governs suggested fixes. OCR2text will point out that the “O” inside a number is probably a zero, and show you the surrounding text — but “0” and “O” are both correct answers depending on the document, so it asks rather than guesses.

Working within a device’s limits

OCR2text checks processor count and available memory, then sizes its worker pool accordingly — one worker on a phone, a small pool on a desktop. Images are capped at a sensible recognition resolution, pages are prepared only when their turn in the queue comes, and canvases are released as soon as they are finished with. The aim is simple: never take the tab down.

Under the hood

Which OCR engine is this?+
Tesseract, via tesseract.js, compiled to WebAssembly. It sits behind an engine interface inside the app, so a better browser OCR engine can replace it later without the rest of the application being redesigned.
Why is there a Fast and a Most accurate model?+
They are different trained models. Fast is a couple of megabytes and handles clean printed text well. Most accurate is several times larger and slower, and earns its keep on difficult scans. You choose, and you are told the size before it downloads.
Why does the first recognition take longer?+
The WebAssembly core and the language model have to be fetched and compiled once. After that they are cached on your device and subsequent runs start almost immediately — including with no network at all.
Can I get the raw data out?+
Yes. Advanced export produces JSON with per-word text, confidence and bounding boxes for every page, which is handy if you are building something on top of it.

Extract text from something

No account, no upload, no waiting for a server. Open the workspace and drop a page in.

Open OCR2text