Number base converter

Type a number in any field — binary, octal, decimal or hex — and the others update instantly. Big numbers are exact, and any base from 2 to 36 is supported.

Runs entirely in your browser. Nothing you enter is sent to a server.

How base conversion works

Each position in a number is worth the base raised to a power. In binary, 1011 is 1×8 + 0×4 + 1×2 + 1×1 = 11. To go the other way, divide by the base repeatedly and read the remainders backwards. Hexadecimal packs four binary digits into one symbol (0–9, A–F), which is why it’s used for colours, memory addresses and byte values.

Two’s complement

Computers store negative integers in two’s complement: flip every bit of the positive value and add one. In 8 bits, −1 is 1111 1111 (0xFF) and −128 is 1000 0000.

Turning text into binary instead? Use the text to binary converter. Hex colour codes are easier in the colour converter.

Frequently asked questions

How do I convert binary to decimal?

Type the binary number into the Binary field; the decimal value appears instantly.

Is there a size limit?

No practical limit. The converter uses arbitrary-precision integers, so 100-digit numbers stay exact.

Does it handle fractions?

No — whole numbers only, which covers almost all programming uses.

Related tools

More from the Cirelay network