Number Base Converter

Convert between binary, octal, decimal, hex and any base up to 36, at any size.

One per line. Prefixes 0x, 0b and 0o are recognised.

100 runs left today · sign up for more

About this tool

Converts numbers between bases — binary, octal, decimal, hexadecimal, or anything up to base 36.

The arithmetic is done on strings rather than integers. That matters more than it sounds: a 64-bit value copied from a database or a hash overflows PHP's integer type, and the usual conversion then returns a number that is wrong but entirely plausible-looking. Here the digits are converted one at a time, so a 200-digit value converts exactly.

Common questions

Why does my large hex value convert wrongly elsewhere?

Because most converters go through a 64-bit integer, and anything larger silently loses its top bits. The result looks like a number, so nothing warns you. This tool converts digit by digit on strings, so size is not a limit.

What do the prefixes mean?

0x is hexadecimal, 0b is binary, 0o is octal. They are recognised and stripped, so you can paste values straight out of code without editing them.

Why does base 36 stop there?

Ten digits plus twenty-six letters is thirty-six symbols. Going further needs a case-sensitive alphabet, at which point copying and pasting starts corrupting values.

Are negative numbers and decimals supported?

Negative yes, fractional no. Fractional values in another base raise a precision question with no single right answer, so the tool does not guess at one.