Hex to Binary Converter
The hex to binary converter writes each hexadecimal digit as four binary digits: A = 1010 and F = 1111, so AF = 1010 1111. It also converts binary back to hex, four bits at a time.
Sources: Wikipedia Updated
Hex to binary result
How hex and binary digits match up
Hex to Binary: Each hexadecimal digit (0-F) directly maps to 4 binary digits. The tool converts each hex digit to its 4-bit binary equivalent.
Binary to Hex: Groups of 4 binary digits are converted to their corresponding hexadecimal digit (0-F).
Tip: You can use spaces in binary input for readability. The converter accepts both "11010010" and "1101 0010".
Why each hex digit is four bits
Hexadecimal is base 16, and 2⁴ = 16, so every hex digit matches exactly four bits, a nibble, with nothing left over. Octal, base 8, uses three bits per digit instead.
That fixed size is why hexadecimal is the usual short way to write binary.
How to convert hex to binary
Convert 1A3F.
- Take one hex digit at a time: 1, A, 3, F.
- Write each as four bits, using the place values 8, 4, 2, 1: 1 = 0001, A (10) = 1010, 3 = 0011, F (15) = 1111.
- Join the groups in order: 0001 1010 0011 1111.
Check through decimal: hex 1A3F is 6,719 in the hex to decimal converter, and binary 1101000111111 is 4096 + 2048 + 512 + 32 + 16 + 8 + 4 + 2 + 1 = 6,719.
How to convert binary to hex
Convert 111010110, which has 9 bits. Pad it to 12 bits, a multiple of 4, with three zeros on the left: 000111010110.
Split into groups of four, 0001 1101 0110, and write each as a hex digit: 1, D, 6. So 111010110 = 1D6. Check: 1 × 256 + 13 × 16 + 6 = 470, and 111010110 is 470 in the binary to decimal converter. The binary to hex converter covers this direction on its own.
Hex to binary chart
| Hex | Binary | Hex | Binary | Hex | Binary | Hex | Binary |
|---|---|---|---|---|---|---|---|
| 0 | 0000 | 4 | 0100 | 8 | 1000 | C | 1100 |
| 1 | 0001 | 5 | 0101 | 9 | 1001 | D | 1101 |
| 2 | 0010 | 6 | 0110 | A | 1010 | E | 1110 |
| 3 | 0011 | 7 | 0111 | B | 1011 | F | 1111 |
Input handling
Typing in either box clears the other, because the two conversions run separately. The binary box accepts spaces between groups, so 11010010 and 1101 0010 give the same result.
Where hex to binary comes up
Hex is shorthand for binary in low-level programming, memory addresses and colour codes. A 24-bit colour such as #1A3F0C is three 8-bit channels written as two hex digits each. The hex converter adds octal and decimal, and all the conversions are on the number system converters page.
Hex to Binary Converter: FAQ
What is F in binary?
1111. F is 15, which is 8 + 4 + 2 + 1.
Do I keep the leading zeros?
Inside the number, yes: 1A3F is 0001 1010 0011 1111, and the zeros keep each digit at four bits. Zeros at the very front can be dropped, giving 1101000111111.
What is a nibble?
A group of four bits, half a byte. One hex digit is one nibble, so a byte is two hex digits.
Sources
- Wikipedia: Hexadecimal — each hex digit stands for 4 bits (checked October 16, 2026)
- Wikipedia: Nibble — a group of four bits (checked October 16, 2026)