Arabic image to text turns printed Arabic in a picture into text you can edit, search and paste. It’s built for the everyday cases: a scanned letter or contract, a page from a university reader, a restaurant menu, a product label, a screenshot of a chat or a news site that won’t let you select the text.
The page starts with Arabic and English selected, because so much Arabic text has English in it: brand names, email addresses, course codes, part numbers. Both are read in the same pass.
How Arabic script trips up OCR
Arabic print is cursive. Letters join to their neighbors, so there’s no gap between letters for an engine to rely on. Each letter also changes shape with its position: ع looks different at the start of a word (عـ), in the middle (ـعـ) and at the end (ـع). The model has to recognize all of these as the same letter.
Six letters, ا د ذ ر ز و, never join to the letter after them. That leaves small gaps inside words, and when spacing is tight, those gaps can be mistaken for word breaks. A word that comes out split in two, or two words run together, is usually this.
Then there are the dots. Many letters share a body and differ only in their dots: ب ت ث ن ي in the middle of a word, ج ح خ, س ش, ص ض, ع غ, ف ق. Dots are the smallest part of the text, so blur, low resolution or a heavy JPEG are the usual reasons one letter turns into another.
Clear printed Arabic in a plain font is usually read well. Calligraphy is another matter. Thuluth, Diwani and Kufic styles stack and stretch letters in ways body-text fonts never do, so crop decorative headings and logos out and read the body text.
Harakat and fully vowelled text
Most modern Arabic leaves out short vowels, and that’s the easiest case. Fully vowelled text, such as the Quran, poetry, children’s books and grammar textbooks, adds fatha, damma, kasra, sukun, shadda and tanween above and below the letters. These marks are tiny and sit close to the dots, so expect some to be dropped, shifted to a neighboring letter or read as dots.
If you need the harakat exactly as printed, go through every line against the image. If you only need the words, it’s often quicker to remove the marks entirely: open find and replace with Ctrl+F (⌘F on a Mac), tick regexp, search for [ً-ْ] and replace all with nothing.
Right to left, with English and numbers
In the editor, each line takes its own direction. Arabic lines run right to left, English lines left to right, and a line that mixes both follows the direction of its first letter. Mixed lines can look jumbled around punctuation and brackets, which is often just how mixed-direction text is displayed rather than a reading mistake. Compare with the image before changing anything.
Numbers need a second look whichever digits your document uses. Western digits (0123), Arabic-Indic digits (٠١٢٣) and the Eastern forms used in Persian and Urdu (۰۱۲۳) all appear in Arabic print, sometimes on the same page. Small digits are easy to misread, so check phone numbers, dates, prices and reference numbers before you rely on them.
Persian, Urdu and other languages in Arabic script
Persian and Urdu use the Arabic alphabet plus letters of their own, and each has its own option in the language menu. Persian adds پ چ ژ گ. Urdu adds ٹ ڈ ڑ ں ے and more, and is often printed in the Nastaliq style, which is much harder to read. If your text is Urdu, the Urdu image to text page explains what to expect.
Choosing the right language matters even when letters look the same. Read Persian or Urdu text as Arabic and the result can contain the Arabic versions of letters such as ي and ك instead of ی and ک, which look alike but don’t match in search.
Getting a cleaner result
- Give the dots enough pixels. Move closer to the page or zoom in before taking a screenshot. Small text is where dots merge and letters change.
- Crop to one column. Newspapers and magazines set Arabic in narrow columns. Crop to one article so lines from the column beside it aren’t joined in.
- Straighten angled photos. Use four-corner straightening on photos of pages, menus and signs taken from the side.
- Avoid glare on glossy paper. A bright patch from the flash wipes out dots first. Tilt the phone instead, as the photo to text page explains.
- Leave dark mode as it is. Light text on a dark background is inverted automatically by Auto improve, which lists every step it took.
Checking what it read
Words the engine was unsure about are underlined, with a button to jump from one to the next. Click any line and its place lights up on the image. In Arabic, start with the letters that differ only by dots, words that may have been split at a non-joining letter, and the start and end of each line, where a letter can be dropped. Find and replace fixes a name or term that’s misread the same way throughout. For general tips, see how to get accurate OCR results.
Where the text goes next
- Word (.docx) sets the paragraphs to right to left, ready to edit. See image to Word.
- Copy and paste into Google Docs, Word, email or a chat. Some editors open pasted text left to right, so switch the paragraph direction to right to left if the lines sit on the wrong side.
- PDF opens your browser’s print dialog for Arabic, where you choose “Save as PDF” so every letter is drawn correctly.
- Searchable PDF keeps the original image with an invisible Arabic text layer you can search and select. It’s a good way to archive scanned documents.
- Web page (.html), plain text and Markdown are available too, and the HTML file is marked as Arabic and right to left.
For a multi-page scan, every page is read in turn, and Whole document view combines them into one file. See PDF to text.
Private by default
Contracts, statements and personal letters stay on your device. The image is read in your browser and is not uploaded, and history is off unless you turn it on. Read more in is online OCR private?