Number Base Converter
Binary, octal, decimal, hex and any base to 36 — exact for huge numbers, with two’s complement.
Number
In every base
Type a number to see it in binary, octal, decimal, hexadecimal and any base from 2 to 36.
How is this calculated?
value = Σ digitᵢ × baseⁱ
two’s complement (n bits): negative x is stored as 2ⁿ + x
int8 −128…127 · int16 −32,768…32,767 · int32 −2,147,483,648…2,147,483,647Runs in your browser — nothing you enter leaves this device.
About this tool
What it does
Computers store numbers in binary, programmers read memory and colours in hexadecimal, and Unix file permissions use octal. This converter takes a whole number written in any base from 2 to 36 and shows it in binary, octal, decimal, hexadecimal and a base you choose, with digits grouped for reading. It uses arbitrary-precision integers, so a 64-bit ID or a 100-digit number converts exactly — ordinary JavaScript numbers lose accuracy above 9,007,199,254,740,991. It also shows how the value is stored in 8, 16, 32 or 64 bits using two’s complement, and what the same bits mean read as signed or unsigned.
How to use it
- Type the number. Spaces, underscores and a 0x, 0b or 0o prefix are fine.
- Choose the base it’s written in, or set another base from 2 to 36.
- Read it in every base and copy the one you need.
- Choose a bit width to see the two’s-complement bit pattern and its signed and unsigned meanings.
Limits and your data
- Whole numbers only — fractions such as 0.1 or 1.5 aren’t converted.
- Numbers are limited to 4,096 digits.
- Bases above 10 use letters a–z for digits 10–35, case-insensitively.
- The two’s-complement view assumes a value that fits the chosen width; wider values are reported rather than silently wrapped.
- All conversion happens in your browser. Nothing is sent or saved.
Questions
How do I convert binary to decimal by hand?
Multiply each digit by 2 raised to its position, counting from 0 on the right, and add them up. 1011 is 1×8 + 0×4 + 1×2 + 1×1 = 11.
Why does −1 show as FFFFFFFF?
In 32-bit two’s complement, −1 is stored as 2³² − 1, which is every bit set: FFFFFFFF in hex. The same bits read as unsigned are 4,294,967,295.
What does chmod 755 mean in binary?
Each octal digit is three permission bits: 7 is 111 (read, write, execute), 5 is 101 (read, execute). Choose octal as the input base and read the binary.
Why did another calculator give a slightly different answer for a long number?
Most calculators use floating-point numbers, which round anything above 2⁵³. This tool uses exact integer arithmetic, so every digit is correct.