Why Does OCR Get My Text Wrong? Causes and Fixes
Most OCR mistakes come from the picture, not the reader: too few pixels per letter, a page that is tilted or curved, uneven light, or a decorative or handwritten font. Fix the picture, crop it to the text and choose the right language, and the errors drop sharply. They never reach zero, so always proofread names and numbers. This article explains what goes wrong, what accuracy we measured, and how to photograph or scan a page so it reads well, including Arabic, which has problems of its own.
What accuracy should I expect?
We tested Image to Text, which runs the open-source Tesseract engine on your device, on computer-drawn pictures of text in common fonts, and compared the output with the original letter by letter:
| Picture | Characters wrong |
|---|---|
| Clear printed English | 0% to 0.5% |
| Clear printed Arabic | 0.5% to 2.3% (worst on a low-resolution picture) |
| The same English, shrunk to 0.4× | 9.9% |
These are clean, ideal pictures. A phone photo of a real page is clearly worse; we have not put a number on it. Handwriting and calligraphic fonts are not reliable at all. The last row is the lesson: resolution alone took the error rate from almost nothing to one letter in ten.
What is causing the mistake I see?
| What you see | Likely cause | Fix |
|---|---|---|
| Similar letters swapped (rn for m, 0 for O, 1 for l) | Picture too small, blurred or compressed | Take a closer, sharper picture; enlarging afterwards does not add detail |
| Stray symbols around the text | Borders, stamps, photos or a patterned background | Crop the image to the text only |
| Lines broken or jumbled | Page tilted or curved, or laid out in columns and tables | Photograph the page flat; crop each column separately |
| Accented or foreign words mangled | Wrong language chosen | Pick the language of the text, or "Arabic and English" for mixed pages |
| "No text found" | Wrong language, text too small, or picture upside down | Check the language, move closer, rotate the picture |
| Text right but formatting lost | The tool outputs plain text | Reformat by hand; tables do not come back as tables |
How do I photograph a page so it reads well?
- Lay the page flat near a window in daylight. Even light beats the flash, which leaves a glare spot that wipes out whole words. Watch for the shadow of your hand or phone.
- Shoot straight down, with the phone parallel to the page. An angled shot makes lines curve.
- Fill the frame with text. Half a page close up reads better than a whole page from a distance; for small print, take the page in two halves.
- Use the original file, not a copy sent through a chat app. Messaging apps usually compress photos, and fine detail goes first.
- Crop away everything that is not text with Crop Image, and straighten a slight tilt with Rotate/Flip Image, which turns a picture one degree at a time.
- iPhone HEIC photos don't open in every browser: convert them first with HEIC to JPG.
- If you have a scanner, scan at 300 dpi. That is what Tesseract's own documentation recommends for ordinary text, and it usually beats any phone photo.
The tool does not clean up the picture for you: it does not straighten pages or boost contrast. It only shrinks very large photos so the longer side is at most 3,000 pixels, because Tesseract slows down a lot on them without reading any better. What you give it is what you get.
Why is Arabic harder?
- Dots: ب ت ث ن ي, ج ح خ, د ذ, ر ز and others differ only by their dots. One dot lost to blur or compression turns one letter into another; this is the most common Arabic error.
- Joined letters: Arabic letters connect and change shape at the start, middle and end of a word, so the reader cannot separate them by gaps the way it can with English.
- Diacritics (tashkeel): small marks near the dots, which can be read as dots or dropped. If you don't need them, strip them from the output with Arabic Tashkeel and then proofread.
- Mixed direction: numbers and English words inside an Arabic line can land in an unexpected place in the sentence.
What about a scanned PDF?
A PDF from a scanner is really pictures of pages, with no text to copy. Extract Text from PDF spots the pages with no text layer and offers to read them with the same OCR engine; you can then download a searchable PDF, the same file with the recognised text laid invisibly over each page.
It draws each page at about 1,700 pixels on the longer side before reading it. If the print is small and the result is poor, try another route: turn the page into a picture at 4× with PDF to Images, then read it with Image to Text, which takes up to 3,000 pixels. We have not measured the difference, but it gives the reader more pixels per letter.
Why not upload an ID or a contract to an OCR website?
The documents people most need text from are often the most sensitive: IDs, leases, medical letters, bank statements. Most free OCR websites upload the picture to read it on their servers. Here, Tesseract.js and the language data download to your browser the first time (about 4.5 MB for English, 3 MB for Arabic, 6 MB for both) and the picture is read on your device; it is never sent anywhere. Large cloud services may do better on difficult phone photos, because they run bigger models on their own machines; whether that is worth it depends on the document. For more on that question, read Is It Safe to Upload Documents to Online Converters?.
Quick answers
Can it read handwriting? Not reliably. Tesseract is trained on printed text. Neatly printed capital letters sometimes work; joined-up handwriting usually does not.
Should I choose "Arabic and English" just in case? Only for pages that really mix the two. For a page in one language, choosing that language alone is more accurate.
Why is the first run slow? It downloads the reader and the language data once. After that, a picture took 0.3 to 2 seconds in Chromium and WebKit and 4 to 6 seconds in Firefox in our desktop tests; older phones are slower.
Does it keep the layout? No. You get plain text that you can copy or download as a .txt file.
What to do next
Retake the picture with the steps above, crop it to the text, and read it with Image to Text, or with Extract Text from PDF if it is a scanned PDF. Before you paste the result anywhere, check every name and number against the original.
Try the tool
Copy the text out of a photo, screenshot or scan, in English or Arabic. The text reader runs on your device, so the image is never uploaded.
Open Image to Text (OCR) →