Skip to content
100% local

Number base converter

Convert numbers between any bases from binary to base 36, one per line.

Input
Output

Number base converter

Every base from binary to base 36 writes the same numbers with different digits. Paste one number per line, pick the source and target base, and each line converts as you type — decimal to hexadecimal by default, but any pair from 2 to 36 works, including base 36 itself, whose digits run from 0 to z.

The input is forgiving about how numbers are usually written. A 0x, 0b or 0o prefix on a line overrides the From base, so a mixed dump of hex and binary literals converts in one pass. Underscores and spaces inside a number are read as digit separators, as in 1_000_000, and a leading minus carries through to the result. Empty lines pass through untouched, keeping a converted column aligned with the original. A character that isn't a digit in the source base stops the conversion with a message naming the exact line.

Digits for base 26 / 37 swaps in the alphabets used by number ciphers. Choose Base 26 letters and base 26 is written with A–Z as the digits 0–25 instead of 0–9 and a–p. Choose Base 37 and the limit rises from 36 to 37, with a space as digit zero followed by 0–9 and A–Z. The custom digits apply to whichever side is set to base 26 or 37, so decimal to base 26 reads ordinary numbers and writes letters, and back again.

Show all common bases replaces the target base with a one-line summary — decimal, binary, octal and hexadecimal side by side. Uppercase digits writes A–F instead of a–f, and the 0x-style prefix adds 0b, 0o or 0x to bases 2, 8 and 16. Pad to width left-pads each result with zeros to a fixed number of digits, never truncating a longer number.

The math is exact integer arithmetic at any size, free of the rounding that breaks converters built on floating point past 2^53. Everything runs in your browser and nothing is uploaded.

FAQ

Which bases can it convert between?
Any base from 2 to 36, in either direction, plus base 37 with the Base 37 digit setting. Digits run 0–9 and then a–z, so base 36 uses the full alphabet — the same digit set as parseInt and BigInt in JavaScript.
How large can the numbers be?
There is no practical limit. Conversion uses exact integer arithmetic, so a number with hundreds of digits comes out exact — unlike converters built on floating point, which silently round everything past 2^53, about 9 quadrillion.
How do I convert to Base 26 or Base 37 cipher numbers?
Set the target base to 26 and Digits for base 26 / 37 to Base 26 letters, and the number is written with the letters A–Z as digits 0–25. Set the base to 37 and choose Base 37 to use a space, 0–9 and A–Z as digits 0–36. Other bases keep the normal digits.
Can it convert fractions?
No — whole numbers only. A decimal point is reported as an invalid digit, because positional fractions rarely convert exactly between bases and a rounded answer would be misleading.
Are my numbers uploaded anywhere?
No. Base conversion is arithmetic — no server needed. Your numbers stay in your browser and never leave your device.