arabe
How to remove Arabic tashkeel without damaging the letters
A complete method to strip Arabic diacritics from a text, know what should be removed or kept, and avoid the classic copy-paste mistakes.
Published on · Updated on · 2 min read
Vocalised Arabic text carries two layers: the letters and the diacritical marks. When you paste that text into a form, a spreadsheet or a search box, those marks can break search, inflate character counts or create invisible duplicates.
The concrete problem
You receive a paragraph such as « إِنَّ مَعَ الْعُسْرِ يُسْرًا » and need to compare it with another text written without vowels. Searching for « العسر » finds nothing, because the source contains fatha, kasra and shadda between the letters. The search fails not because the data is missing, but because the character string is not identical at the Unicode level.
What Arabic diacritics actually are
Arabic diacritics occupy the U+064B–U+065F range (fathatan, dammatan, kasratan, fatha, damma, kasra, shadda, sukun), plus U+0670 (superscript alef) and the Quranic marks U+06D6–U+06ED. They are full characters: each mark counts as one character in a counter even though it produces no sound on its own.
Tatweel (U+0640), called kashida, is another case: it is not a diacritic but a typographic elongation stroke. It visually stretches a letter to justify a line and badly disrupts text comparison.
The four-step method
- Copy the source text into an editor that preserves Unicode (your browser is enough).
- Remove the diacritics with a dedicated tool that reports what it removed. This is the key point: you must know how many marks were removed and be able to check that no letter was substituted.
- Handle tatweel separately depending on the goal: for an identifier or a URL, remove it; for a decorative printed title, it can stay.
- Check the final text with an invisible-character detector to catch ZWSP (U+200B) or RLM (U+200F) left behind by word processors.
Important rule: removing vowels is not letter normalisation. No operation should turn أ into ا without telling you explicitly.
Mistakes to avoid
- Confusing tashkeel with hamza: أ, إ and آ are not diacritics, they are letters with hamza or madda. Replacing them with ا changes spelling and sometimes meaning.
- Using a global “Arabic characters” replacement in a spreadsheet: it also destroys Arabic punctuation (، ؛ ؟) that often must be kept.
- Forgetting tanwin: the double vowel at the end of a word (ـًا) is made of two code points and sometimes disappears only partially.
- Assuming a Linux byte counter and a web character counter agree: one counts UTF-8 bytes, the other UTF-16 units.
When to keep the tashkeel
Tashkeel is essential for religious texts, poetry, children’s textbooks and ambiguous words (for instance to separate verb forms that look identical in writing). If your goal is search, sorting or comparison, remove it. If your goal is reading aloud or teaching, keep it and work on a non-vocalised copy for indexing.
A three-second sanity check
After removal, compare the character count before and after. For a 200-character text with dense vocalisation, a 15–25% reduction is normal. A reduction above 40% probably means letters were deleted: revert and read the report again.
Related tools
Use the tashkeel remover for the main operation, the Arabic text cleaner for punctuation and spacing, and the invisible character detector for final verification. Those three steps are enough to prepare a clean corpus.