Binary to Hex Converter

Share converter:
Embed this tool:

Enter a binary number and its hexadecimal form appears as you type. The guide shows the four-bit grouping trick that makes this conversion easy to do by hand.

Why binary and hex fit together

Hexadecimal is a base-16 system. It needs sixteen digits, so after 0 to 9 it borrows the letters a to f for the values 10 to 15. Because 16 equals 24, one hex digit stands for exactly four binary digits, called a nibble. That tidy fit is why hex is the usual shorthand for long binary values in programming, memory addresses and colour codes.

There is no arithmetic involved in the conversion itself. You regroup the bits and swap each group for its hex symbol.

How to convert binary to hex

  1. Starting from the right, split the binary number into groups of four digits.
  2. If the leftmost group has fewer than four digits, pad it with zeros on the left.
  3. Replace each group with its hex digit using the nibble table below.
  4. Write the digits in the same order and drop any leading zero.

Example: 11010110 splits into 1101 and 0110. Those are d and 6, so the hex value is d6, which is 214 in decimal (13 × 16 + 6).

Example with padding: 100101111 has nine digits. Grouped from the right it is 1 / 0010 / 1111, and the lone 1 becomes 0001. The groups read 1, 2 and f, so the answer is 12f, equal to 303 in decimal.

The converter prints hex in lowercase and never shows leading zeros. A zero input gives 0.

What the converter accepts

  • Only 0 and 1. An empty box, a digit from 2 to 9, a decimal point, a minus sign or an exponent makes the answer box show NaN.
  • Whole numbers. Binary fractions are not read.
  • Up to 53 digits exactly. The tool first turns your input into an ordinary double-precision number, which stores 53 significant bits. Past that point the value is rounded: 64 ones, which should be ffffffffffffffff, comes out as 10000000000000000.

Binary to hex conversion table

Every four-bit group and its hex digit
BinaryHexDecimal
000000
000111
001022
001133
010044
010155
011066
011177
100088
100199
1010a10
1011b11
1100c12
1101d13
1110e14
1111f15
Longer values
BinaryHexDecimal
1000000080128
11010110d6214
10010111112f303
101111100011be33043
1111111111111111ffff65535

The reverse job is handled by the hex to binary converter. If you want the plain decimal value of a binary number, use the binary to decimal converter, and for arithmetic on binary values there is the binary calculator.

Frequently asked questions

How many binary digits make one hex digit?

Four. Sixteen is 2 to the power of 4, so each group of four bits corresponds to exactly one hex digit, from 0000 for 0 to 1111 for f.

How do I convert 1010 to hex?

1010 is a single four-bit group. It equals ten, and ten is written a in hex, so the answer is a.

Why does a very long binary number give a wrong hex value?

The tool stores your input as a standard double-precision number, which holds 53 significant bits. Longer inputs are rounded before conversion. For exact work on long strings, group the bits by hand in fours.

Are hex letters upper or lower case?

The converter prints lowercase letters. Case carries no meaning in hex, so d6 and D6 are the same value.

References

  1. Donald E. Knuth, The Art of Computer Programming, Volume 2: Seminumerical Algorithms, section 4.1 (Positional Number Systems)

Cite this converter and page

If you use this page in your work, you can cite it as:

Reeliy Editorial Team. (2026). Binary to Hex Converter. Reeliy. https://reeliy.com/converters/convert-binary-to-hex“Binary to Hex Converter.” Reeliy, 2026, https://reeliy.com/converters/convert-binary-to-hex.