Convert hexadecimal to binary by expanding every hex digit into its 4-bit pattern. One hex digit always equals exactly four bits, which is why programmers read hex fluently.
Show calculation steps
Processed privately in your browser β nothing you paste is uploaded, logged or stored.
Unfolding nibbles
Expanding hexadecimal to binary is table lookup, pure and simple: each hex digit becomes its fixed four-bit pattern, concatenated in order. No divisions, no carries β which is why the conversion scales to any length with zero error.
The direction matters practically: datasheets and code write masks in hex, but reasoning about individual flags happens in binary. This page is that unfolding.
Worked example
Input: 35F 3 β 0011 5 β 0101 F β 1111 Result: 0011 0101 1111 (= 1101011111 after trimming lead zeros)
| Decimal | Binary | Hex |
|---|---|---|
| 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 |
| 10 | 1010 | A |
| 11 | 1011 | B |
| 12 | 1100 | C |
| 13 | 1101 | D |
| 14 | 1110 | E |
| 15 | 1111 | F |
Width and leading zeros
Each digit contributes exactly four bits, so 0x0F is 00001111 β eight bits, not four. When the value represents a fixed-width register, those leading zeros are meaningful and the tool preserves them; when only the value matters, trimming is safe. The distinction is the difference between a byte and a number.
Why this beats mental conversion
The failure mode of hand expansion is misremembering one nibble (B and D are the usual suspects). Since every downstream bit operation inherits the error, checking against a generated expansion β with the steps panel showing each digitβs group β is cheap insurance during debugging and code review.
Guarantees and privacy
Any length, exact, with positional error messages for invalid characters and prefix mix-ups (an 0b or 0o prefix names the converter you probably wanted). Local processing throughout β keys and addresses you paste never leave the page.
How to use the Hex to Binary Converter
- Enter the hex value – with or without an 0x prefix, any letter case.
- Click "Convert to binary".
- The steps expand every hex digit into its 4-bit group.
- Toggle grouping if you want the raw bit run without spaces.
Frequently asked questions
How does each hex digit expand?
By table lookup: 3 β 0011, 5 β 0101, F β 1111. Concatenate the groups in order and you have the binary – 35F becomes 0011 0101 1111, i.e. 1101011111 after trimming lead zeros.
Why do programmers write bitmasks in hex rather than binary?
Length and error rate: 0xFF00 is four characters against sixteen 1s and 0s, and the per-nibble structure makes the covered bit ranges obvious once the sixteen patterns are familiar.
Do leading zeros in the output matter?
They preserve width: 0x0F expands to 00001111, which matters when the value represents a fixed-width register or byte. The tool keeps each nibble's four bits so widths stay honest; trimming is offered, not forced.
Is 0x35F the same as 35F here?
Yes – the prefix is decoration marking the base, common in C-family languages. But an 0b or 0o prefix on this page is an error, and the tool will tell you which converter matches that prefix.
What invalid input should I watch for?
Any character outside 0-9/a-f – most commonly O for 0 or l for 1 from fonts, or a stray G. The error names the character and its position rather than guessing.
How large can the value be?
Unlimited in practice – a 64-digit hex hash expands to its 256 bits exactly, since the conversion is per-digit and never touches floating point.
Where does the conversion run?
In your browser only. Nothing is sent, stored or logged – safe for values that happen to be keys or addresses.