Mini Tools

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

SystemBaseDigits255 written as
Binary20โ€“111111111
Octal80โ€“7377
Decimal100โ€“9255
Hexadecimal160โ€“9, Aโ€“FFF
Base 36360โ€“9, Aโ€“Z73

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.