Binary, Hex & Decimal Converter

Type a number in any box to convert it between decimal, binary, hexadecimal, octal and any base from 2 to 36.

Decimal value
—

Bits needed
—
Bytes
—
Binary, grouped
—
Hex, as bytes
—
ASCII character
—

How number bases work

A number base says how many different digits are used before you "carry" to the next place. Everyday numbers are decimal (base 10, digits 0–9). Computers work in binary (base 2, just 0 and 1). Programmers often use hexadecimal (base 16, digits 0–9 then A–F) because each hex digit stands for exactly four binary digits, which makes long binary numbers easier to read.

Each place is worth the base raised to a power. For example, binary 1011 is 1×8 + 0×4 + 1×2 + 1×1 = 11 in decimal, and hex 7E5 is 7×256 + 14×16 + 5 = 2021.

DecimalBinaryOctalHex
0000
1111
21022
510155
81000108
10101012A
15111117F
161 00002010
100110 010014464
2551111 1111377FF
1,024100 0000 00002000400

Tips

  • You can type prefixes such as 0x, 0b and 0o, and spaces or underscores between digits. They're ignored.
  • Very large whole numbers are supported, with no rounding. Negative numbers work too: type a minus sign first.
  • "Any base" supports every base from 2 to 36, using the letters A–Z as digits above 9.

Whole numbers only. Fractions aren't converted.