How to convert digit shapes and check each locale's number settings
Arabic text uses three common sets of digits: 0–9, which English calls Arabic numerals; ٠–٩, known in Unicode as Arabic-Indic digits; and ۰–۹, the Extended Arabic-Indic digits used for Persian and Urdu, where ۴ ۵ ۶ take different shapes. When these get mixed in a spreadsheet or a phone list, search and sorting break, and a web form may reject a number that looks fine to a human reader.
This tool does two things. It converts every digit in your text to one system you choose, without changing any value. And it shows number data for each language and region from CLDR, the Unicode Consortium's locale data repository: the default and native numbering systems and the decimal and grouping separators. It helps people cleaning data, reviewing translated documents, or building an interface for more than one Arabic-speaking country.
How to use it
- Choose a Language / region to see its data: Default system, Native system, Decimal separator, Grouping separator, Decimal pattern and Region.
- Choose a Digit system for conversion:
arabfor ٠١٢٣,latnfor 0123, orarabextfor ۰۱۲۳. This choice is independent of the selected region. - Paste your text into Text containing digits. Mixed systems are fine.
- Keep Protect links and email ticked so that digits inside links and addresses stay as they are.
- Check Converted digit shapes, then copy the result or download it as a .txt file.
Worked examples from the tool
الإصدار 12345.67 / ١٢٣ / ۱۲۳ https://example.com/123
الإصدار ١٢٣٤٥.٦٧ / ١٢٣ / ١٢٣ https://example.com/123
Settings: Digit system for conversion: arab · Protect links and email on
رقم الطلب ۴۵۲۱ والكمية ۱۵
رقم الطلب ٤٥٢١ والكمية ١٥
Settings: Digit system for conversion: arab
السعر ١٬٢٥٠٫٥٠ ر.س
السعر 1٬250٫50 ر.س
Settings: Digit system for conversion: latn
Reading the locale data
The Default system is what CLDR-based software uses to format numbers for that locale when you do not ask for anything else. The Native system is the traditional digit set of the locale's language. They can differ: for ar-AE, the default is latn while the native system is arab.
Separators differ between Arabic-speaking countries too. For ar-KW, ar-SA and ar-EG, decimals use ٫ and thousands use ٬. For ar-MA, ar-DZ and ar-TN, the digits are 0–9, the comma marks decimals and the full stop marks thousands. So 1.250 can mean one thousand two hundred and fifty in one country and one and a quarter in another.
If you are a developer, request the numbering system explicitly instead of relying on the default, for example ar-SA-u-nu-latn with Intl.NumberFormat. Browsers may ship a different CLDR version, so test in the browsers you support.
Common pitfalls
- Expecting separators to change. Only digits change. «١٬٢٥٠٫٥٠» becomes «1٬250٫50», which a spreadsheet will not read as a number. Replace ٫ with a full stop and delete ٬ using Replace.
- Picking a region to change the conversion. Language / region only displays data. The conversion follows Digit system for conversion alone.
- Worrying about values. Each digit maps to a digit of the same value, and leading zeros stay, so «٠٥٥» becomes «055».
- Turning off link protection. Digits inside links convert too, and the links stop working.
To choose the right digits for your document, read the guide to Arabic numerals. If the text came from a Persian keyboard, see the guide to Persian and Arabic letters: Persian ی and ک often arrive together with Persian digits.
Limits
- Only digit shapes change. Separators, minus signs, percent signs and currency symbols stay as they are.
- Only decimal systems, where each digit maps to exactly one digit, can be converted. Algorithmic systems such as Roman numerals are in the dataset but not offered for conversion.
- The data comes from a fixed CLDR version named under the tool; your operating system or browser may use another.
- A language or region in the list refers to number data only; it does not mean the site is translated into that language.
- The tool does not spell numbers as words; use Number words for that.
- Each conversion handles up to about 20,000 characters.
Frequently asked questions
Which digits are the “Arabic” ones: 123 or ١٢٣?
Both names are in use. English calls 0–9 Arabic numerals, Unicode names ٠–٩ Arabic-Indic digits, and many Arabic speakers call those Hindi digits. The tool converts between them without taking sides. More in the guide to Arabic numerals.
Why does ۴ look different from ٤?
They are different characters: ۴ is an Extended Arabic-Indic digit used for Persian and Urdu, ٤ is Arabic-Indic. They have the same value, but search treats them as different, so unify the text before searching or sorting.
Does the tool change or round values?
No. Each digit maps to a digit of the same value, and separators and zeros stay in place.
Why didn't the decimal separator change?
The tool converts digits only. ٫ and ٬ are separate characters; replace them yourself if you need a Latin full stop and comma.
How do I convert digits in a long text or in files?
This tool takes about 20,000 characters at a time. For longer text, use the digits option in the Cleaner; for several text files, use Batch files.
How is this different from the digits option in the Cleaner?
The Cleaner converts between three sets: 0–9, ٠–٩ and ۰–۹. This tool supports every decimal system in the CLDR data, such as Devanagari and Thai digits, and shows each locale's number data.
