Hexadecimal to Binary Converter

Convert hexadecimal numbers to binary with the working shown digit by digit.

Decimal value
Adjust the inputs

Your result updates live as you type.

This converter turns a hexadecimal number into its binary equivalent. Enter digits in base 16 and the base 2 form appears immediately, along with the decimal value so you can see what the number actually represents.

Base 16, the compact way to write binary: one hex digit covers exactly four bits. Base 2, the two-symbol system every digital circuit ultimately uses.

The method is always the same: read the hexadecimal digits into a plain quantity by multiplying each digit by its place value, then repeatedly divide that quantity by 2 and read the remainders backwards to get the binary digits.

Below the calculator sits the hexadecimal to binary conversion table: 12 rows — 5 at one end, FFF at the other — which is usually faster than entering a value you have seen before. Nothing has to be entered to see it work: the default for hexadecimal number (base 16) is FF, and the output recomputes the moment that changes. The formula is written out above with all 3 of its quantities named (dᵢ, 16, 2), so the arithmetic can be followed by hand. The pages people most often open next are Binary to Hexadecimal Converter and Hexadecimal to Octal Converter.

The formula

value = Σ dᵢ × 16i → write in base 2
dᵢ
The digit at position i of the hexadecimal number
16
The base you are converting from
2
The base you are converting to

How it works, step by step

  1. Enter a valid hexadecimal number. Digits outside base 16 are rejected.
  2. Each digit is multiplied by 16 raised to its position to get the value.
  3. That value is divided repeatedly by 2, collecting remainders.
  4. The remainders read in reverse give the binary result.

Worked examples

Converting FF from hexadecimal

FF in base 16 is 255 in decimal, which is 11111111 in binary. This value matters because it is the largest number a single byte can hold.

Converting 400 from hexadecimal

400 in base 16 equals 1024 in decimal, or 10000000000 in binary — the classic power of two behind kilobytes.

Checking the 80 row

The reference table lists Hexadecimal (base 16) = 80, giving Binary (base 2): 10000000, Decimal value: 128. Entering that above should reproduce the same figures — if it does not, the input is being read differently to the way the table assumes.

Frequently asked questions

How do I convert hexadecimal to binary by hand?

Convert to a plain decimal quantity first by multiplying each digit by its place value, then divide repeatedly by 2 and read the remainders in reverse order.

What is the largest hexadecimal number this handles?

Values up to 2^53 convert exactly, which is the limit of precision for whole numbers in JavaScript. That covers anything up to about 9 quadrillion.

Does capitalisation matter for hexadecimal?

No. A-F and a-f are both accepted, and results are shown in uppercase by convention.

Why is binary useful?

Base 2, the two-symbol system every digital circuit ultimately uses.

How precise is the decimal value?

Internally the maths runs at full double precision and the display keeps the significant figures that carry information, dropping the digits that are only rounding noise. Rounding happens at the display step alone, so nothing accumulates error as you change the input.

What formula does the Hexadecimal to Binary Converter use?

It computes value = Σ dᵢ × 16^i → write in base 2, where dᵢ is the digit at position i of the hexadecimal number; 16 is the base you are converting from; 2 is the base you are converting to. The same expression is printed on the page above the inputs, so the result can be reproduced by hand or in a spreadsheet.

Hexadecimal to binary reference table

Hexadecimal to binary conversion table
Hexadecimal (base 16)Binary (base 2)Decimal value
51015
A101010
101000016
2010000032
40100000064
641100100100
8010000000128
FF11111111255
100100000000256
3E811111010001000
400100000000001024
FFF1111111111114095

Every row is the same quantity written three ways.

Related calculators