Binary to Hex Converter

Enter a binary number to get its hexadecimal form, with the 4-bit grouping that makes the conversion work.

Loading tool…

About the Binary to Hex

Converting binary to hex needs no arithmetic at all. Because 16 = 24, every group of four bits (a nibble) maps to exactly one hex digit. Split the bits into groups of four starting from the right, pad the leftmost group with zeros, and replace each group: 1101 0110 1111 → D 6 F → D6F. The table under the result lists each nibble, its value and its hex digit.

The sixteen nibbles are worth memorising: 0000=0 … 1001=9, then 1010=A, 1011=B, 1100=C, 1101=D, 1110=E, 1111=F. With them you can read register values, bit masks and protocol headers at a glance, which is why debuggers and datasheets print bits in hex rather than in long binary strings.

Grouping always starts from the least significant (rightmost) bit. Grouping from the left gives a different, wrong answer whenever the bit count is not a multiple of four — for example 101 is 5, not A. Octal works the same way with groups of three bits. Spaces, underscores and a 0b prefix in the input are ignored, and the value is converted exactly regardless of length.

How to use it

  1. Paste the binary number (spaces between groups are fine).
  2. Read the hexadecimal result.
  3. Check the nibble table to see which 4 bits became which hex digit.
  4. Copy the result; decimal and octal are listed under “Other bases”.

Frequently asked questions

Why do 4 binary digits make one hex digit?
Four bits have 2^4 = 16 combinations, exactly the number of hex digits (0–F). So the conversion is a direct lookup per nibble.
What is 11111111 in hex?
FF — two nibbles of 1111.
What if the number of bits is not a multiple of 4?
Pad with zeros on the left. 101101 becomes 0010 1101, which is 2D.
How do I convert binary to hex in code?
JavaScript: parseInt('110101101111', 2).toString(16) (or BigInt('0b…').toString(16) for long values). Python: hex(int('110101101111', 2)).

Related tools