Hex to Binary Converter
One hex digit = one nibble
Each hexadecimal digit stands for exactly four bits, so conversion is a lookup: replace every digit with its 4-bit pattern.
One hex digit is exactly four bits
Because 16 = 2⁴, each hexadecimal digit maps to one 4-bit group (a nibble), with no arithmetic needed:
| Hex | Bits | Hex | Bits |
|---|---|---|---|
| 0 | 0000 | 8 | 1000 |
| 1 | 0001 | 9 | 1001 |
| 2 | 0010 | A | 1010 |
| 3 | 0011 | B | 1011 |
| 4 | 0100 | C | 1100 |
| 5 | 0101 | D | 1101 |
| 6 | 0110 | E | 1110 |
| 7 | 0111 | F | 1111 |
Example: A5 → A = 1010, 5 = 0101 → 1010 0101. Going back is the same lookup in reverse; the binary to hex converter groups bits from the right in fours.
For a fixed-width field, keep all the bit groups the field calls for. A full byte in a register or packet uses two hex digits, so the mask 0x0F becomes 0000 1111.
Related guides
More
Other Number System Conversions
Related numeral systems converters for number conversion between binary, decimal, hexadecimal, octal, and ASCII text.
Binary to Decimal Converter Binary Fraction to Decimal Signed Binary to Decimal Binary to Hexadecimal Binary to Octal Binary Base Converter Binary Calculator Binary Addition Binary Subtraction Step-by-Step Solver Binary Table Generator Binary to Text Text to Binary Floating Point Converter Bit Size Converter Bitwise Operations Binary Decoder Hex to Decimal Decimal to Binary Decimal to Hex Hex Calculator ASCII Table Subnet Calculator YAML to JSON JSON to YAML JSON to CSV
FAQ
Frequently Asked Questions
How do you convert hex to binary?
Replace each hex digit with its 4-bit binary pattern: 0=0000 … 9=1001, A=1010, B=1011, C=1100, D=1101, E=1110, F=1111. 3F → 0011 1111.
Why does one hex digit equal four bits?
16 = 2⁴, so the 16 possible hex digits match the 16 possible patterns of four bits exactly.
Are leading zeros kept?
The result pads each group to four bits, so 3F displays as 0011 1111. A leading zero digit can be dropped when it contributes a whole group of zeros. For example, 0F displays as 1111.