Urdu is one of the hardest languages for OCR, and it’s better to say so up front. The reason is the writing style more than the language, and once you know which style your image uses, you’ll have a good idea of what to expect.
People use Urdu image to text for poetry and quotes shared as images, notices and forms, pages from books and textbooks, newspaper columns, and screenshots of posts and messages. This page starts with Urdu and English selected, because so many documents in Pakistan and India mix the two. Both are read in the same pass.
Nastaliq and Naskh
Urdu is written in two main styles.
Naskh sits on a flat baseline, like printed Arabic. You’ll see it in Urdu typed on many phones, apps and websites, depending on the font the device uses, and in some signs and documents.
Nastaliq is the traditional style for Urdu, used in most newspapers, books, magazines, posters and wedding cards. Each word slopes down from right to left, letters stack on top of one another, the same letter takes very different shapes depending on its neighbors, and dots crowd together around the joins.
The OCR engine finds words by following lines of text, then works out the letters along each line. Naskh fits that approach well. Nastaliq doesn’t: there’s no single straight baseline, letters overlap, and the boundaries between them are hard to find.
What that means in practice:
- Naskh-style screenshots and documents often give a useful result with a modest number of corrections.
- Large, clear Nastaliq, such as a heading, a poster or a quote in a big font, can give a usable draft.
- Small Nastaliq print, especially newspapers and older books, often comes out with many mistakes. Sometimes retyping a short passage is quicker, and that’s a fair choice to make.
To tell which style you have, look at a long word. If it steps down diagonally toward the left, it’s Nastaliq. If its letters sit level along one line, it’s Naskh.
Getting the best from Nastaliq
- Make the text as large as you can. Zoom in before you take a screenshot, or move closer for a photo. Stacked letters separate more clearly when each word has plenty of pixels.
- Crop to one column or paragraph. Urdu newspapers use narrow columns and boxed stories. A tight crop keeps lines from neighboring columns out.
- Leave headlines out. Large calligraphic headlines are styled differently from the body text. Read them as a separate crop, or type them.
- Increase contrast on newsprint. Gray, thin paper with show-through from the other side reads better after raising Contrast or trying Black & white.
- Copy from the source when there is one. If the text exists on a website or in a document you can select, copying it from there is more accurate than any OCR.
Choose Urdu, not Arabic
Urdu uses the Arabic alphabet plus letters of its own: ٹ, ڈ and ڑ, the nasal ں, the final ے, and ھ in aspirated sounds such as بھ, پھ and تھ. The Urdu model is trained on these; the Arabic model is trained on Arabic, which doesn’t use them.
There’s a less obvious reason too. Some letters look the same in both languages but are different characters: Urdu ی and ک, and ہ, against Arabic ي, ك and ه. Read Urdu as Arabic and the result can contain the Arabic forms, which look right but won’t match when you search the text or paste it somewhere that checks spelling. Choosing Urdu avoids that, which is why this page selects it for you. The Arabic image to text page covers Arabic itself, and Persian has its own option in the language menu.
PDFs that copy badly
Much Urdu print is typeset in InPage, and some PDFs made from it, or from older non-Unicode fonts, don’t copy properly: you get broken letters, boxes or jumbled text. Image to Text App takes a PDF page’s existing text as it is, so a page like that would show the same problem here. Take a screenshot of the page and paste it with Ctrl+V instead, and it’s read as an image. Scanned PDFs are always read with OCR. See PDF to text.
Urdu with English, numbers and Roman Urdu
Forms, notices, bills and official letters often switch between Urdu and English, and both are read with the preset selection. In the editor, each line is shown in its own direction, so Urdu lines run right to left and English lines left to right.
Numbers deserve a second look. Urdu print uses Western digits (123) or Urdu digits (۱۲۳), and small digits are easy to misread, so check dates, amounts and phone numbers against the image.
Roman Urdu, written in English letters as in most chats, is read as ordinary Latin text and needs no special setting.
Checking what it read
Words the engine was unsure about are underlined, with a button to step from one to the next. Click any line and its place lights up on the image. Start with letters that differ only by their dots, such as ب, ت, ٹ and ث, then the letters that come out of Nastaliq’s stacked joins, and the end of each word, where ں and ے are easy to lose. Find and replace corrects a name or word that’s misread the same way throughout. For more, see how to get accurate OCR results.
Where the text goes next
- Word (.docx) sets the paragraphs to right to left. See image to Word.
- Copy and paste into Google Docs, Word, email or WhatsApp. If an editor shows the pasted lines on the left, switch the paragraph direction to right to left.
- Searchable PDF keeps your original image and adds an invisible Urdu text layer you can search.
- PDF opens your browser’s print dialog for Urdu, where you choose “Save as PDF”.
- Web page (.html), plain text and Markdown are available too.
The Urdu text you get is standard Unicode. It shows in any modern app, though the font your app uses decides whether it appears in Nastaliq or Naskh style.
Private by default
Family documents, letters and personal messages stay on your device. The image is read in your browser and isn’t uploaded, and history is off unless you turn it on. Read more in is online OCR private?