Hex to Binary Converter

Enter a hex value to see it as binary, with each hex digit expanded into its four bits.

Loading tool…

About the Hex to Binary

Each hexadecimal digit stands for exactly four bits, so converting hex to binary is a digit-by-digit substitution: 3 → 0011, F → 1111, A → 1010. So 3FA becomes 0011 1111 1010, and after dropping the leading zeros, 1111111010. The table under the result shows the expansion for every digit of your input.

This is the conversion to reach for when you need to see individual bits: which flags are set in a status register, which permission bits a mask contains, or how a subnet mask such as 0xFFFFFF00 lines up (24 ones, then 8 zeros = /24). The grouped output is padded to whole bytes and split into nibbles so you can count bit positions easily — bit 0 is the rightmost.

Input may include a 0x prefix, spaces between bytes (as copied from a hex dump) and lower-case letters. The value is converted as one unsigned number, so byte order is kept as typed. For signed interpretation of the same bits, or for other bases such as octal and base 36, open the full number base converter.

How to use it

  1. Type or paste the hexadecimal value.
  2. Read the binary result and the byte-grouped view below it.
  3. Use the table to see the 4-bit pattern for each hex digit.
  4. Copy the result.

Frequently asked questions

How do you convert hex to binary?
Replace each hex digit with its 4-bit binary value: 0=0000, 1=0001 … 9=1001, A=1010, B=1011, C=1100, D=1101, E=1110, F=1111. Then join the groups.
What is 0xFF in binary?
11111111.
What is 0x80 in binary?
10000000 — only the highest bit of the byte is set (128).
How do I convert hex to binary in code?
JavaScript: parseInt('3FA', 16).toString(2).padStart(12, '0'). Python: bin(int('3FA', 16)) or format(int('3FA', 16), '012b').

Related tools