Expanding hexadecimal to binary is the reverse of grouping bits into hex digits, and it is essential when you need to inspect individual bits, set bitmask flags or read register layouts. This converter turns any hex value into its full binary bit string by expanding each digit into a four-bit nibble.
How it works
Hexadecimal is base 16 and binary is base 2, and 16 equals 2 to the fourth power. That power-of-two relationship means each hex digit maps to a unique group of exactly four binary digits. The conversion is therefore a simple per-digit lookup: A becomes 1010, F becomes 1111, 5 becomes 0101, and the results are joined together in order.
No decimal intermediate is needed. The tool reads each hex character, looks up its four-bit pattern in a fixed table, and concatenates. It then offers a trimmed view with leading zeros removed (the true numeric value) and a nibble-aligned view that keeps every group of four bits intact.
Example
Convert AF. The digit A expands to 1010 and F expands to 1111. Concatenated, that is 10101111, which equals 175 in decimal. The nibble-aligned view displays it as 1010 1111 so the correspondence with the two original hex digits is obvious.
The complete hex-to-nibble lookup table
Each of the 16 hex symbols maps to exactly one 4-bit pattern:
| Hex | Binary | Decimal |
|---|---|---|
| 0 | 0000 | 0 |
| 1 | 0001 | 1 |
| 2 | 0010 | 2 |
| 3 | 0011 | 3 |
| 4 | 0100 | 4 |
| 5 | 0101 | 5 |
| 6 | 0110 | 6 |
| 7 | 0111 | 7 |
| 8 | 1000 | 8 |
| 9 | 1001 | 9 |
| A | 1010 | 10 |
| B | 1011 | 11 |
| C | 1100 | 12 |
| D | 1101 | 13 |
| E | 1110 | 14 |
| F | 1111 | 15 |
Memorising the 8, 4, C, and F patterns (1000, 0100, 1100, 1111) gives you anchor points to work out any other nibble mentally.
When you need this conversion
Reading CPU and microcontroller registers: Embedded and systems documentation typically expresses register values and bit fields in hex. To understand which bits are set in a flag register or control word, you expand each hex digit into its four bits and read the individual positions. For example, a status register value of 0x35 expands to 0011 0101, letting you immediately see which of the eight flag bits are active.
Bitmask operations: Designing or debugging bitmask logic — setting, clearing, and testing individual bit flags — is easier in binary than in hex. Writing out the binary expansion confirms that a mask like 0xF0 affects only the upper nibble (1111 0000) and 0x0F only the lower nibble (0000 1111).
Network and protocol work: IPv4 subnet masks like 255.255.255.0 are often expressed in hex as FFFFFF00. Expanding each byte to binary shows the contiguous block of network bits clearly: 11111111 11111111 11111111 00000000.
Colour values: CSS hex colours like #FF8C00 split into three bytes — red FF = 11111111, green 8C = 10001100, blue 00 = 00000000 — which reveals the exact bit weights contributing to each channel.
Tips
You can include spaces, underscores or a leading 0x for readability; all are stripped before conversion. The nibble-aligned view is especially helpful when mapping hex register dumps back to individual control bits. Everything is processed locally in your browser, so no data leaves your device.