Why OCR struggles with Persian, Arabic and Urdu

OCR struggles with Persian, Arabic and Urdu because the letters join, change shape, and are told apart by tiny dots, and because many documents use calligraphic styles that most models never saw in training. A clear, straight, well-lit photo fixes more errors than switching engines.

What makes these scripts hard

  • Letters connect and change shape. Most letters have up to four forms, depending on whether they stand alone or sit at the start, middle or end of a word. An engine has to find where one letter ends and the next begins inside one flowing line.
  • Dots decide the letter. ب, پ, ت and ث share one shape and differ only in the number and place of their dots. A speck of dust, a fold in the paper or a blurry photo can turn one letter into another.
  • Nastaliq slants and stacks. Urdu and much Persian poetry use Nastaliq, where each word slopes down to the left and letters sit on top of each other. Engines trained on straight, Naskh-style print often fail on it.
  • Spaces are not always spaces. Persian uses a zero-width non-joiner (نیم‌فاصله) inside words like می‌خواهم. Writers use it inconsistently, so even the "right" answer is not always clear.
  • The same letter has two codes. Persian and Arabic write ی and ک with different Unicode characters that look almost the same. Search and copy-paste break if the engine picks the wrong one.
  • Directions mix. Text runs right to left, but numbers, dates and English words run left to right. The engine has to keep the reading order straight when both appear in one line.
  • Digits come in two sets. Persian ۰۱۲۳۴۵۶۷۸۹ and Arabic ٠١٢٣٤٥٦٧٨٩ differ in a few digits, and both appear next to Western 0–9.

How to get better results

  1. Photograph the page straight on, in daylight or bright, even light. Avoid shadows across the text.
  2. Fill the frame with the page. Crop away the table, the hand and the background.
  3. Use a sharp image, not a big one. A focused 1–2 megapixel photo reads better than a blurry 12-megapixel one.
  4. Split two-column pages if the engine mixes up the reading order.
  5. Check names, numbers and dates by hand. These are where a single wrong dot matters most.

Which engine to use

It depends on the page. On our Persian benchmark, large vision-language models did much better than classic OCR engines on photos and mixed text, but every engine still made mistakes on Nastaliq. You can try the preview models free on your own pages and compare them side by side in the console.

More from the blog

Benchmark

How well does OCR read Persian? We tested six engines

On eight Persian test pages, the best engine got 3.1% of characters wrong and the worst 18.5%. Here is how we tested, what each engine got wrong, and how to rerun it.

Read
Product update

Four open OCR models, now in the console

GLM-OCR, LightOnOCR-3, dots.mocr and KDL Frontier Parser nano now run on Runemic's own GPUs. What each is good at, what they cost, and why the first page can take a few minutes.

Read

Try Runemic OCR free

Read your own pages in the browser, with no account. When you want more, sign in with GitHub or Hugging Face.

  • Free at runemic.com/try, no sign-up
  • Sign in for 2,500 free credits, no card needed
  • Compare up to three models, and get an API key with cURL, Python and JavaScript examples
# one page in, Markdown out
curl https://api.runemic.com/v1/ocr \
  -H "Authorization: Bearer $RUNEMIC_KEY" \
  -F "file=@page.png"

# → { "text": "# Invoice No. 4821 …",
    "usage": { "credits_used": 2 } }