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
- Photograph the page straight on, in daylight or bright, even light. Avoid shadows across the text.
- Fill the frame with the page. Crop away the table, the hand and the background.
- Use a sharp image, not a big one. A focused 1–2 megapixel photo reads better than a blurry 12-megapixel one.
- Split two-column pages if the engine mixes up the reading order.
- 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.