U.UtilityApp
🔄 ConvertersFree · No signup

Binary to Hex Converter

Convert binary to hexadecimal directly.

Group the bits in fours, starting from the right

Split the binary number into groups of four bits, beginning at the right-hand end. Pad the leftmost group with zeros if it's short, then turn each group into one hex digit. For 1011011:

GroupPaddedValueHex digit
101010155
1011101111B

The result is 5B, which matches the converter. The common mistake is to group from the left (1011, then 011 padded on the right to 0110). That gives B6, which is the hex for 10110110, a different number.

Why shorten binary to hex

Hex is a quarter of the length and still shows the bit pattern directly. A 16-bit mask such as 1111000011110000 becomes F0F0, which you can write in code as 0xF0F0 and still see which half of each byte is set. Long bit strings are also easier to compare by eye or read aloud in hex: a difference in one bit shows up as a different digit in one place.

How the converter reads your bits

  • Spaces are fine. 0001 1111 is read as 00011111 and gives 1F.
  • Leading zeros are dropped from the result. 00001111 gives F. For a full byte, write it as 0F.
  • Don't type a 0b prefix. 0b1111 comes out as 0, since the b ends the number right after the leading zero.
  • Only 0 and 1 are read. Any other character ends the number without an error message, so a stray 2 or a full stop truncates the input.
  • The starting value isn't binary. The box is pre-filled with 42, so an error shows until you type your own bits.

The output uses capital letters and has no 0x prefix.

Frequently asked questions

What is 1111 in hex?+

F, which is 15. It's the largest value a single hex digit can hold, so a byte of all ones, 11111111, is FF.

Can I convert a binary string longer than 53 bits?+

Not exactly in one go, because longer values are rounded. Split the bits into chunks of 32 counted from the right, convert each chunk, pad every result except the leftmost to eight hex digits, and join them in order.

What happens with a minus sign?+

It's kept as a sign, so -101 gives -5. The converter doesn't interpret bits as two's complement, so 11111011 gives FB, not a negative value.

Why does the panel also show an octal value?+

The panel lists the same number in all four bases. Octal works like hex but with groups of three bits instead of four, so 1011011 splits into 1, 011 and 011 and reads as 133.

Embed this tool on your website

Free to use on blogs, school sites and intranets. Paste this code into your page's HTML; please keep the credit line.

<iframe src="https://utilityapp.lat/embed/convert/binary-to-hex" title="Binary to Hex Converter" width="100%" height="420" style="border:0;max-width:760px" loading="lazy"></iframe>
<p style="font-size:13px"><a href="https://utilityapp.lat/convert/binary-to-hex">Binary to Hex Converter</a> by UtilityApp</p>