Binary, Hex, Decimal & Octal Converter

Convert numbers between binary, decimal, hexadecimal, octal and any base from 2 to 36. Exact for huge numbers, with two's complement for negatives.

How to convert between bases

Type a number into any box: decimal, hexadecimal, binary, octal, or a base of your choice (2 to 36). The others update instantly. You can paste numbers with a prefix (0x, 0b, 0o) and with spaces or underscores for grouping.

Quick reference

DecHexBinDecHexBin
000000881000
110001991001
22001010A1010
33001111B1011
44010012C1100
55010113D1101
66011014E1110
77011115F1111

Frequently asked questions

How do I convert binary to decimal?

Each binary digit is worth twice the one to its right: 1, 2, 4, 8, 16 and so on. Add the values where there's a 1. For example, 1011 is 8 + 0 + 2 + 1 = 11. Type any binary number above and the decimal value appears instantly.

Why do programmers use hexadecimal?

One hex digit is exactly four binary digits, so long binary numbers become short and readable: 11111111 is FF. That's why colors (#FF8800), memory addresses and byte values are usually written in hex.

What is two's complement?

It's how computers store negative integers. In 8 bits, -1 is 11111111 and -128 is 10000000. Pick a bit width to see the two's complement form of a negative number.

Is there a size limit?

No practical limit: the converter uses arbitrary-precision integers (BigInt), so even numbers with hundreds of digits convert exactly.

Related tools