Skip to content
CalcWorld

Browse all tools

Hex to Binary Converter

The hex to binary converter writes each hexadecimal digit as four binary digits: A = 1010 and F = 1111, so AF = 1010 1111. It also converts binary back to hex, four bits at a time.

Sources: Wikipedia Updated

Hex to binary result

How hex and binary digits match up

Hex to Binary: Each hexadecimal digit (0-F) directly maps to 4 binary digits. The tool converts each hex digit to its 4-bit binary equivalent.

Binary to Hex: Groups of 4 binary digits are converted to their corresponding hexadecimal digit (0-F).

Tip: You can use spaces in binary input for readability. The converter accepts both "11010010" and "1101 0010".

Why each hex digit is four bits

Hexadecimal is base 16, and 2⁴ = 16, so every hex digit matches exactly four bits, a nibble, with nothing left over. Octal, base 8, uses three bits per digit instead.

That fixed size is why hexadecimal is the usual short way to write binary.

How to convert hex to binary

Convert 1A3F.

  1. Take one hex digit at a time: 1, A, 3, F.
  2. Write each as four bits, using the place values 8, 4, 2, 1: 1 = 0001, A (10) = 1010, 3 = 0011, F (15) = 1111.
  3. Join the groups in order: 0001 1010 0011 1111.

Check through decimal: hex 1A3F is 6,719 in the hex to decimal converter, and binary 1101000111111 is 4096 + 2048 + 512 + 32 + 16 + 8 + 4 + 2 + 1 = 6,719.

The hex number 1A3F written as four groups of four bits: 0001 = 1, 1010 = A (10), 0011 = 3 and 1111 = F (15). So 1A3F = 0001 1010 0011 1111 in binary.
Each hex digit becomes exactly four bits, with leading zeros kept inside the group.

How to convert binary to hex

Convert 111010110, which has 9 bits. Pad it to 12 bits, a multiple of 4, with three zeros on the left: 000111010110.

Split into groups of four, 0001 1101 0110, and write each as a hex digit: 1, D, 6. So 111010110 = 1D6. Check: 1 × 256 + 13 × 16 + 6 = 470, and 111010110 is 470 in the binary to decimal converter. The binary to hex converter covers this direction on its own.

Hex to binary chart

HexBinaryHexBinaryHexBinaryHexBinary
000004010081000C1100
100015010191001D1101
2001060110A1010E1110
3001170111B1011F1111

Input handling

Typing in either box clears the other, because the two conversions run separately. The binary box accepts spaces between groups, so 11010010 and 1101 0010 give the same result.

Where hex to binary comes up

Hex is shorthand for binary in low-level programming, memory addresses and colour codes. A 24-bit colour such as #1A3F0C is three 8-bit channels written as two hex digits each. The hex converter adds octal and decimal, and all the conversions are on the number system converters page.

Hex to Binary Converter: FAQ

What is F in binary?

1111. F is 15, which is 8 + 4 + 2 + 1.

Do I keep the leading zeros?

Inside the number, yes: 1A3F is 0001 1010 0011 1111, and the zeros keep each digit at four bits. Zeros at the very front can be dropped, giving 1101000111111.

What is a nibble?

A group of four bits, half a byte. One hex digit is one nibble, so a byte is two hex digits.

Sources