Number Base Converter

Type a value in any box and every other base updates instantly.

Loading tool…

  • Free
  • No sign-up
  • Runs in your browser

How to use the binary / hex / decimal converter

  1. Type a number in the box for the base you have.
  2. Read the conversions in the other boxes.
  3. For another base, such as base 36, set Custom base.

The four common bases

BaseNameDigitsUsed for
2Binary0 1How computers store everything
8Octal0 to 7Unix file permissions (chmod 755)
10Decimal0 to 9Everyday counting
16Hexadecimal0 to 9, A to FColors (#FF8800), memory addresses, bytes

Counting in each base

DecimalBinaryOctalHex
0000
1111
21022
510155
81000108
10101012A
15111117F
16100002010
100110010014464
25511111111377FF
1024100000000002000400

Converting by hand

Binary to decimal: each position is worth double the one to its right (1, 2, 4, 8, 16…). Add the values where there is a 1. 1011 = 8 + 0 + 2 + 1 = 11.

Decimal to binary: divide by 2 repeatedly and note the remainders, then read them from last to first. 11 → 5 r1 → 2 r1 → 1 r0 → 0 r1, which reads 1011.

Binary to hex: split the bits into groups of four from the right and convert each group. 1111 1111 = F F. This neat fit is why programrs prefer hex to decimal.

Prefixes such as 0x (hex), 0b (binary) and 0o (octal) are accepted and ignored, as are spaces and underscores.

Frequently asked questions

What is FF in decimal?

255. F is 15, so FF is 15 × 16 + 15.

How large a number can I convert?

There is no practical limit. The converter uses exact big-integer arithmetic.

Related tools