Tools
Log in
English

All converters

Binary to hex

Group bits by four from the right and read each group as one hex digit.

Result

Hex
Decimal
Binary
Octal

Settings

To turn binary into hex, cut the bits into groups of four starting from the right and replace each group with one hex digit. Paste a bit string such as 11010110 and the hex value appears, ready to copy with or without 0x. There is nothing to install or sign up for.

How to do it by hand

  1. Start at the right end and cut the bits into groups of four.
  2. If the leftmost group is short, fill it with zeros on the left.
  3. Read each group with the weights 8, 4, 2 and 1, and write the total as 0 to F.
  4. Put the digits together in the same order.

Worked examples

11010110

1101 = D, 0110 = 6

D6

1011111

0101 = 5, 1111 = F

5F

100100011

0001 = 1, 0010 = 2, 0011 = 3

123

Common mistakes

  • Grouping from the left. Cutting 1011111 into 1011 and 111 gives a wrong answer; start from the right.
  • Writing a group like 1010 as 10. It is a single hex digit, A.
  • Dropping a zero inside a group, which shifts every digit after it.

Byte patterns you see often

Binary (8 bits)HexDecimal
0000 0000000
0000 0001011
0000 10100A10
0000 11110F15
0001 00001016
0010 00002032
0100 00004064
0101 01015585
0111 11117F127
1000 000080128
1010 1010AA170
1100 0000C0192
1111 0000F0240
1111 1110FE254
1111 1111FF255

Questions people ask

Does the bit count have to be a multiple of four?

No. The tool pads the left side with zeros for you, and that does not change the value.

Can I get 0x in front of the result?

Yes. Turn on the prefix option and the result shows as 0x5F instead of 5F.

Can I see the bytes in reverse order?

Yes. The byte order section swaps big endian and little endian, so 12 34 becomes 34 12.