Binary to Hexadecimal Converter

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

Decimal value
Adjust the inputs

Your result updates live as you type.

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

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

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

Below the calculator sits the binary to hexadecimal conversion table: 12 rows — 101 at one end, 111111111111 at the other — which is usually faster than entering a value you have seen before. It loads pre-filled, with binary number (base 2) at 11,111,111, and the answer updates on every keystroke after that. Every symbol in the formula — 3 of them (dᵢ, 2, 16) — is defined above rather than left as notation to decode. Hexadecimal to Binary Converter and Octal to Binary Converter are the nearest neighbours to this one.

The formula

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

How it works, step by step

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

Worked examples

Converting 11111111 from binary

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

Converting 10000000000 from binary

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

Checking the 10000000 row

The reference table lists Binary (base 2) = 10000000, giving Hexadecimal (base 16): 80, 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 binary to hexadecimal by hand?

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

What is the largest binary 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 hexadecimal useful?

Base 16, the compact way to write binary: one hex digit covers exactly four bits.

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 Binary to Hexadecimal Converter use?

It computes value = Σ dᵢ × 2^i → write in base 16, where dᵢ is the digit at position i of the binary number; 2 is the base you are converting from; 16 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.

Binary to hexadecimal reference table

Binary to hexadecimal conversion table
Binary (base 2)Hexadecimal (base 16)Decimal value
10155
1010A10
100001016
1000002032
10000004064
110010064100
1000000080128
11111111FF255
100000000100256
11111010003E81000
100000000004001024
111111111111FFF4095

Every row is the same quantity written three ways.

Related calculators