PortImg Insights

Extract Text from Images with OCR: What Reads Perfectly and What Doesn't

Date
Updated
Read time4 min read
Extract Text from Images with OCR: What Reads Perfectly and What Doesn't

We ran clean, blurred, tilted and tiny text through browser OCR. See which images read perfectly, which lose numbers, and how to prepare yours.

OCR (optical character recognition) turns a picture of text into text you can copy, search and edit: a photo of a notice, a screenshot of an error message, a scanned letter. It saves retyping, but it is not magic, and the mistakes it makes are often in exactly the places that matter, such as dates and amounts. To find out where it is reliable, we ran the same text through our Image to Text (OCR) tool in seven different conditions.

What the tool uses

The tool runs Tesseract, the open-source OCR engine, inside your browser (tesseract.js version 4). It reads English and Hindi together in one pass, so a page that mixes the two works; other languages are not supported. The first time, your browser downloads the engine and the language data, about 14 MB, and keeps them for next time. The image itself is never uploaded.

What we tested

We wrote four lines of invoice-style text, with a date, an invoice number and an amount, and made images of it that imitate common situations: a clean scan, the same text much smaller, an image made to look like a tilted phone photo with uneven light, and so on. Each image went through the tool, and we compared what came back with the original, character by character.

ImageCharacters read correctly
Clean scan, text set at 28 px100%
Low contrast: gray text on light gray100%
Slightly blurred, like camera shake100%
Text over a colored, patterned background100%
Handwriting-style script font89%
Small text, set at 10 px87%
Imitation phone photo: tilted 6 degrees, darker on one side86%

The first image took about 10 seconds, most of it the one-time download; after that each image took 2 to 4 seconds on a laptop.

What the results mean

Size matters more than anything else. Faint, slightly blurred or busy images of normal-sized text were read perfectly. Small text was not: set at 10 pixels, the tool misread about one character in eight, and one of its mistakes turned "2026" into "2025". A misread word is easy to spot; a misread digit looks perfectly plausible.

Tilt and shadows hurt. The tilted image with uneven light lost words in its darker half, where the letters sit closer in tone to the background.

Handwriting is a different problem. Even a tidy script font, which is more regular than real handwriting, came back at 89%. Expect real handwritten notes to need more correction; our guide to OCR for handwritten notes and receipts goes into this.

How to get a clean result

  • Make the text big. Crop to the part you need instead of photographing a whole page from far away. For screenshots, zoom in before you capture. For scans, 300 dpi is plenty.
  • Hold the camera square to the page so the lines are straight, and fill the frame with the text.
  • Use even light. Avoid your own shadow across the page; daylight from a window beside you works well.
  • Keep the original sharp. Images forwarded through messaging apps are often shrunk; use the original photo.
  • Check every number, name and date against the image before you rely on the text.

Scanned PDFs

The OCR tool reads images (JPG, PNG, WebP, GIF or BMP, up to 10 MB), not PDF files. For a scanned PDF, first turn its pages into images with PDF to Image, choosing PNG and the High setting (about 216 dpi), then read each page image. The result is plain text that you can copy or save as a .txt file; the tool does not create a searchable PDF.

When OCR is the wrong tool

  • If the PDF was made from a document rather than scanned, its text is already there: open it and copy, or convert it with PDF to Word.
  • For tables, OCR returns the words line by line, not the table structure, so expect to rebuild columns yourself.
  • For long documents in languages other than English and Hindi, a desktop OCR program with the right language pack will do better.

Privacy

Because the text is recognized in your browser, nothing is sent to a server. That makes it a reasonable choice for letters, receipts and documents you would not want to upload.

Written and tested by the PortImg team: the figures in this guide come from running files through our own tools. How we test

Image ToolsPDFTutorial
Found this helpful?

Try PortImg's free tools

Convert, compress, and edit images and PDFs — no sign-up needed.

Explore tools