Number Base Converter

The result updates as you type. Letters a–z stand for digits 10–35.

How it works

The digits are read left to right into one arbitrary-precision integer — each existing digit is multiplied by the from-base and the next digit added in, the same way place value works in any base. That integer is then peeled back apart for the target base by repeated division: divide by the to-base, the remainder is the next digit (least significant first), and repeat until nothing is left. Because the whole trip is done in BigInt rather than ordinary floating-point numbers, a number with dozens of digits converts exactly — nothing here rounds or truncates.

Digits above 9 are the letters a–z, so base 16 uses 0–9 and a–f, and base 36 uses every digit and every letter. A character that is not a valid digit in the base you gave — like a "2" in binary, or a "g" in hex — is rejected by name rather than being dropped or reinterpreted.

Frequently asked questions

Why does it support up to base 36?

Because that is the natural ceiling for a single-character digit: ten numerals (0–9) plus the twenty-six letters of the alphabet (a–z) is thirty-six symbols, and base 37 would need a digit with no letter left to be.

Can it handle really large numbers?

Yes. It uses arbitrary-precision integer math internally (JavaScript's BigInt) rather than ordinary floating-point numbers, which start losing integer precision above about 2^53 (roughly nine quadrillion). A 30-digit number converts exactly, digit for digit, instead of coming back with the low digits quietly corrupted.

What happens with an invalid digit for the base?

A clear error naming the character and the base — for example, entering "2" as a binary number is rejected as not a valid digit in base 2, rather than being silently ignored or truncated.