How to remove tatweel from Arabic text

Someone typed a product name with stretched letters so it would look nicer in a post, and then the name was copied into your product file. Now the product does not show up when a customer searches for its normal name. The cause is a single character the eye does not notice: the tatweel.

Published · 2 min read

What is the tatweel?

The tatweel, also called kashida, is the horizontal stroke that stretches the join between Arabic letters, as when «مرحبا» is written with three tatweels after the ba. To a computer it is a separate character, U+0640. So the stretched word and the normal word read as one word, but they are different text for search, matching and removing duplicates.

Worked example

The line «مرحبا بكم في متجرنا», with three tatweels after the ba in «مرحبا» and three after the jeem in «متجرنا».

With the default settings 6 tatweels are removed in 2 words, and the line becomes «مرحبا بكم في متجرنا» with no tatweel at all.

With “Shorten runs to a single tatweel”, only 4 are removed and one tatweel stays in each word.

A tatweel that carries a vowel mark

Sometimes a tatweel carries a vowel mark, such as tanwin on a tatweel. Removing it alone leaves the mark with no letter to sit on. So the tool gives you three choices: keep it as the carrier, which is the default, remove it, or remove it together with its mark.

How to do it

  1. Open the Arabic tatweel remover and paste your text.
  2. Choose “Remove every tatweel” or “Shorten runs to a single tatweel”.
  3. Decide what happens to a tatweel that carries a vowel mark.
  4. Check the counters and the result, then copy or download it.

What the tool does not do

  • It removes exactly one character, U+0640. Every letter, diacritic, digit and piece of English text stays as it is.
  • It does not remove diacritics. There is a separate tool for that: Arabic diacritic remover.
  • It cannot know the writer's intent: some layout programs insert tatweels to justify a line, and removing them changes how the line looks without changing its words.

After removing tatweels, lines that were different may now be identical. Remove the repeats with the Duplicate-line remover.

Common questions

Does removing the tatweel change the word's meaning?

No, the tatweel is purely decorative. The word reads the same after it is removed.

How do I know my text has tatweels?

The tool counts the tatweels it found and the words that changed, even if you did not notice them by eye.

Is my text sent to a server?

No, everything happens inside your browser.