Digit style converter

The three forms 123, ١٢٣ and ۱۲۳ mean the same number but are different Unicode characters. Choose the form you want and which forms get converted; only the digits change and no numeric value is altered. Decimal points and thousands separators are a separate option that is off by default, because they change meaning and not just appearance. The names are confusing: in English 0123456789 are called Arabic numerals, while many Arabic speakers call ١٢٣ “Arabic” or “Hindi” numbers and 123 “English” numbers, so the tool shows the digit shapes themselves rather than names.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Paste your text into the input box, or press “Load example”.
  2. Choose the target digit style: Western 0-9, Arabic-Indic ٠-٩ or Persian ۰-۹.
  3. Pick which source styles are converted, and turn on the separator option if decimal points and thousands commas should change too.
  4. Leave the URL, email and IP protection on unless you are certain, then copy or download the result.

Example

The built-in example has four lines: an order number and a date, a price with a thousands comma and a decimal point, an IP address and a URL, and a line with Persian and Arabic-Indic digits.

With the defaults (target Arabic-Indic, separators off, protection on) 24 digits are converted: 21 from Western and 3 from Persian. The result is “الطلب رقم ١٠٢٤٥ بتاريخ ٢٠٢٤-٠٦-٠١”, then “السعر ١,٢٥٠.٥٠ ريال والكمية ١٥”, then “الخادم 192.168.1.10 والموقع https://toolsahla.com/ar/”, then “أرقام فارسية ٩٨٧ وعربية ٤٥٦”.

Note that the IP address and the URL kept all nine of their Western digits because protection is on, and that the comma and the point in “١,٢٥٠.٥٠” did not change. Turn the separator option on and the line becomes “السعر ١٬٢٥٠٫٥٠ ريال والكمية ١٥” using U+066C and U+066B, and the total rises to 26.

Limits and caveats

  • Tested with 100,000 lines (about 5.5 MB): the conversion takes about two seconds, but the browser text box needs several seconds to display a paste of that size. Automatic processing therefore stops above about 4,000 lines or 150,000 characters and the “Convert” button takes over. The preview shows only the first 300 lines; copy and download use the full result, and the text box then shows every line in one direction because working out a direction per line makes the browser slow.
  • Only the ten digits of each style are converted: 0-9 (U+0030 to U+0039), ٠-٩ (U+0660 to U+0669) and ۰-۹ (U+06F0 to U+06F9). Devanagari, Bengali and other digit sets are untouched, as are numbers written as words and typographic fractions such as ½.
  • The separator rule is deliberately simple and limited: a point or comma is only swapped when there is a digit immediately before and immediately after it. That means “1.2.3” and “192.168.0.1” become Arabic decimal separators if you switch protection off, which is usually not what you want. The tool also does not check that thousands groups have three digits.
  • Protection works on text patterns: a URL starting with a scheme such as https:// or with www., an email in the form name@domain, an IPv4 address, and a dotted version number such as 1.2.3. A link written any other way (a bare domain such as toolsahla.com) is not protected, and any part of the text matching those patterns stays unconverted even if you wanted it converted.
  • The Arabic percent sign ٪ (U+066A) is a separate option that is off by default. No other punctuation is changed, and no direction marks are added to your text.

Questions about this tool

Do the numbers change value?

No. All three styles run consecutively in Unicode in the same order from zero to nine, so the conversion is a fixed offset: ١ is always 1 and ۹ is always 9. Nothing is added, rounded or reformatted, and the number is the same before and after. The one thing that can change meaning is the separator option, which is why it is separate and off by default.

Why is the separator option off by default?

Because the tool only knows that a point sits between two digits; it cannot know whether it is a decimal point, part of an IP address or a version number. “12.5” is a price, but “192.168.0.1” is an address and “1.2.3” is a version; turning them all into the Arabic decimal separator U+066B breaks them. Turn the option on when your text is prices and plain numbers, and keep URL and IP protection on.

Why does URL protection matter?

Because URLs, email addresses and IP addresses only work with Western ASCII digits. If “https://example.com/p/12” became “https://example.com/p/١٢” the link would be a different one or would need encoding, and an IP address in Arabic-Indic digits is not readable as an address at all. So protection is on by default, keeps those tokens completely intact, and lists what it protected.

How do I convert Arabic-Indic digits (١٢٣) to Western numbers (123)?

Choose “Western 0123456789” as the target digit style and paste the text: every ١٢٣ and ۱۲۳ digit becomes 123 without any change in value. “السعر ١٢٥٠ ريال” becomes “السعر 1250 ريال”. For the opposite direction choose “Arabic-Indic ٠١٢٣٤٥٦٧٨٩”, which is the default target.

What is the difference between Arabic numerals and Arabic-Indic (Hindi) numerals?

They are the same ten values written with different shapes and different Unicode characters. In English, “Arabic numerals” means 0123456789 (U+0030 to U+0039), while the Eastern shapes ٠١٢٣٤٥٦٧٨٩ (U+0660 to U+0669) are called Arabic-Indic digits, and many Arabic speakers call them Arabic or Hindi numbers. Persian uses a third set, ۰۱۲۳۴۵۶۷۸۹ (U+06F0 to U+06F9), in which 4, 5 and 6 look different.