Moayyad Faris
Arabic Developer Tools

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.

Converted Result
Converted text will appear here…
01

How to use

  1. Paste Arabic text, numbers, or mixed content into the input field.
  2. Choose Arabic-Indic to Western or Western to Arabic-Indic conversion.
  3. Review the converted text and copy the result.
02

Understanding the output

Only the digits change. Arabic letters, Latin text, punctuation, decimal separators, and whitespace remain untouched.

03

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.

WesternArabic-IndicCode pointPersianCode 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:

JavaScript
// 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("٤٢")); // 42

For 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:

JavaScript
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

Related guides