Hex to Binary
Convert hexadecimal (base-16) to binary (base-2) instantly. Each hex digit maps to exactly 4 bits, with step-by-step solutions, 0x/#/spaced input support, bit-length padding, and grouped output. Free, no signup.
How to Use the Hex to Binary Converter
1. Paste your hex value in any format: with a 0x or # prefix, with spaces or dashes, or as a plain string.
2. The converter strips the formatting and replaces each hex digit with its 4-bit binary equivalent.
3. Read the step-by-step breakdown to see how each digit was expanded.
4. Choose bit-length padding (8, 16, 32 or 64 bits) and spaced grouping if you need them.
5. Use the binary result in your code, notes or register configuration.
From Hex to Binary: How the Conversion Works
Hexadecimal is base 16, and 16 is 2⁴. That means every hex digit stands for exactly four binary bits, called a nibble, and the conversion is simple and lossless. You replace each digit with its four-bit group and join them in order.
Example: 2F
2 = 0010 F = 1111
Result: 00101111
Example: A3
A = 1010 3 = 0011
Result: 10100011
Hex to Binary Conversion Table
| Hex | Binary | Hex | Binary |
| 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 |
Converting 0x Values to Binary
The 0x at the start of a number is just a label that says "this is hexadecimal". It isn't part of the value, so 0xF0 and F0 are the same number. Programmers use it in languages such as C, Java and Python, and this converter removes it for you. Here are some values that come up often:
| Hex | Binary | Notes |
| 0xF0 | 1111 0000 | High nibble set |
| 0x0F | 0000 1111 | Low nibble set |
| 0x40 | 0100 0000 | Only bit 6 set |
| 0xAA | 1010 1010 | Alternating bits |
| 0x55 | 0101 0101 | The opposite alternating pattern |
| 0xFF | 1111 1111 | All eight bits set |
Converting 16-Bit Hex Values to Binary
A 16-bit value has four hex digits, and each digit becomes four bits. For example, 0x1A2B gives:
1 = 0001 A = 1010 2 = 0010 B = 1011
Result: 0001 1010 0010 1011
Digit by digit, 0xFF is 1111 1111, which is eight bits. If you need it as a 16-bit value, the padding option adds eight leading zeros to give 0000 0000 1111 1111. Choose 8, 16, 32 or 64 bits depending on your register or memory width. The converter shows each digit as four bits, even when the plain numeric value could be written with fewer, so what you see is the width-preserving form.
Hex to Binary Calculator for Registers, Masks and Memory Dumps
Hex is easy to read, but you can't see a single bit in it. Converting to binary lets you check which bits are set in a register, verify a bit mask, read a memory dump, decode part of a network packet, or inspect a key. Doing it by hand risks mis-mapping a nibble, and one wrong digit changes the whole pattern. The step view shows each mapping so you can confirm it.
Bit Padding and Grouped Output
Each hexadecimal digit represents four bits, including zeros at the start. For example, 0F converts to 00001111 when both digits are preserved. If you only need the numeric value, the leading zeros can be omitted and written as 1111, but keep them for registers and fixed-width data so every bit position is clear.
The padding option adds leading zeros to reach the width you choose, such as 8, 16, 32 or 64 bits. Use it whenever alignment matters.
Grouped output spaces the bits every 4 or 8 for easier reading. The spaces don't change the value, so 1010 0011 and 10100011 are identical. Remove them before pasting into anything that expects one continuous string.
Why Is Hex Used if Computers Work in Binary?
Hex is a compact shorthand. One hex digit replaces four bits, so a value is a quarter of the length, and two digits cover a byte. That is why debuggers, memory dumps and registers show data in hex, and why converting to binary is useful when you need to see individual bits.
Common Mistakes to Avoid
❌ When Converting Hex to Binary
✓ Solution:
• Mis-mapping a nibble, especially B and 8. B is 1011 and 8 is 1000. Writing B as 1010 or 1101 gives a completely different pattern. Use the step view to confirm each digit.
• Ignoring the context. A bare 10 could mean ten in decimal or sixteen in hex. Check the number really is hexadecimal before converting. The 0x and # prefixes are removed automatically, but a value copied from documentation may not be labelled.
• Mixing up the bit order. In 00011010, the leftmost bit is the most significant and the rightmost is the least significant (bit 0). Reversing the order corrupts bitwise operations and register settings.
• Dropping leading zeros. 0F maps to 00001111, not just 1111. As a plain number the zeros can go, but in an 8-bit register they show that the upper four bits are clear. Use padding when width matters.
• Assuming grouping changes the value. Spaces between groups are only for reading. Strip them before using the result where a continuous string is expected.
Frequently Asked Questions
Replace each hex digit with its 4-bit binary equivalent, from 0 = 0000 up to F = 1111, and join the groups in order. For example, 2F becomes 0010 1111, which is 00101111. The converter shows this step-by-step breakdown for every value.
Four. Each hex digit stands for exactly four bits, and two hex digits make one byte. That is why a 16-bit value is four hex digits and a 32-bit value is eight.
It is simply a marker that the number that follows is hexadecimal, used in languages such as C, Java and Python. It is not part of the value, so 0xF0 and F0 are the same number. The converter removes it for you.
0xF0 is 11110000, 0x40 is 01000000, 0xAA is 10101010, and 0x55 is 01010101. Each one is two hex digits expanded to eight bits.
A 16-bit value has four hex digits, so convert each digit to four bits. For example, 0x1A2B becomes 0001 1010 0010 1011. For shorter values, use the padding option to extend the result to 16 bits.
It accepts a 0x or 0X prefix, a # prefix, spaced bytes such as FF AA BB, dash-separated bytes such as FF-AA-BB, and continuous strings. It strips the formatting before converting, so you can paste straight from a debugger or color picker.
Each hex digit is four bits, including any zeros at the start. For example, 0F maps to 00001111 when both digits are kept. As a plain number you can drop the leading zeros and write 1111, but in an 8-bit register or any fixed-width field you keep all eight bits so every bit position is clear. The padding option adds leading zeros to reach the width you choose: 8, 16, 32 or 64 bits.
Yes. It converts instantly and also shows each hex digit expanding into its 4-bit group, so you can check the working as well as the answer.
Yes. Long values such as a 256-bit key, which is 64 hex digits, can be converted, and the grouped output keeps the result readable. For extremely large inputs, performance depends on your browser.
Group the binary digits into fours from the right and replace each group with its hex digit. The Binary to Hex converter on this site does it for you.
No. The conversion runs in your browser.
Convert Your Hex Value
Enter your hexadecimal value in the converter above to see the binary result and every step.
More Like This
Advance Loan Calculator
A loan calculator is a financial tool designed to help borrowers estimate their monthly payments, total interest, and repayment schedule for a loan. By inputting key details such as the loan amount, interest rate, and loan term, users can quickly determine how much they will need to pay each month and the overall cost of the loan.
Base64 Decode
Free Base64 decoder for text, files, and images with JWT/Base64URL support and 100% client-side, private processing.
Base64 Encode
Encode text to Base64 instantly. Type any input and get a safe, ASCII-only Base64 string in real time, with one-click copy.

