Why ordinary diff tools mislead on Urdu
Most text comparison tools were written for English. They cut text at spaces and compare the pieces character by character. On Urdu that produces two kinds of wrong answer: changes that are reported but cannot be seen, and changes that are real but get lost.
Look-alike letters. Arabic and Urdu share an alphabet but not every code. Arabic ك and Urdu ک are drawn the same at the start and in the middle of a word in the Naskh fonts most apps use, and so are Arabic ي and Urdu ی. Arabic ه stands for two Urdu letters, ہ and ھ. A generic tool marks كتاب and کتاب as different words, and you stare at two identical-looking words trying to find the change.
Aerab. دِل and دل are the same word, one with a zer. Whether that counts as a change depends on the job: it matters when checking poetry, and it is noise when one version was typed with diacritics and the other without.
Invisible characters. Text copied from PDFs and websites often carries zero-width spaces and direction marks. They change nothing on screen, but to a computer the word is different. This tool labels them inside a change, for example ZWSP, so you can see why a word was flagged.
Joined text. In Nastaliq a missing space after a letter that does not join forward, such as ا or و, is almost impossible to see: کیاآپ and کیا آپ look nearly the same. A comparison reports the missing space even when your eyes do not.
Punctuation. English tools treat ہے۔ as one word, so adding a full stop marks the whole word as changed. Here the Urdu full stop ۔, comma ،, question mark ؟ and semicolon ؛ are separate units, and the word stays unchanged.
What each option does
Take this pair of lines. The original has a pesh on the first word, an Arabic kaf and two spaces in a row; the changed version has none of these and adds a full stop.
اُس نے كتاب پڑھی اور سو گیا
اس نے کتاب پڑھی اور سو گیا۔
With every option off, the tool reports four differences: the first word, the double space, the kaf and the full stop. Each option removes one of them from the result:
| Option | What it treats as the same | Effect on the example |
|---|---|---|
| Ignore spacing and line-break differences | Any run of spaces, tabs and line breaks, plus spaces at the very start or end and invisible marks such as zero-width spaces | The double space no longer counts |
| Treat Arabic and Urdu look-alike letters as the same | ك and ک, ي and ی, and ه with either ہ or ھ | The Arabic kaf matches the Urdu one |
| Ignore aerab | Words with and without zabar, zer, pesh, tashdeed, jazm, tanween and khari zabar | اُس matches اس |
With all three on, only the added full stop is left.
The look-alike option is careful with one pair. Arabic ه may match either Urdu letter, but ہ and ھ stay different from each other, because کہا (said) and کھا (eat) are different words. Options never rewrite anything: the result shows your characters exactly as typed.
Compare words or compare letters
Words is the default. A changed word is shown once struck through and once underlined, and the summary counts words added, removed and unchanged. This reads naturally when you review an edit.
Letters shows the exact letter that changed. Compare تعلییم with تعلیم in letter mode and only the extra ی is struck through, instead of the whole word. A letter keeps its aerab, so a zer added to د shows as د removed and دِ added. Letter mode also shows the space added between کیا and آپ in the joined-text example above.
Checking an editor’s corrections
Suppose you sent an article to an editor and got it back as a WhatsApp message or a new file, with no tracked changes. Paste your draft as the original and the returned text as the changed version. If the lines were re-wrapped, turn on the spacing option so line breaks do not fill the result. What remains is the real editing: a word swapped here, a sentence added there. Spelling fixes, such as مین corrected to میں, are explained in common Urdu spelling mistakes, and punctuation fixes are counted separately in the summary; the Urdu punctuation guide explains the rules editors usually apply. To check a draft before you send it, run it through the Urdu spell checker first.
Comparing an OCR result with a retyped text
When you read a page with Urdu OCR and also have a typed copy of part of it, comparing the two in letter mode shows exactly where the reader went wrong: a dot missed, so پ became ب, or a space lost between two words. Turn on the look-alike option if one of the texts came from a source that uses Arabic letters. Text copied out of a PDF is a different case: it often holds letter shapes and invisible characters, so repair it with Fix Broken Urdu Text before comparing; the guide to why Urdu copied from a PDF looks broken shows what those problems look like.