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.