Paste a price, a phone number or a whole message. Pick the digits you want and copy the result. Arabic-Indic and Persian digits both convert, letters and punctuation stay exactly as they were, and nothing you paste leaves your browser.
Type or paste any text with numbers in it. Only the digits change; letters and punctuation stay as they are.
Arabic-Indic digits are not a font. ٠ to ٩ are ten separate Unicode characters, U+0660 to U+0669, and the digits Persian keyboards type, ۰ to ۹, are ten more, U+06F0 to U+06F9. Their values match 0 to 9, but software that only understands 0 to 9 treats them like letters: a price will not add up, a search for 13 will not find ١٣, and a sign-up form may reject a perfectly good phone number.
The converter swaps each digit for its partner by code point and leaves every other character alone. Converting to Western reads both the Arabic-Indic and the Persian sets. Converting to Arabic-Indic writes ٠ to ٩, the digits that CLDR, the Unicode locale data that browsers use, lists for the numbering system it calls arab; Persian ۴, ۵ and ۶ come out as ٤, ٥ and ٦.
Separators change only between two digits. With the box ticked, 1,250.50 becomes ١٬٢٥٠٫٥٠, with the Arabic thousands separator (U+066C) and the Arabic decimal separator (U+066B), and the same works in reverse. A comma or full stop at the end of a sentence is not between two digits, so it stays where it is. Untick the box to leave separators alone, for example in a list such as 1,2,3.
| Western | Arabic-Indic | Persian | Code points |
|---|---|---|---|
| 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 |
The converter above calls these two functions. Copy them into your own form handler or import script; they have no dependencies:
// Convert the digits in any text between Western (0-9) and Arabic-Indic (٠-٩), leaving everything else alone.
// Arabic-Indic digits are U+0660-U+0669. Persian keyboards type the Extended Arabic-Indic set, U+06F0-U+06F9.
// Separators change only between two digits, so commas and full stops in sentences stay as they are:
// the Arabic decimal separator ٫ (U+066B) <-> "." and the Arabic thousands separator ٬ (U+066C) <-> ",".
const ARABIC_ZERO = 0x0660, PERSIAN_ZERO = 0x06f0;
function toWesternDigits(text, separators = true) {
let s = String(text)
.replace(/[٠-٩]/g, (d) => String(d.charCodeAt(0) - ARABIC_ZERO))
.replace(/[۰-۹]/g, (d) => String(d.charCodeAt(0) - PERSIAN_ZERO));
if (separators) s = s.replace(/([0-9])([٫٬])(?=[0-9])/g, (m, d, sep) => d + (sep === "٫" ? "." : ","));
return s;
}
function toArabicIndicDigits(text, separators = true) {
let s = toWesternDigits(text, false); // Persian digits become Arabic-Indic too
if (separators) s = s.replace(/([0-9])([.,])(?=[0-9])/g, (m, d, sep) => d + (sep === "." ? "٫" : "٬"));
return s.replace(/[0-9]/g, (d) => String.fromCharCode(ARABIC_ZERO + Number(d)));
}
toWesternDigits("السعر ١٬٢٥٠٫٥٠"); // "السعر 1,250.50"
toArabicIndicDigits("0933 123 456"); // "٠٩٣٣ ١٢٣ ٤٥٦"
20 test cases pass before we publish: both digit sets, Persian 4, 5 and 6, separators inside numbers but not at the end of a sentence, the Arabic comma, the switch that leaves separators alone, a round trip, and agreement in both directions with the browser's own Intl formatter for ar-SY with Arabic digits.
Paste the text into the box above and keep «0123 (Western)» selected. Every ٠ to ٩, and every Persian ۰ to ۹, becomes 0 to 9, and the letters stay as they are.
Checked 25 November 2026. The functions behind this page were tested with Node 24 against its built-in Intl formatter.
We build Arabic-first apps that accept every digit set and store one. Tell us where yours trips up.