A plain-English look at how optical character recognition turns a picture into text, why it confuses O and 0 or rn and m, and what you can do to improve accuracy.
Optical character recognition, or OCR, feels like magic the first time: you drop in a photo of a page and a moment later you have text you can edit. Understanding what happens in that moment explains why OCR is excellent on some pictures and surprisingly bad on others, and it tells you what to change when the result is poor.
The engine first prepares the image. It may convert it to black and white, adjust contrast, remove specks of noise and straighten pages that are slightly tilted. A page that is tilted by a few degrees can be corrected. One that is badly rotated, curved or photographed from a steep angle is much harder to fix. The “Auto-Enhance” option in Image to Text does a version of this clean-up, boosting contrast and sharpening edges, which helps on dim photos.
Next the software divides the page into regions: paragraphs, columns, tables, pictures. Then it finds lines of text and the words within them. This step explains many odd results. If the page has two columns, the engine must decide to read down the first and then down the second. If it gets this wrong, you receive sentences stitched together from both columns. Tables are harder still, since each cell looks like a separate small block.
The core of OCR is recognition. Older engines compared each letter to stored shapes. Modern engines, including the Tesseract engine that powers many free tools, use neural networks that look at a whole line of text and predict the sequence of characters, a bit like reading a word rather than spelling it out letter by letter. They are trained on huge numbers of examples of text in a given language, which is why you choose a language before you run the tool: the model needs to know which alphabet and which patterns to expect.
Finally, the engine uses what it knows about the language to correct itself. If the shapes could be “clock” or “dock”, the sentence around them helps. This is why running the wrong language gives poor results, and why OCR is weakest where there is no language to lean on, such as a random code, a licence plate or a long invoice number.
No matter how good the picture is, treat OCR text as a first draft, not as a final copy. Read the numbers twice: amounts, dates, phone numbers, ID numbers and email addresses are where a single wrong character does real harm. Compare names with the original. Look for words that are split in two or joined together. For legal, financial or medical documents, always check the final text against the original page.
Docsworker runs OCR on your own device using code that your browser downloads, so your picture is not uploaded. That is useful for receipts, forms and personal letters. The trade-off is speed: a long document on an older phone can take a while. For a PDF that is a scan, PDF to Text will run the same recognition page by page, and this guide explains how to tell whether you need OCR at all.
Optical character recognition: software that reads the letters and numbers in a picture and turns them into text a computer can edit and search.
In many fonts these characters look almost the same. The engine uses the surrounding letters and its language data to guess, and it sometimes guesses wrong, especially in codes, serial numbers and invoices where there are no words to give a clue.
No. Clean printed text in a common font can be read very well, but accuracy drops with blur, low resolution, skew, shadows, unusual fonts and complicated layouts. Always proofread numbers and names.
No. The recognition runs in your browser. Only the language data file is downloaded the first time you use a language.