OCR basics: how a photo of text becomes text you can edit
What optical character recognition does, why it misreads some pages, and how to check the result quickly.
To a computer, a photo of a page is just millions of coloured dots. It has no idea there are words in it.OCR, optical character recognition, is the step that finds the text in those dots and turns it into characters you can edit, search, and copy. Knowing roughly how it works makes it obvious why some scans read perfectly and others come back full of mistakes.
What happens inside OCR
- Clean up. The image is straightened and contrast is improved so that ink and paper are easy to tell apart.
- Find the text. A detection model looks for regions that contain text and draws a box around each line or word.
- Read each region. A recognition model looks at the pixels in each box and predicts the most likely sequence of characters.
- Put it back in order. The pieces are arranged into reading order: lines into paragraphs for a document, or rows and columns for a table.
Modern OCR uses small neural networks for steps 2 and 3. The Document to Word andDocument to Excel tools on this site run such models (PP-OCRv6 Small) directly in your browser, so the page image does not have to leave your device. The first run downloads the model files; after that the browser can cache them.
Why OCR makes mistakes
Recognition is a prediction, not a lookup. When the pixels are ambiguous, the model picks the most likely character, and sometimes it is wrong. Typical causes:
- Blur and low resolution. Small letters may only be a few pixels tall. Fill the frame and hold still.
- Glare and shadows. A bright patch erases strokes; a shadow merges letters with the background.
- Curved or folded paper. Lines that bend confuse both detection and reading order.
- Unusual fonts and handwriting. Decorative type and joined-up handwriting are much harder than plain print.
- Complex layout. Columns, tables without lines, and text over pictures make the reading order hard to reconstruct.
Classic misreads
| Source | Often read as |
|---|---|
| 0 (zero) | O (letter) |
| 1 (one) | l, I, or 7 |
| rn | m |
| 5 | S |
| , (comma) | . (full stop), which matters in amounts like 1,250.00 |
Digital PDFs do not need OCR
A PDF exported from Word, a bank's website, or accounting software usually contains real text already. Our tools detect readable PDF text and use it directly, which is exact, rather than guessing from pixels. If you have the original PDF, use it instead of a photo of a printout.
How to check OCR output quickly
- Compare side by side. The tools show the source next to the result. Scan down both in parallel, line by line.
- Check the numbers that matter first. Amounts, dates, account numbers, and names.
- Use totals as a test. In a spreadsheet, add a SUM and compare it with the total printed on the paper.
- Search for the usual suspects. Find “rn”, stray “|” characters from table lines, or letters inside number columns.
OCR vs AI extraction
Classic OCR reads characters; it does not understand what a document means. Larger AI vision models can also interpret structure, for example which number is the total. They can handle messy tables better, but they run on servers, cost more, and can still be confidently wrong. On this site, OCR in the browser is the default. AI Mode is optional, sends the page image to a processing service only after you choose it, and is described in the Privacy Policy.
Rule of thumb: OCR quality is decided at capture time. Five extra seconds getting light and angle right save five minutes of corrections. See scanning tips: light and angle.