Moayyad Faris
Arabic Developer Tools

Processed locally in your browser — not uploaded

Arabic Text Normalizer

Clean up inconsistent Arabic text for search, comparison or display: remove diacritics, unify Alef and Ya variants, strip Tatweel elongation, collapse whitespace, and convert between Arabic-Indic and Western digits. Every transform is opt-in. Runs entirely in your browser.

Opt-in Transformation Rules
||
Normalized text will appear here...
01

How to use

  1. Paste or type Arabic text into the input field.
  2. Toggle each normalization independently — they're opt-in, not all-or-nothing.
  3. Choose a numeral conversion direction if you need Arabic-Indic and Western digits unified.
  4. Copy the normalized output.
02

Understanding the output

Each toggle applies one transformation: removing diacritics (tashkeel), collapsing Alef variants (أ إ آ ٱ) to plain ا, converting Alef Maqsura (ى) to Ya (ي), converting Ta Marbuta (ة) to Ha (ه), removing Tatweel (ـ) elongation characters, collapsing repeated whitespace, and converting between Arabic-Indic and Western digits.

03

Common issues & tips

  • •Ta Marbuta and Alef Maqsura normalization change word endings — turn them off if you need to preserve exact spelling (e.g. for display text rather than search/matching).
  • •Numeral conversion is one-directional per run — pick Arabic→Western or Western→Arabic, not both at once.
  • •Collapsing whitespace also joins line breaks into single spaces. Turn it off to keep paragraphs and line structure.
  • •Only Arabic-Indic digits (٠-٩) are converted. Persian digits (۰-۹) are left unchanged.

What each normalization does

Every option is independent. The examples below were produced by this tool with only that option enabled:

OptionBeforeAfterTypical use
Remove diacriticsمَدْرَسَةٌمدرسةSearch, matching, deduplication
Normalize Alefأحمد إسلام آمناحمد اسلام امنSearch — users often type a bare Alef
Alef Maqsura → YaمصطفىمصطفيSearch across regional spelling habits
Ta Marbuta → HaمدرسةمدرسهSearch where users type ه for ة
Remove TatweelجميـــلجميلAlmost always — Tatweel is decorative
Arabic-Indic → Western digits٢٠٢٦2026Parsing numbers, IDs, phone numbers

Input is first converted to Unicode Normalization Form C (NFC), so a decomposed Alef plus a combining hamza or madda is treated the same as its precomposed letter (أ or آ) before any rule runs.

Normalizing Arabic text for search

Arabic search fails silently when the stored text and the user's query are written differently — مَدْرَسَة with tashkeel, مدرسه with a Ha, or أحمد typed as احمد. The fix is to apply the same normalization to both sides: once when you index or store a searchable copy, and again on every query.

JavaScript
// Store this alongside the original text, and run every query through it too.function normalizeForSearch(text) {  return text    .normalize("NFC")    .replace(/[\u064B-\u065F\u0670]/g, "") // tashkeel + dagger Alef    .replace(/\u0640/g, "")                 // Tatweel    .replace(/[أإآٱ]/g, "ا")                 // Alef variants → bare Alef    .replace(/ى/g, "ي")                      // Alef Maqsura → Ya    .replace(/ة/g, "ه");                     // Ta Marbuta → Ha}normalizeForSearch("مَدْرَسَةٌ") === normalizeForSearch("مدرسه"); // true

Keep the original text for display — normalized text is for matching only.

These rules mirror Apache Lucene's ArabicNormalizer, which normalizes Alef with hamza to a bare Alef, Ta Marbuta to Ha, Alef Maqsura to Ya, and removes harakat and Tatweel. It powers the arabic_normalization filter in Elasticsearch's Arabic analyzer, so text normalized with these settings lines up with what those search engines index.

Frequently asked questions

Why would I remove diacritics?
Diacritics (tashkeel) are usually omitted in everyday Arabic text and search queries. Removing them helps text match consistently, e.g. when comparing user input against stored data.
Will normalizing change the meaning of my text?
Alef and Ya normalization can occasionally blur distinctions that matter for precise spelling or poetry. Turn off the toggles you don't need — each one is independent.
Is my text sent to a server?
No. Normalization runs entirely in your browser; nothing is uploaded.
Is this the same as Elasticsearch's Arabic normalization?
The core rules match. Apache Lucene's ArabicNormalizer, used by Elasticsearch's arabic_normalization filter, normalizes Alef with hamza to a bare Alef, Ta Marbuta to Ha, Alef Maqsura to Ya, and removes harakat and Tatweel — the same transformations this tool offers as toggles. This tool additionally normalizes Alef wasla (ٱ).
Why did my line breaks disappear?
The whitespace option collapses every run of spaces, tabs, and line breaks into a single space. Turn it off to keep the original line structure.

Related tools

Related guides

Related articles