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.
How to use
- Paste or type Arabic text into the input field.
- Toggle each normalization independently — they're opt-in, not all-or-nothing.
- Choose a numeral conversion direction if you need Arabic-Indic and Western digits unified.
- Copy the normalized output.
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.
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:
| Option | Before | After | Typical 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 | ٢٠٢٦ | 2026 | Parsing 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.
// 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("مدرسه"); // trueKeep 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
Arabic Slug Generator
Generate URL-safe slugs from Arabic text — Arabic-preserving or transliterated.
RTL Preview
Preview Arabic and other RTL text side-by-side against LTR at real widths.
Arabic Numeral Converter
Convert Arabic-Indic digits to Western digits and back without changing the surrounding text.
Arabic Search Normalization
Normalize Arabic queries and indexed text with identical rules, then test exact, phrase, or token matching.
Related guides
Arabic Web Development: The Complete Production Guide
Build production-ready Arabic websites with correct RTL direction, BiDi isolation, logical CSS, Unicode normalization, accessible forms, Arabic SEO, fonts, numerals, and email.
Building Production-Ready Arabic & RTL Web Interfaces in Next.js
Master RTL web development in modern Next.js apps. Learn how to handle Arabic font rendering, layout mirroring with Tailwind CSS, text normalization, diacritics stripping, and SEO-friendly Arabic URL slugs.