Home › Unit Converters › Hex to Binary Converter

Hex to Binary Converter

Convert hexadecimal to binary with this free hex to binary converter — or flip it around and turn binary back into hex. Hex and binary are the two number systems programmers and electronics engineers live in, and they fit together beautifully: every single hex digit is exactly four binary digits, so the conversion is a simple swap, digit by digit, with no arithmetic at all. Paste a hex value like FF or 3E8 and watch it open up into bits.

11111111
FF (hex) = 1111 1111 (binary) • decimal 255
Digit by digit:
  1. F = 1111
  2. F = 1111
  3. Join the groups: 1111 1111

How to use

  1. Type or paste your hex value in the box. You can include a 0x prefix or spaces — the tool cleans them up for you.
  2. Check the Direction is set to Hex → Binary, and pick how you want the bits spaced out.
  3. Press Convert — the answer also updates as you type. The binary result appears in big type, with the decimal value underneath.
  4. Look at the “Digit by digit” box to see exactly how each hex digit turned into its four bits.
  5. To go the other way, choose Binary → Hex or press the swap button, then type a binary number instead.

Hex digits and their binary values

HexBinaryDecimalHexBinaryDecimal
000000810008
100011910019
200102A101010
300113B101111
401004C110012
501015D110113
601106E111014
701117F111115

So a two-digit hex number like 3E is just the nibbles 0011 and 1110 joined together: 00111110. And a longer value like 3E8 becomes 0011 1110 1000 — which the tool also shows with the leading zeros dropped, as 1111101000.

How it works

Computers store everything as bits — binary digits, each one a 0 or a 1. Binary is exact but painfully long to read: the number 1000 needs ten bits (1111101000). Hexadecimal, or hex, is base 16: it counts 0 to 9 and then keeps going with the letters A to F for ten to fifteen. Because 16 is 2 to the power of 4, one hex digit covers exactly the same range as four binary digits — a group of four bits is called a nibble. That neat fit is the whole secret of this conversion.

So instead of dividing by 2 again and again, you simply replace each hex digit with its four-bit pattern from the table above and join the patterns in order. FF becomes 1111 followed by 1111, giving 11111111. Going back, you chop the binary number into groups of four from the right — adding a zero or two on the left if the last group is short — and swap each group for its hex digit. No calculator arithmetic is involved at all, which is why programmers do it in their heads.

Hex → Binary: swap every hex digit for its 4-bit pattern (F = 1111, A = 1010)  |  Binary → Hex: group the bits in fours from the right, then swap each group for a hex digit  |  One hex digit = 4 bits = one nibble

Hex turns up everywhere binary does, but shorter. Memory addresses are written in hex, web colours are hex codes like #FF6347 (which is really three byte values — red 255, green 99, blue 71), and error codes, MAC addresses and file signatures all use it. When a programmer needs to see which individual bits are set inside a byte, the hex value is the readable form and the binary is the true form — this converter flips between the two. The decimal value is shown under the result as a sanity check: FF should always come out as 255.

A common confusion is thinking hex letters stop at F. They do: A to F stand for 10 to 15, and there is no G in hex. If you paste a value containing a letter beyond F, this tool will stop and tell you exactly which character is not a hex digit, instead of quietly giving a wrong answer.

Worked example

Convert the hex value 3E8 to binary — a number you might meet as a memory size or an error code.

Step 1: Take the first digit — 3 = 0011.
Step 2: The second digit — E = 1110.
Step 3: The third digit — 8 = 1000.
Step 4: Join the groups in order: 0011 1110 1000.

So 3E8 in hex is 001111101000 in binary, usually written without the leading zeros as 1111101000. The decimal check agrees: 3E8 means 3 × 256 + 14 × 16 + 8 = 1000, and 1111101000 in binary is also 1000. The calculator opens with FF entered, which gives 11111111 — decimal 255.

FAQ

What is FF in binary?

FF in hex is 11111111 in binary. Each F is the nibble 1111, so two of them join to make eight ones. FF is the largest value one byte can hold, which is 255 in decimal.

How do I convert hex to binary by hand?

Swap each hex digit for its four-bit binary pattern using the table on this page, then join the patterns in order. For example, A3 becomes 1010 0011, written as 10100011. There is no division or multiplication involved.

Why does one hex digit equal exactly four bits?

Because hex is base 16 and 16 is 2 to the power of 4. Four bits can make 16 different patterns (0000 to 1111), which is exactly the range of one hex digit, 0 to F. This is why the two systems convert so cleanly.

Can this tool convert binary back to hex?

Yes. Choose Binary → Hex in the Direction box, or press the swap button, then type your binary number. The tool groups the bits in fours from the right, adds a leading zero group if needed, and swaps each group for its hex digit.

What does the 0x in front of a hex number mean?

The 0x prefix is a label programmers use to say “the number after this is in hex”, so 0xFF means FF in hex, which is 255 in decimal. This converter accepts values with or without the 0x prefix, and ignores spaces.

What is the largest hex digit?

F, which stands for fifteen — 1111 in binary. Hex digits run 0, 1, 2 … 9, then A (10), B (11), C (12), D (13), E (14) and F (15). Letters beyond F, like G, are not valid hex digits.