English to Persian and Arabic Number Converter
Convert English digits to Persian (۰-۹) and Arabic-Indic (٠-٩) numerals instantly. Supports bidirectional conversion with copy-to-clipboard.
About
Mixing numeral systems inside a single document causes rendering inconsistencies, breaks sorting algorithms, and produces search-index mismatches. Persian text uses Eastern Arabic-Indic digits ۰ - ۹ (Unicode U+06F0 - U+06F9), while standard Arabic text uses a distinct set ٠ - ٩ (U+0660 - U+0669). Western digits 0 - 9 (U+0030 - U+0039) occupy a third, incompatible range. This converter performs direct codepoint remapping across all three systems. It does not transliterate or approximate. Each input character is tested against a regex class and replaced via a lookup offset, preserving all non-digit content unchanged.
The tool supports bidirectional conversion: English → Persian, English → Arabic, Persian → English, and Arabic → English. Note: Persian and Arabic digit glyphs may appear identical in some fonts, but they occupy different Unicode blocks and are not interchangeable in database queries or programmatic comparisons. Always verify the target system's expected codepoint range before deployment.
Formulas
The conversion uses a direct Unicode codepoint offset. For English → Persian digits:
For English → Arabic-Indic digits:
For reverse conversion (Persian → English):
Where C is the character, code returns the Unicode codepoint (via charCodeAt), and char produces the character from a codepoint (via String.fromCharCode). The regex /[0-9]/g isolates only Western digits. Non-digit characters pass through unmodified. The offset between Western and Persian is 1776 (0x06F0 − 0x0030). The offset between Western and Arabic-Indic is 1584 (0x0660 − 0x0030).
Reference Data
| Digit | English (Western) | Unicode (Western) | Persian (Eastern Arabic-Indic) | Unicode (Persian) | Arabic-Indic | Unicode (Arabic) |
|---|---|---|---|---|---|---|
| 0 | 0 | U+0030 | ۰ | U+06F0 | ٠ | U+0660 |
| 1 | 1 | U+0031 | ۱ | U+06F1 | ١ | U+0661 |
| 2 | 2 | U+0032 | ۲ | U+06F2 | ٢ | U+0662 |
| 3 | 3 | U+0033 | ۳ | U+06F3 | ٣ | U+0663 |
| 4 | 4 | U+0034 | ۴ | U+06F4 | ٤ | U+0664 |
| 5 | 5 | U+0035 | ۵ | U+06F5 | ٥ | U+0665 |
| 6 | 6 | U+0036 | ۶ | U+06F6 | ٦ | U+0666 |
| 7 | 7 | U+0037 | ۷ | U+06F7 | ٧ | U+0667 |
| 8 | 8 | U+0038 | ۸ | U+06F8 | ٨ | U+0668 |
| 9 | 9 | U+0039 | ۹ | U+06F9 | ٩ | U+0669 |
| Extended: Common Symbols Preserved Across Conversions | ||||||
| Decimal | . | U+002E | ٫ | U+066B | ٫ | U+066B |
| Thousands | , | U+002C | ٬ | U+066C | ٬ | U+066C |
| Percent | % | U+0025 | ٪ | U+066A | ٪ | U+066A |