Binary, Hex & Decimal Converter

Convert numbers between binary, octal, decimal and hexadecimal.

The method behind this calculator

Enter a value and its base and this converter shows it in binary, octal, decimal and hex at once. It’s handy for programming, digital electronics and computer science.

Pick the from and to bases, or just read all four representations.

Getting your answer

  1. Enter the value.
  2. Choose the base it’s currently in.
  3. Read the conversions in every base.

How the number is calculated

convert to decimal, then to the target base bases: 2 (binary), 8 (octal), 10 (decimal), 16 (hex)

Try it with these numbers

The calculator opens with a value of 255. On those figures the result is FF. Underneath, Binary comes out at 11111111 and Octal at 377. Change any field and every figure updates as you type.

Questions people ask about this

How do I convert decimal to binary?
Repeatedly divide by two and read the remainders bottom-up. The converter does this instantly.
What is hexadecimal?
Base-16, using 0–9 then A–F. It’s compact for representing bytes β€” 255 is FF.
Why do programmers use binary and hex?
Computers work in binary; hex is a shorter, human-friendly way to write binary values.