Binary to hex converter

Enter a binary number and get its hex value instantly, plus the other bases and the step-by-step working. Handles huge numbers, negatives and fractions.

digits 0–1
Try
Hexbase 162D
Octalbase 855
Decimalbase 1045

Working for 1011012

Each hex digit is exactly 4 bits, so you can convert group by group, no arithmetic needed:

00102
1101D

How to convert binary to hex

  1. Group the bits in fours, starting from the right. Pad the leftmost group with zeros.
  2. Replace each group with one hex digit: 0000 = 0 … 1001 = 9, 1010 = A … 1111 = F.
  3. 1101 0110 = D6.

Binary is how hardware stores everything: bit flags, network masks, file permissions and machine code are all patterns of 1s and 0s. Hex is the shorthand for bytes: colour codes (#FF8800), memory addresses, MAC addresses, Unicode code points and hash digests are all written in it.

See place value move

Every bit is worth twice the bit to its right. Flip the switches and watch the decimal, hex and octal values rebuild.

32 + 8 + 4 + 1 = 45 · hex 2D · octal 55

Related conversions

Binary to octal · Binary to decimal · Octal to hex · Decimal to hex · Hex to binary · any base 2–36 · signed (two's complement)

Questions people ask

How do you convert binary to hex?

Group the bits in fours, starting from the right. Pad the leftmost group with zeros. Replace each group with one hex digit: 0000 = 0 … 1001 = 9, 1010 = A … 1111 = F. 1101 0110 = D6.

What is 101101 in hex?

101101 in binary (base 2) is 2D in hex (base 16).

Does it handle negative numbers and fractions?

Yes. A leading minus sign is kept, and digits after a point are converted too. Some fractions that end in one base repeat forever in another (0.1 in decimal is 0.000110011… in binary), so the result is cut at 24 digits and marked as repeating.

Is there a size limit?

No practical one. The converter uses arbitrary-precision integers (JavaScript BigInt), so 64-bit, 128-bit and longer values convert exactly, without rounding.

Why is there no arithmetic in the working?

Every hex digit maps to a fixed group of bits, so conversion is a lookup rather than a calculation.