Arabic & Persian to English Digit Converter
Convert Eastern Arabic (٠-٩) and Persian/Urdu (۰-۹) numerals to standard Western digits (0-9). Essential for Excel, coding, and database normalization.
Clean and normalize Unicode numerals for data processing.
About
Data inconsistency is a critical risk in globalized applications. Systems built for Western Arabic numerals (0-9) often fail to parse Eastern Arabic (Mashriq) or Persian (Farsi) digits, leading to calculation errors, broken Excel formulas, and database corruption. This tool eliminates that risk by mapping Unicode specific digit ranges to their ASCII equivalents.
Unlike simple find-and-replace scripts, this engine handles both standard Arabic-Indic digits (U+0660 range) and the Extended Arabic-Indic digits used in Iran, Afghanistan, and Pakistan (U+06F0 range). It preserves non-numeric text, ensuring that labels, names, and context remain intact while strictly normalizing the numerical data for processing.
Formulas
The conversion follows a strict bijective mapping function f where the input character c is mapped to the set of Integers Z:
Where 0x0660 is the Unicode offset for the Arabic Zero, and 0x06F0 is the offset for the Persian Zero. This logic ensures O(n) complexity.
Reference Data
| Value | Western (ASCII) | Arabic (Mashriq) | Persian (Farsi/Urdu) |
|---|---|---|---|
| Zero | 0 | ٠ | ۰ |
| One | 1 | ١ | ۱ |
| Two | 2 | ٢ | ۲ |
| Three | 3 | ٣ | ۳ |
| Four | 4 | ٤ | ۴ |
| Five | 5 | ٥ | ۵ |
| Six | 6 | ٦ | ۶ |
| Seven | 7 | ٧ | ۷ |
| Eight | 8 | ٨ | ۸ |
| Nine | 9 | ٩ | ۹ |