What OCR Actually Does (and Why Scans Aren't Text)

To your eyes, a scanned page and a typed page look identical. To software, they could not be more different: one contains characters, the other contains millions of colored dots with no meaning attached. OCR — Optical Character Recognition — is the technology that bridges that gap, and knowing roughly how it works will make you noticeably better at getting good results from it.

A modern OCR pipeline runs in stages. First comes preprocessing: the engine straightens the image (deskewing), boosts contrast, removes speckles, and typically reduces everything to black-and-white. This stage matters more than any other — recognition engines are excellent readers of clean print and terrible guessers of smudges, which is why a crooked, dim phone photo recognizes so much worse than a flat 300 DPI scan.

Next, layout analysis. Before reading a single letter, the engine maps the page: which regions are text blocks, which are images, where columns begin and end, what is a table. Get this wrong and a two-column article comes out interleaved line by line — the classic OCR garble. Then comes recognition itself: modern engines feed entire lines of pixels into neural networks that output character sequences with confidence scores, having learned the visual patterns of letters from millions of training samples. The near-identical trio of l, I and 1, or O and 0, is exactly where those confidence scores wobble.

Finally, language modeling cleans up. Because the engine knows what words in its language look like statistically, it can correct 'rn' misread as 'm' and settle ambiguous shapes by context. This is why telling the engine the right language matters, and why mixed-language documents are harder. The output then goes wherever you asked: into a plain text file, or placed invisibly behind the original image as a searchable PDF — same pixels on top, real text underneath.

For decades OCR meant either expensive desktop suites or uploading your documents to a server farm. What changed recently is WebAssembly: engines like the one inside PdfWill's OCR tool now run at practical speed inside your browser, so a contract or medical record gets recognized without ever leaving your device. Feed it a straight, sharp, 300 DPI scan, tell it the right language, and modern OCR reads print with better-than-99% character accuracy — a technology that quietly became excellent while nobody was watching.

Related tools