Tatweel remover
The tatweel (kashida, ـ) is a single Unicode character, U+0640, that stretches the join between letters for purely visual reasons: “مـــرحبا” and “مرحبا” read as the same word but are different strings to a computer. Removing it makes search, matching, de-duplication and data cleaning work. Every other letter and diacritic is left alone. Removing the tatweel and removing kashida are the same job here, because kashida is another name for the tatweel.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Paste your text into the input box, or press “Load example”.
- Choose “remove every tatweel” or “shorten runs to a single tatweel”.
- Decide what happens to a tatweel that is immediately followed by a diacritic (such as “ـً”): keep it as the carrier, remove it, or remove it together with its mark.
- Check the counters and the result, then copy it or download it as a text file.
Example
The built-in example has three lines: “مرحبـــًا بكم في متجـــرنا”, then “الســـعر 150 ريال — Arabic kashida ـَ”, then “بدون تطويل هنا” with no tatweel at all.
With the defaults (remove every tatweel, keep a carrier) 10 tatweel characters are found and 8 are removed across 3 words, while 2 stay because they carry a diacritic. The result is “مرحبـًا بكم في متجرنا”, then “السعر 150 ريال — Arabic kashida ـَ”, then “بدون تطويل هنا”.
Switch to “shorten runs” and only 6 are removed, leaving one tatweel in each word: “مرحبـًا بكم في متجـرنا” and “الســعر…” becomes “السـعر…”. Choose “remove it together with its mark” and all 10 tatweels plus 2 diacritics go, so “ـً” and “ـَ” disappear completely.
Limits and caveats
- Tested with 100,000 lines (about 4 MB): the result is computed in about a second, but the browser text box needs several seconds to display a paste of that size. Automatic processing therefore stops above about 4,000 lines or 150,000 characters and the “Remove tatweel” button takes over. The preview shows only the first 300 lines; copy and download use the full result, and the text box then shows every line in one direction because working out a direction per line makes the browser slow.
- Exactly one character is removed: U+0640 ARABIC TATWEEL. Everything else is copied through byte for byte: letters, diacritics, punctuation, digits, spaces and Latin text. No alef, ya or ta marbuta folding, and no diacritic removal (a separate tool does that).
- The “words affected” counter splits the text at white space: a word that lost one or more characters is counted once.
- A “carrier” tatweel is detected by one rule: a tatweel immediately followed by a character in the Unicode Mark category, which covers every Arabic diacritic. A tatweel followed by a space or an ordinary letter is treated as decorative.
- The tool cannot know the author’s intent: some fonts and layout programs insert a tatweel to justify a line, and removing it changes how the line looks without changing the words or how they are read.
Questions about this tool
What is the tatweel and why remove it?
The tatweel or kashida (ـ) is a single Unicode character, U+0640, with no sound and no meaning; its only job is to lengthen the join between two letters for justification or decoration. The problem is that “مـنتج” and “منتج” are two different strings in any database or search engine, so search fails, the same product appears twice in a list and file-to-file matching breaks. Removing the tatweel makes the text searchable and matchable without changing a single word.
What happens to a diacritic written on a tatweel, such as “ـً”?
This is a real case: grammar lessons and vocalization tables write a tatweel purely so it can carry a mark on its own. If the tatweel were deleted the mark would be left floating and the browser would park it on the previous character, changing how the preceding word looks. So the tool detects every tatweel that is immediately followed by a combining mark, gives you three clear options with their own counter, and never decides silently. The default keeps that one tatweel.
Does the tool also remove diacritics?
No. Diacritics stay exactly as they are unless you explicitly choose “remove it together with its mark”, which only removes marks that were sitting on a tatweel and reports how many. To strip diacritics from the whole text use the separate Arabic diacritic remover.
How do I remove kashida from Arabic text?
Just paste the text: the default “Remove every tatweel” deletes every kashida character at once and shows how many were removed and how many words were affected. “مرحبا” stretched with three tatweel characters after its first letter comes back as plain “مرحبا”, counted as 3 characters removed in 1 word. Then copy the result or download it as a text file.
Are tatweel and kashida the same thing?
Yes. Tatweel and kashida are two names for the same character, the single Unicode code point U+0640 ARABIC TATWEEL. The tool removes it whichever name you know it by, and it never touches the maddah in “آ”, which is part of that letter and not a tatweel.
