Binary to Hex Converter

Paste a binary number to get the hex value, with the 4-bit groups shown underneath.

Binary numbers use only the digits 0 and 1. A 0b prefix is fine.

Hex result
Result appears as you type

How to convert binary to hex by hand

Example 1: 1111000010101100 in binary is F0AC in hex

Binary to hex: group the bits in 4s

Because 16 = 2⁴, every 4 bits make exactly one hex digit. Start from the right and pad the leftmost group with zeros if needed.

4-bit groupValueHex digit
111115F
000000
101010A
110012C

1111 0000 1010 1100 → F0AC

Example 2: 101101 in binary is 2D in hex

Binary to hex: group the bits in 4s

Because 16 = 2⁴, every 4 bits make exactly one hex digit. Start from the right and pad the leftmost group with zeros if needed.

4-bit groupValueHex digit
001022
110113D

0010 1101 → 2D

Binary to Hex conversion table

BinaryHexDecimal
000
111
1022
1133
10044
10155
11066
11177
100088
100199
1010A10
1011B11
1100C12
1101D13
1110E14
1111F15
100001016
1000002032
10000004064
110010064100
1000000080128
11111111FF255
100000000100256
1000000000200512
11111010003E81000
100000000004001024

Where this conversion comes up

  • Shortening long bit patterns: each byte is exactly two hex digits, so 11110000 becomes F0.
  • Writing masks and flags in code, where 0xF0 is easier to read than 0b11110000.
  • Reading packet captures, memory dumps and file headers, which are almost always shown in hex.

Frequently asked questions

Why group binary digits in fours?

16 is 2⁴, so one hex digit holds exactly 4 bits. That makes the conversion a direct lookup for each group, with no arithmetic on the whole number.

What if the number of bits is not a multiple of 4?

Pad the left side with zeros. 101101 becomes 0010 1101, which is 2D in hex. Leading zeros do not change the value.

Can I convert negative numbers?

Yes. Put a minus sign in front and it is kept in the result, for example -1111000010101100 becomes -F0AC. The converter does not produce two's complement.

Is there a limit on how big the number can be?

No practical limit. The conversion uses arbitrary precision integers, so long values stay exact. The step-by-step working is shown for numbers up to 24 digits.

Can I convert fractions?

Not with this tool. It converts whole binary numbers to whole hex numbers.

Other number converters

Going the other way? Use the Hex to Binary Converter. To see a number in every base at once, try the all-in-one number converter.

Local Processing
End-to-End Encryption
Works Offline

Building Something Beyond This Tool?

We help teams design and build reliable web and mobile applications backed by well-structured APIs.