What it does
The number base converter shows one integer in every common positional numeral system at once: binary (base 2), octal (base 8), decimal (base 10), hexadecimal (base 16) and base 36. Type a number in any of these bases and all the others update as you type, each with its own copy button.
Programmers use base conversion all the time: reading a hex color or memory address, checking bit flags and masks in binary, setting Unix file permissions in octal (755), or shortening IDs with base 36.
How to use
- Type or paste a number into the input, or click Sample.
- Leave Input base on Auto to read
0x,0oand0bprefixes, with plain digits treated as decimal. To type hex digits likeffwithout a prefix, choose the base yourself. - Turn on Group digits to split long results into readable groups: 4 digits for binary and hex, 3 for decimal and octal.
- Copy any row with its copy button. The Bit length row tells you how many bits the value needs, which helps when picking an integer type.
Example
0xFF5733, a shade of orange in CSS, is:
| Base | Value |
|---|---|
| Decimal | 16734003 |
| Binary | 111111110101011100110011 |
| Octal | 77653463 |
| Base 36 | 9yo1f |
It needs 24 bits, one byte each for red, green and blue.
How base conversion works
In base b, each digit is worth b times the digit to its right. The hex number ff is 15 × 16 + 15 = 255. Converting to another base repeatedly divides by the new base and reads the remainders backwards. Because 16 = 2⁴ and 8 = 2³, every hex digit maps to exactly four binary digits and every octal digit to three, which is why hex is a compact way to write binary.
FAQ
› How large a number can it convert?
There is no practical limit. The converter uses arbitrary-precision integers (BigInt), so 64-bit, 128-bit and even longer values convert exactly, unlike calculators that lose precision above 2^53.
› How do I enter a hexadecimal or binary number?
With Input base on Auto, prefix it with 0x for hex, 0b for binary or 0o for octal, for example 0xff or 0b1010. Or pick the base from the menu and type the digits without a prefix.
› How are negative numbers shown?
As a minus sign followed by the magnitude, for example -255 is -ff in hex. The tool does not convert to a fixed-width two's complement form.
› Can I paste numbers with separators?
Yes. Spaces, underscores and commas are ignored, so 1_000_000 and 1,000,000 both work. Turn on Group digits to add spaces back to the results.