You have Urdu in a picture: a photo of a notice, a screenshot of a WhatsApp forward, a scanned page from an old book, or a PDF that turns into gibberish when you copy from it. Retyping it is slow. OCR, short for optical character recognition, can read the letters for you and give you text you can edit.
This guide explains what OCR can and cannot do with Urdu, and how to get the best result.
First, check whether you need OCR at all
Many “image” problems are really text problems. Try this before running OCR:
- Open the PDF and try to select a word. If you can highlight individual words, the PDF already contains text. Use Urdu PDF to Word to extract it exactly, with no recognition errors.
- If the copied text comes out reversed, in pieces or with Arabic letters, the text is there but damaged. Fix Broken Urdu Text repairs it; our guide on why Urdu copied from PDFs looks broken explains each kind of damage.
- If you get random English letters or nothing at all, the page is a picture (a scan, a photo, or a PDF exported from InPage as shapes). That is when you need OCR.
OCR is always a guess, however good; extracting real text is always exact. Use OCR only when there is no text to extract.
How Urdu OCR works
An OCR engine looks at the image in stages:
- Clean-up. The image is converted to clean black and white, so letters stand out from the background.
- Finding lines and words. The engine works out where each line of text runs.
- Recognition. A trained model reads each line and predicts the most likely letters, using what it learned from thousands of example lines.
- Output. The result is ordinary Unicode Urdu that you can edit, copy and save.
Our Urdu OCR tool sends images to an AI reader, a large model that reads both Naskh and Nastaliq. If it is busy, or you choose to keep the image on your device, two readers in your browser take over: Tesseract, a well-known open-source OCR engine with its Urdu model, and for Nastaliq a second reader trained on printed Urdu books. Scanned PDFs are always read in your browser.
Why Nastaliq is so much harder than Naskh
Most OCR models were trained mainly on Naskh, the straight style used on phones, websites and in Word’s default fonts. Naskh letters sit on one baseline, like English, so lines are easy to follow.
Nastaliq, the style of Urdu books, newspapers and InPage, is a different challenge:
- each word slopes down from right to left, so a “line” is really a staircase of slanted words;
- letters overlap and stack on top of each other;
- the same letter changes shape a lot depending on its neighbours;
- dots and diacritics float far from the letter they belong to.
In our tests, about 99 letters in 100 of clear Naskh text were right. A general engine trained on Naskh (Tesseract) got only about two letters in three right on Nastaliq. A small reader trained on Nastaliq, running in the browser, gets about 92 letters in 100 right across 46 Nastaliq test images. The AI reader our tool now uses first did better still on the 22 Nastaliq images it was tested on: about 96.5 letters in 100, and about 99 in 100 on poetry images. That saves a lot of typing, but Nastaliq results must still be proofread: most remaining mistakes are a missing dot, a joined or split word, or an unusual name.
| Source | Typical result |
|---|---|
| Screenshot of Urdu on a phone or website (Naskh) | Excellent; often perfect |
| Clean printout of a Word document in Naskh | Very good |
| Newspaper or book page in Nastaliq | Good; check names and every line |
| Poetry on a decorative background | Very good with the AI reader; more errors when read on the device |
| Handwriting | Not supported |
How to get the best results
The single biggest factor is the image itself. Before you run OCR:
- Get it sharp. Hold the phone flat above the page, in good light, without zooming digitally. Blurry letters cannot be read.
- Crop to the text. Remove pictures, borders, page numbers and the facing page.
- Keep it straight. A page photographed at an angle bends the lines.
- Make text big enough. Letters should be at least 20–30 pixels tall in the image. Zoom in on small print when photographing it.
- Prefer dark text on a light background. Coloured backgrounds and patterns, common on poetry images, confuse the engine.
- Use screenshots when you can. A screenshot of on-screen Urdu is perfectly sharp and gives the best results of all.
Step by step with the Urdu OCR tool
- Open Urdu OCR and drop your image (JPG, PNG or WebP) or scanned PDF on the box, or paste a screenshot with Ctrl + V.
- Images go to the AI reader and usually come back in 10 to 30 seconds. Scanned PDFs are read on your device: the first time, the OCR engine and Urdu model download (about 2 MB), then each page takes a few seconds.
- Compare the result with the image and correct mistakes directly in the text box.
- Copy the text, or download it as a Word file or a plain text file.
For scanned PDFs, each page is rendered and read on your device, up to 50 pages at a time.
Cleaning up the result
After OCR, a few tools speed up the proofreading:
- Urdu Spell Checker highlights words that are not in its Urdu dictionary, which is where most OCR mistakes hide.
- Fix Broken Urdu Text normalises Arabic ي and ك to Urdu letters and removes stray spaces.
- Urdu Word Counter helps you check that no line went missing, by comparing word counts with the original.
Other options, and the privacy trade-off
Large AI models, such as those behind Google Lens, Google Drive and the AI reader in our own tool, read Nastaliq far better than small engines, because they run on powerful servers. The trade-off is that the image leaves your device. Our tool does not store images and asks its AI provider not to keep them, but for private documents (identity cards, legal papers, personal letters) switch on “Read on my device only”: the image then stays on your device, at the cost of more mistakes in Nastaliq.
For large archives of Nastaliq books, research groups have built specialised Nastaliq OCR models that are far more accurate on Nastaliq than general engines. Some are now small enough to run in a web page: the Nastaliq reader in our tool is one of them, a text-line model by Benjamin Kiessling for the kraken OCR system.
Try it now: Open a screenshot or scanned page in Urdu OCR (Image to Text) and use the tips above to get the cleanest result.