Processed locally in your browser — not uploaded
Arabic Numeral Converter
Convert Arabic-Indic digits (٠١٢٣٤٥٦٧٨٩) to Western digits (0123456789), or Western digits back to Arabic-Indic. Mixed Arabic and Latin text stays intact, and all processing runs locally in your browser.
How to use
- Paste Arabic text, numbers, or mixed content into the input field.
- Choose Arabic-Indic to Western or Western to Arabic-Indic conversion.
- Review the converted text and copy the result.
Understanding the output
Only the digits change. Arabic letters, Latin text, punctuation, decimal separators, and whitespace remain untouched.
Common issues & tips
- •Arabic-Indic digits (٠١٢٣٤٥٦٧٨٩) are different from Persian digits (۰۱۲۳۴۵۶۷۸۹); this first version converts Arabic-Indic digits only.
- •Digit conversion does not localize decimal or thousands separators. Use locale-aware number formatting when displaying numeric values.
- •Number("٤٢") and parseInt("٤٢") both return NaN in JavaScript. Convert Arabic-Indic digits to Western digits before parsing user input.
Arabic-Indic, Persian, and Western digit mapping
Arabic-Indic and Persian (Eastern Arabic) digits look similar but are separate Unicode characters, so text can contain either set — or both. Several Persian digits are also drawn differently, so the two sets are not interchangeable in display.
| Western | Arabic-Indic | Code point | Persian | Code point |
|---|---|---|---|---|
| 0 | ٠ | U+0660 | ۰ | U+06F0 |
| 1 | ١ | U+0661 | ۱ | U+06F1 |
| 2 | ٢ | U+0662 | ۲ | U+06F2 |
| 3 | ٣ | U+0663 | ۳ | U+06F3 |
| 4 | ٤ | U+0664 | ۴ | U+06F4 |
| 5 | ٥ | U+0665 | ۵ | U+06F5 |
| 6 | ٦ | U+0666 | ۶ | U+06F6 |
| 7 | ٧ | U+0667 | ۷ | U+06F7 |
| 8 | ٨ | U+0668 | ۸ | U+06F8 |
| 9 | ٩ | U+0669 | ۹ | U+06F9 |
Arabic text also has its own separators: the Arabic decimal separator ٫ (U+066B) and the Arabic thousands separator ٬ (U+066C). This converter changes digits only and leaves separators as they are.
Converting and formatting Arabic numbers in JavaScript
JavaScript's number parsing only understands Western digits, and \d in a regex does not match Arabic-Indic digits — even with the u flag. Normalize user input before you parse or validate it:
// Arabic-Indic (U+0660–U+0669) and Persian (U+06F0–U+06F9) digits → 0–9function toWesternDigits(text) { return text.replace(/[\u0660-\u0669\u06F0-\u06F9]/g, (d) => String((d.charCodeAt(0) & 0xf)), );}Number("٤٢"); // NaNNumber(toWesternDigits("٤٢")); // 42For display, don't hand-convert digits — use Intl.NumberFormat, which also applies the Arabic decimal and thousands separators. Pin the numbering system with a Unicode locale extension, because which digits a bare ar locale uses depends on the runtime's CLDR data:
new Intl.NumberFormat("ar-u-nu-arab").format(1234.5); // "١٬٢٣٤٫٥"new Intl.NumberFormat("ar-u-nu-latn").format(1234.5); // "1,234.5"// Region defaults differ — e.g. in Node.js 22:new Intl.NumberFormat("ar-EG").format(123); // "١٢٣"new Intl.NumberFormat("ar").format(123); // "123"The -u-nu- extension is documented on MDN under Intl.NumberFormat numberingSystem.
Frequently asked questions
- Does the converter change Arabic letters or punctuation?
- No. It replaces only the selected digit set and preserves every other character.
- Does it convert Persian digits?
- Not in this first version. Persian digits use a separate Unicode range and remain unchanged.
- Why does JavaScript return NaN for Arabic numbers?
- Number() and parseInt() only parse Western digits 0-9, so Number("٤٢") is NaN. Convert Arabic-Indic digits (U+0660-U+0669) to Western digits first, then parse.
- How do I display numbers with Arabic-Indic digits in JavaScript?
- Use Intl.NumberFormat with the arab numbering system, for example new Intl.NumberFormat("ar-u-nu-arab").format(1234.5), which returns ١٬٢٣٤٫٥ with Arabic separators. A bare "ar" locale may output Western digits depending on the runtime.
- Is my text uploaded?
- No. Conversion happens entirely in your browser.
Related tools
Arabic Text Normalizer
Standardize Arabic text — diacritics, letter variants, spacing and numerals.
Arabic Developer Kit (RTL Snippets)
Copyable TypeScript functions, Next.js RTL layouts, and React BiDi isolation snippets.
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.