Binary, decimal, hexadecimal and octal converter

Type a number in any of the four boxes and the other three update as you type. Convert binary to decimal, decimal to hex, hex to binary and every other combination.

How to use the binary, hex & decimal converter

  1. Click the box for the number system you have, for example Binary.
  2. Type or paste your number. The other three boxes fill in straight away.
  3. Click Copy next to the result you need.

The four number systems

SystemBaseDigits usedThe number 255
Decimal100–9255
Binary20 and 11111 1111
Hexadecimal160–9 and A–FFF
Octal80–7377

We count in decimal because we have ten fingers. Computers count in binary because their circuits have two states, on and off. Hexadecimal is a compact way to write binary: one hex digit stands for exactly four binary digits, so a byte is always two hex digits. Octal groups three binary digits and is still used for file permissions on Linux.

How to convert binary to decimal by hand

Each binary digit is worth twice the one to its right: 1, 2, 4, 8, 16 and so on. Add up the values where there is a 1. For 1011: 8 + 0 + 2 + 1 = 11.

How to convert decimal to binary by hand

Divide the number by 2 again and again, writing down each remainder, then read the remainders from last to first. For 13: 13 ÷ 2 = 6 r 1, 6 ÷ 2 = 3 r 0, 3 ÷ 2 = 1 r 1, 1 ÷ 2 = 0 r 1. Read upwards: 1101.

Hex digits at a glance

HexDecimalBinaryHexDecimalBinary
000000881000
110001991001
220010A101010
330011B111011
440100C121100
550101D131101
660110E141110
770111F151111

To turn words into binary instead of numbers, use Text to Binary.

Frequently asked questions

How do I convert binary to decimal?

Type the binary number into the Binary box. The decimal value appears in the Decimal box.

How do I convert decimal to hexadecimal?

Type the number into the Decimal box and read the result in the Hexadecimal box.

What is FF in decimal?

FF in hexadecimal is 255 in decimal and 11111111 in binary.

Is there a size limit?

No. The converter handles numbers of any length exactly.