What OCR can and cannot read: getting usable text out of a screenshot or scan

Tesseract reads clean printed text at 99 % and handwriting at roughly 0 %. What decides the result — resolution, contrast, language model, layout — and how to prepare an image so the text comes out right.

The short version

OCR — optical character recognition — turns pixels that look like letters into actual text. On a sharp photo or screenshot of printed text it is close to perfect; on handwriting, decorative fonts, or a blurry photo of a menu it is close to useless. The engine on this site is Tesseract, running in the browser with twelve language packs; the image stays on your device. Most bad results come from the image, not the engine, and are fixable before you press the button.

How the engine works

Tesseract started at Hewlett-Packard in 1985, was open-sourced in 2005 and has been maintained by Google since 2006. Version 4 (2018) replaced the character-by-character classifier with an LSTM neural network that reads a whole line at once, which is why it copes with touching letters and proportional fonts that the old engine could not. The pipeline is: find the text regions on the page, split them into lines, run each line through the network, and let a language model — a dictionary and letter-sequence statistics — arbitrate between similar shapes (l, 1, I; 0, O). That last step is why picking the right language matters: an English model reading German will “correct” straße into strasse or worse.

In the browser the engine is compiled to WebAssembly (about 4 MB) and each language pack is 0.7–3 MB, downloaded on first use and cached. The Chinese and Japanese packs are the large ones, because there are thousands of characters to know.

What decides the result

Resolution. Tesseract wants letters about 30 pixels tall; below 20 the network starts guessing. A phone photo of a page is fine; a 400-pixel-wide thumbnail is not. If you must OCR a small image, upscale it 2× first — it does not add information, but it gives the line-finder room to work.

Contrast and evenness. Black on white, evenly lit. A photo of a page under a desk lamp has a bright centre and grey corners; the engine binarises the image with one threshold and one side of the page disappears. Take the photo in flat light or scan.

Straightness. The engine corrects a few degrees of skew. A page photographed at an angle is a trapezoid, and lines converge; rotate and crop to the text block before OCR. Cropping also removes the table edge, your thumb, and the other page — each of which produces a line of garbage.

Layout. Single-column body text is easy. Two columns are usually detected. Tables, forms, text wrapped around images and captions in the margin come out in an order the engine chose, and columns of numbers lose their alignment. For a table, OCR the cells you need rather than the page.

Font. Standard book and screen fonts: excellent. Condensed, ornate, script, or outlined fonts: poor. Text set in a font the training data never saw is read shape by shape, and the language model’s corrections make it worse, not better.

Handwriting. Effectively unsupported. Tesseract is trained on printed type; block capitals on a form might come through, cursive will not. Handwriting recognition is a different model family and is not what this tool does.

Languages and mixing

Choose the language the text is in, and only that one when possible. Selecting three languages triples the candidate set for every character and slows recognition while lowering accuracy. Mixed text — a Chinese document with English product names — is the case for two languages together (Chinese + English): the engine switches per word. Twelve languages are available: English, Simplified and Traditional Chinese, Japanese, Korean, Spanish, French, German, Portuguese, Russian, Italian and Vietnamese.

Scanned PDFs

A PDF that came from a scanner is an image of each page; the text is not there to copy. Render the pages to images at 200–300 dpi and OCR those. Rendering at 72 dpi (screen resolution) gives 10-pixel letters and gibberish.

What “99 %” means in practice

A good OCR run on a clean page misreads about one character in a hundred. On a 500-word page that is thirty errors, mostly in numbers, names and punctuation — exactly the parts you cannot proofread by reading fluently. Check every figure against the original before the text goes anywhere it matters; OCR is a draft, not a transcript.

Tools in this article