Skip to content

What is Nastaliq OCR, and why is it hard?

Nastaliq OCR is optical character recognition for Urdu printed in the Nastaliq script: it turns a scanned page into editable Unicode text. It is one of the hardest scripts for machines to read.

Last updated 14 October 2026

What Nastaliq is

Nastaliq is the calligraphic style of the Perso-Arabic script used for most printed Urdu: books, newspapers and magazines. Since the early 1980s, digital Nastaliq typefaces such as Noori Nastaliq have made it the standard for Urdu publishing. Arabic, by contrast, is usually printed in Naskh.

کتاب انسان کی بہترین دوست ہے۔

Why it defeats most OCR

  • A sloping baseline. Each word descends diagonally from right to left instead of sitting on one line, so words cannot be cut into letters along a flat baseline.
  • Stacked ligatures. Letters join and stack into thousands of distinct shapes; the same letter looks different depending on its neighbours.
  • Overlap. The tail of one word often sits under the start of the next, and lines are set close together.
  • Dots that move. Dots shift away from their letters to fit the stack. A single misplaced dot turns one word into another, for example محفوظ (safe) and محفوط.
  • Training data. Most OCR systems learn from Naskh Arabic, which looks very different.

How to get accurate Urdu OCR

  1. Scan at 300 dpi or more, flat and well lit; avoid photos taken at an angle.
  2. Check quality first. LexaOCR scores each page and forecasts its accuracy before reading.
  3. Use more than one reader. When independent readers agree on a word, it is almost certainly right; when they disagree, a person should decide.
  4. Check against a dictionary. Most dot errors produce words that do not exist.
  5. Review only what is uncertain, rather than proofreading every word.

How LexaOCR does it

LexaOCR sends every Urdu line to several independent readers, including one built for Nastaliq. A voting agent lines up their words, a linguist agent checks disputed words against a 146,000-word Urdu dictionary, and only the words still in doubt are shown to you, with each reader's version beside it. The page comes back in its own layout, as text and a Word file. See Urdu book OCR and Urdu poetry OCR.

Questions

What is Nastaliq OCR?

Nastaliq OCR is optical character recognition for text written in the Nastaliq script, the calligraphic style in which most Urdu books and newspapers are printed. It turns an image of the page into editable Unicode text.

Why is Nastaliq harder to read than Naskh?

In Nastaliq, the letters of a word slope down from right to left and stack into ligatures, words overlap their neighbours, and dots shift position. Naskh sits on a flat baseline, so it is much easier for machines to segment.

Can general OCR tools read Urdu?

Many tools can read Urdu printed in Naskh, but accuracy usually drops sharply on Nastaliq, especially on older books and newspapers.

How does LexaOCR read Nastaliq?

LexaOCR uses several independent readers, including one made for Nastaliq, votes on every word, checks disputed words against a 146,000-word Urdu dictionary, and shows the user only the words that remain uncertain.

See how it reads your Urdu

The quality check is free, and nothing is read until you confirm.

Upload a scan