Fix Urdu and Arabic Text Copied from a PDF
Paste text that came out backwards or in broken letters, and get it back as you would type it. Works for Urdu, Arabic and Persian. Everything happens on your device.
How to fix text copied from a PDF
- Copy the text from the PDF and paste it into the box.
- The fixed text appears below at once. If a line still reads backwards, choose how the lines are broken under Line order.
- Copy the fixed text or download it as a file.
Examples
- Urdu laid out backwards, in letter shapesﯽﺌﮔ ﮪﮍﺑ (ًﺎﺒﯾﺮﻘﺗ) ﯼﺩﺎﺑﺁ ﯽﮐ 2025 ﮟﯿﻣ ﻥﺎﺘﺴﮐﺎﭘپاکستان میں 2025 کی آبادی (تقریباً) بڑھ گئی
- Arabic laid out backwardsﺔﺋﺎﻤﻟﺍ ﻲﻓ 125 ﺩﺪﻌﻟﺍ ،ﻪﻠﻟﺍ ﺔﻤﺣﺭﻭ ﻢﻜﻴﻠﻋ ﻡﻼﺴﻟﺍالسلام عليكم ورحمة الله، العدد 125 في المائة
- Urdu with its words backwardsہے۔ زبان قومی کی پاکستان اردواردو پاکستان کی قومی زبان ہے۔
- Arabic with its lam ligatures turned roundإىل عىل األدب ال بأسإلى على الأدب لا بأس
How we checked it
- We printed 792 sentences, 192 in Urdu and 300 each in Persian and Arabic, to a PDF with Chrome and copied them out with pdftotext, a common PDF reader on Linux. None came out right; after the fixer, 743 did (94%): 189 Urdu, 291 Persian and 263 Arabic. More than half the rest are words whose لا came out as ال where the word list couldn't settle it, mostly because both spellings are words, such as طالب and طلاب.
- Read in its raw order, with every line's words backwards, 191 of the Urdu and 223 of the Arabic sentences came back whole. Persian fared worse in that mode, which breaks lines at the joiner inside words such as میشود.
- We also broke every third sentence ourselves, from the Unicode data alone: in letter shapes, laid out backwards letter by letter, and with the words backwards. The fixer put back all of them but one.
- On correct text, 47,901 words of Urdu, Persian and Arabic, it changed nothing.
Frequently asked questions
Why does Urdu or Arabic text come out broken when I copy it from a PDF?
A PDF stores the shapes on the page, not the text. Many PDFs record each letter as the shape it takes at the start, middle or end of a word (the Arabic presentation forms), and in the order they are drawn, from left to right. Copied out, the text runs backwards, and the letters, though they look right, are not the ones a keyboard types: search, spell check and sorting all fail on them.
What does the fixer change?
It turns the letter shapes back into letters, reverses lines laid out backwards letter by letter or word by word while keeping numbers and English words the right way round (2025 میں, not 5202), removes the invisible direction marks some PDF readers add, and mends the lam ligature where it came out turned round: اهلل as الله, عىل as على, اسالم as اسلام.
A line still reads backwards. What can I do?
The fixer decides line by line from the letter shapes and from where the full stop is. A heading or a line without a full stop follows the rest of the text. If it still guesses wrong, choose under Line order whether every line is backwards letter by letter or word by word.
Does it work for Persian, Pashto and Sindhi?
Persian, yes: it was checked on Persian text as well as Urdu and Arabic. Pashto, Sindhi and other languages in the Arabic script get the same fixes for letter shapes and order, but the word list that mends لا covers Urdu, Persian and Arabic only.
Is my text sent anywhere?
No. The text is fixed in your browser, and nothing you paste leaves your device. The word list is downloaded once, like the page itself.