Numeral systems: Unicode digits and Roman numerals

A digit is a glyph, a number is a value, and a writing system is a set of conventions. Converting between them is exact only when you know which of the three you are changing.

Digits are code points, not values

Unicode gives each decimal script a block of ten consecutive code points, zero first. The value of a digit is its offset from the block's zero, which is why conversion between scripts is a subtraction and an addition rather than a lookup table. Measured from the characters themselves:

ScriptZeroOneUTF-8 bytes (one)
Arabic-IndicU+0660 ٠U+0661 ١2
DevanagariU+0966 ०U+0967 १3
BengaliU+09E6 ০U+09E7 ১3
ThaiU+0E50 ๐U+0E51 ๑3
Full-widthU+FF10 0U+FF11 13

Two consequences follow. First, converting 123 to Thai gives ๑๒๓, which is the same number in different glyphs; a Thai reader reads it as 123. Second, a system that expects ASCII digits will reject ๑๒๓ or, worse, store it as a string that looks numeric but does not sort or sum as one. The conversion is lossless in both directions because the blocks are contiguous — there is no cultural interpretation in the mapping.

Roman numerals are a notation with rules

Roman numerals are not a positional system. Values are written as a sequence of symbols (I, V, X, L, C, D, M) with two rules: symbols are added left to right, and a smaller symbol before a larger one is subtracted. The canonical forms are a subset of everything the rules allow: 4 is IV, not IIII; 9 is IX, not VIIII; 40 is XL, not XXXX. A converter that accepts IIII is not converting Roman numerals, it is decoding a string that resembles them.

The range stops at 3,999 (MMMCMXCIX). Beyond that the classical notation needs a bar over a symbol to multiply it by 1,000, a convention that is not universal and is not produced here; the parser reports the value as out of range rather than inventing a representation. This is also why a date in Roman numerals can look wrong when the year is written with a shorthand: MCMXCIX is 1999, but MMXXVI is 2026 and there is no symbol for zero.

Chinese numerals group by 10,000

Chinese numerals are positional, but the grouping is 10⁴ rather than 10³: 万 is ten thousand, 亿 is a hundred million, and 兆 is a trillion in the modern mainland convention (it has other historical values). The everyday forms 一二三 and the financial forms 壹贰叁 are two character sets for the same numbers; the financial forms exist to make alteration of cheques harder, not to represent different values. A digit-by-digit substitution of an English number produces wrong unit boundaries — 12,345 is 一万二千三百四十五, not 一十二千三百四十五.

Above the largest supported unit, the conversion has no symbol and should return an out-of-range result rather than silently dropping digits. This site's converter does that, and the test set covers the boundary: an input beyond the table must fail visibly, because a conversion that loses four orders of magnitude is worse than an error message.

Transliteration is not translation

Converting a script to Latin letters is a mapping of sounds or letters, not of meaning. ISO 9 is a reversible scientific transliteration: it maps each Cyrillic letter to a Latin sequence that can be turned back into the original. An English-readable system maps to what an English speaker would recognise — Москва becomes Moskva or Moscow depending on the system — and is easier to read but not reversible. Neither is wrong; they answer different questions, and a page that does not say which one it uses is not usable for a data pipeline.

A reversible system is what a data pipeline needs: Москва → Moskva → Москва must return the original string, including the soft sign and the stressed vowel, or the translation has lost information. An English-readable system is what a reader needs: “Moskvа” is easier to pronounce but does not tell you which Cyrillic letters produced it. Mixing the two in one field — storing a readable form and later trying to reverse it — is the usual source of mismatched names in imported data.

Pinyin has the same split inside one language. Tone marks (nǐ hǎo) carry pronunciation but are awkward to type; tone numbers (ni3 hao3) are typeable but are not the standard orthography. The conversion between them is mechanical if the mark-placement rule is implemented — the mark goes on the vowel the syllable's final determines, not simply on the first vowel — and ü is written as v in the numeric form.

Number words and scale conventions

Spelling a number out in English adds a convention that digit conversion does not have: the scale. The short scale used in the United States and modern British English makes a billion 10⁹; the long scale used historically in much of Europe makes it 10¹², with “milliard” for 10⁹. The same written number therefore means different values depending on the convention, which is why a cheque amount should be written in words and digits together, and why a tool should state which scale it uses.

The “and” is another convention: British English often writes “one hundred and twenty-three”, American English usually omits the “and”. Both are correct in their own variety; neither changes the value. What does change the value is the grouping — “one hundred twenty three” without a hyphen or multiplication is ambiguous to a reader, while the numeral 123 is not. That is the trade-off of spelling numbers out: it removes digit transposition and adds a parsing convention.

Choosing the right tool

QuestionToolWhat changes
The same number in another script's digitsNumeral converterGlyphs only; value exact
A number in classical Roman notationRoman numeralsNotation, with canonical-form checks
A number in Chinese charactersChinese numeralsGrouping by 10,000; everyday or financial forms
A name or word in Latin lettersCyrillic / kana / pinyin toolsScript; reversibility depends on the system
A number spelled out in EnglishNumber to wordsLanguage; cheque-style amounts included

Questions this guide raises

Is converting digits between scripts lossless?

Yes, when the target has a decimal digit block and the input contains only digits. The value is the offset from the zero code point, and the blocks are contiguous. Anything that is not a digit — a decimal separator, a sign, a thousands separator — is a separate convention and has to be handled separately.

Why does the Roman converter reject IIII?

Because IIII is not a canonical Roman numeral, even though the additive rule would allow it. The canonical form is IV. Accepting non-canonical strings silently would make the tool useless for validating an inscription or a tattoo, so it rejects them instead of guessing.

Does Chinese numeral conversion preserve the value?

Within the supported range, yes; grouping is by 10,000 and the unit characters carry exact powers. Above the largest unit the notation has no symbol, so the converter returns an out-of-range result rather than dropping the high-order digits.