Number Base Converter
Type in any field โ the others update instantly. Works with arbitrarily large integers. Prefixes 0x, 0b, 0o, spaces and underscores are accepted.
Number systems
| System | Base | Digits | 255 written as |
|---|---|---|---|
| Binary | 2 | 0โ1 | 11111111 |
| Octal | 8 | 0โ7 | 377 |
| Decimal | 10 | 0โ9 | 255 |
| Hexadecimal | 16 | 0โ9, AโF | FF |
| Base 36 | 36 | 0โ9, AโZ | 73 |
How to convert decimal to binary
Divide the number by 2 repeatedly and write down the remainders; reading them from last to first gives the binary number.
For 13: 13 รท 2 = 6 r 1, 6 รท 2 = 3 r 0, 3 รท 2 = 1 r 1, 1 รท 2 = 0 r 1 โ 1101.
To go back, multiply each digit by its power of two: 1ยท8 + 1ยท4 + 0ยท2 + 1ยท1 = 13.
Where you meet other bases
- Hexadecimal โ colors (
#ff8800, see the Color Converter), memory addresses, hashes and byte dumps. - Octal โ Unix file permissions like
755(see the Chmod Calculator). - Binary โ bit flags, masks and low-level protocols.
- Base 36 โ compact IDs and URL shorteners.
Frequently asked questions
How large can the numbers be?
There is no practical limit โ the converter uses JavaScript BigInt, so numbers with hundreds of digits convert exactly.
Can I convert negative numbers?
Yes. A minus sign is kept in every base. For negative numbers the tool also shows the twoโs complement representation in 8, 16, 32 and 64 bits.
Does it support fractions?
No, only whole numbers (integers). Fractional parts often cannot be represented exactly in other bases.
What is twoโs complement?
The standard way computers store signed integers: a negative number โx in n bits is stored as 2โฟ โ x. For example, โ1 in 8 bits is 11111111.