Hexadecimal to binary converter
Convert hexadecimal to binary using 4-bit nibbles, grouped output and optional byte padding. Includes decimal output and automatic per-digit steps.
Hexadecimal to Binary Calculator Online (Step-by-Step)
Convert hex to binary in seconds, group the output into nibbles or bytes, and apply automatic byte padding. Includes a step table for every digit.
Binary
—
Grouped binary
—
Padded binary
—
Decimal (optional)
—
Automatic steps: each hex digit equals 4 bits
| # | Hex | Binary (4 bits) | Bits used |
|---|
How to convert hexadecimal to binary
The mapping is exact because one hexadecimal digit always represents 4 bits. Replace every character with its nibble and join the pieces.
- Clean the string. Remove optional
0xprefixes, spaces, or underscores. The calculator normalizes this for you. - Process digit by digit. From left to right, take each hex symbol (0–9, A–F).
- Swap for 4 bits. Use the lookup table: A → 1010, F → 1111, 0 → 0000, and so on.
- Concatenate the nibbles. Join every 4-bit block to get the full binary number.
- Apply padding if needed. With automatic padding, zeros are added to the left until the length is a multiple of 8 bits (bytes) before grouping.
Example with 0x1FAE: 1 → 0001, F → 1111, A → 1010, E → 1110. Result without padding: 0001 1111 1010 1110; padded to bytes it stays the same because it already has 16 bits.
0 → 0000
1 → 0001
2 → 0010
3 → 0011
4 → 0100
5 → 0101
6 → 0110
7 → 0111
8 → 1000
9 → 1001
A → 1010
B → 1011
C → 1100
D → 1101
E → 1110
F → 1111
Frequently asked questions
We accept 0–9 and A–F with an optional
0x prefix plus spaces or underscores. Uppercase or lowercase does not matter; it is normalized before conversion.
When enabled, the binary output is left-padded with zeros until its length is a multiple of 8 bits (1 byte). You can then group the result in nibbles (4) or bytes (8) without breaking alignment.
Yes. The validator is case-insensitive and uppercases the input internally to show the standard nibble mapping.
Yes, up to 2048 hexadecimal digits are allowed to keep the step-by-step table readable. Above that size, a validation warning is shown.
It’s the unsigned base-10 interpretation of the same value using BigInt. It doesn’t affect the binary output; it’s just an extra reference.