Binary to Hex Converter

Free binary to hex converter, exact for any size number, with the nibble-grouping (4 bits per hex digit) working shown step by step and a full 0-F nibble reference table.

11010 (binary) = 1A (hex)

Nibble grouping (binary → hex, 4 bits per group):

  • 0001 → 1
  • 1010 → A

Runs entirely in your browser — nothing you type is uploaded. Only the two's-complement width option is saved locally.

Binary to hex, step by step

Pad the left end to a multiple of 4 digits, split into 4-bit groups, then look up each group's hex digit:

  • 0001 → 1
  • 1010 → A

Joined together: 1A = 1A

0-F nibble table: 4-bit binary to hex

Every 4-bit binary pattern and its exact hex digit:

Binary (4-bit)DecimalHex
000000
000111
001022
001133
010044
010155
011066
011177
100088
100199
101010A
101111B
110012C
110113D
111014E
111115F

More number-base converters

Frequently asked questions

How do I convert binary to hex by hand?

Starting from the right, split the binary digits into groups of 4 (padding the leftmost group with zeros if needed), then look up each 4-bit group's hex digit. For 11010: pad to 00011010, split into 0001 and 1010, which are 1 and A -- giving 1A. The tool above shows this grouping for whatever you type.

What is 11111111 in hex?

11111111 splits into 1111 and 1111, both F, so it's FF. That's 8 ones, the largest value a single byte can hold.

Why do I split binary into groups of 4 for hex?

Because hex is base 16 and 16 = 2^4, every possible 4-bit pattern maps to exactly one hex digit (0-F). Splitting binary into groups of 4 -- starting from the right, since that's where place value starts -- and converting each group independently gives the exact hex equivalent with no arithmetic.

What if the binary length is not a multiple of 4?

Pad extra zeros onto the LEFT (the most-significant end) until the length is a multiple of 4 -- padding on the right would change the value. This tool does that padding automatically before grouping.

Does this handle negative or very large binary numbers?

Yes to both. A leading minus sign (e.g. -11111111) is read as a negative value and produces a signed hex result (-FF). Numbers of any size are handled exactly using JavaScript BigInt internally, so there's no floating-point rounding no matter how many bits you paste in.

How do I convert binary to hex in code?

JavaScript: parseInt("11010", 2).toString(16).toUpperCase(). Python: hex(int("11010", 2)) (returns "0x1a"), or format(int("11010", 2), "X") for uppercase without the prefix.

How is binary to hex different from converting through decimal?

It isn't mathematically different -- binary 11010 and hex 1A both equal decimal 26. But grouping into 4-bit chunks and looking up each one is faster and less error-prone than converting binary to decimal and then decimal to hex, since it's a pure lookup with no multiplication or division.

What are hex digits A-F worth in binary?

A=1010, B=1011, C=1100, D=1101, E=1110, F=1111 -- see the full 4-bit nibble table above for every possible binary group.

This calculator gives estimates for your own records. It is not legal, tax or payroll advice. Spotted a wrong result? Tell us. Last reviewed .