How to extract text from an image (OCR) and get accurate results

OCR saves retyping, but a poor photo can produce garbled text. This guide explains how OCR works and the simple preparation steps that make the biggest difference.

What OCR does

Optical character recognition (OCR) looks at an image, finds areas that contain text, splits them into lines and words, and matches the shapes of letters against a trained model to produce editable text. Modern engines such as Tesseract, which powers the tools on this site, use neural networks that recognise whole lines, so clear printed text in common fonts is usually read very accurately.

What affects accuracy

  • Resolution: letters need enough pixels. Body text should be at least 20–30 pixels tall in the image; tiny text in a wide photo is often misread.
  • Contrast: dark text on a plain light background works best. Coloured or patterned backgrounds confuse the engine.
  • Straightness: skewed or curved lines (a book photographed near the spine) reduce accuracy.
  • Blur and shadows: motion blur and the shadow of your phone over part of the page cause missing or wrong characters.
  • Handwriting and decorative fonts: general OCR engines are trained mainly on print, so handwriting results vary widely.
  • Language: the engine must know the language; English-trained models will mangle other scripts. The OCR tools on this site read printed English.

Preparing an image for OCR

  1. Photograph the page straight on in even light, filling the frame.
  2. Crop to the text you need with the crop tool; less clutter means fewer stray characters.
  3. Rotate so lines are horizontal.
  4. For screenshots, use the original PNG rather than a compressed copy; PNG keeps letter edges sharp.
  5. Run JPG to Text or PNG to Text, then paste the text into your document. These tools read printed English.

Checking the result

Even a 99% accurate result has about one error in every hundred characters, so proofread anything important. Common confusions are 0 and O, 1, l and I, rn and m, and missing accents. Numbers deserve special care: an amount, a date or an ID number should always be compared with the original. Tables are another weak spot; OCR often reads them row by row as plain text, so check the columns line up.

Good uses and poor uses

OCR is excellent for copying a paragraph from a screenshot, digitising printed letters and notices, pulling text out of a scanned PDF page, or making notes from a whiteboard photo. It is less dependable for handwriting, receipts printed on faded thermal paper, stylised posters, and complex forms with many boxes. For those, expect to correct the output by hand.

Frequently asked questions

Can OCR read handwriting?

Sometimes, if the writing is neat and printed in separate letters. Joined handwriting is usually read poorly by general OCR engines.

Is it safe to OCR private documents online?

Only if you trust where the image goes. The OCR tools on this site run in your browser, so the image is not uploaded to a server.

More guides

Paul Digital guides are written from hands-on testing of the tools on this site and are reviewed when platforms or formats change. Requirements set by exam boards, governments and apps vary and change over time, so always check the official instructions for your case. Spotted an error? Email askpaulonline@gmail.com.