Hex to Binary Converter
Expand hexadecimal numbers into binary to see every bit. Convert colour codes, memory addresses, bit masks and byte values of any length, one at a time or as a list, with optional 4-bit grouping for easy reading.
How to Convert Hex to Binary
Quick answer: paste one or more hex numbers; the binary appears below, grouped in fours.
-
1
Paste hex numbers
One or many, any length.
-
2
Choose grouping
Groups of four are easiest to read.
-
3
Trim zeros if wanted
Or keep the full width.
-
4
Copy or download
Use the binary anywhere.
What You Get
How Hex Becomes Binary
Every hexadecimal digit stands for exactly four binary digits: 0 is 0000, 9 is 1001, A is 1010 and F is 1111. Converting hex to binary therefore means replacing each digit with its four-bit pattern. FF becomes 1111 1111 and A5 becomes 1010 0101. Because each digit maps exactly, numbers of any length convert without rounding or loss.
Grouping and Leading Zeros
Group bits in fours puts a space after every four bits, matching the hex digits, so you can see which bits belong to which digit at a glance. Remove leading zeros drops zeros at the start, so 0F becomes 1111 instead of 0000 1111. Keep zeros when the width matters, such as bytes, colour channels and register values.
Accepted Input
Separate several numbers with spaces, commas or new lines and each is converted in order. Prefixes such as 0x and # are removed automatically, so colour codes like #1E90FF and program values like 0xA5 can be pasted directly. Capital and small letters both work.
Example
FF becomes 1111 1111, 0xA5 becomes 1010 0101, and the colour #1E90FF becomes 0001 1110 1001 0000 1111 1111, showing its red, green and blue bytes as bits. To go back, use Binary to Hex.
Who Converts Hex to Binary?
Students learning number systems, programmers checking bit masks and flags, electronics and microcontroller hobbyists setting register bits, network engineers working with addresses and masks, and designers curious about how colour codes are stored. Seeing the individual bits makes it easy to tell which flags or channels are on.
Step by Step
Paste or type your hex numbers, with or without 0x or #. Choose whether to group bits in fours and whether to keep leading zeros. Copy the binary, or download it as a .txt file. If a number contains a character other than 0 to 9 or A to F, a clear message shows which one needs fixing.
Good to Know
This tool converts numbers, not text: the hex 48 69 gives the bits of two bytes, not the word "Hi". To read hex as text, use Hex to Text, and to see the bits of written text, Text to Binary. Very long hex values, such as keys and hashes, convert instantly into their full binary form.
More Examples
More examples: 1 is 0001, 8 is 1000 and F is 1111, so 1F becomes 0001 1111. The value 100 in hex is 256 in decimal and 0001 0000 0000 in binary. A typical colour such as #FFA500 expands to three bytes: 1111 1111 1010 0101 0000 0000, one for red, green and blue. Memory addresses like 0x7FFF become 0111 1111 1111 1111, showing that the top bit is off. Network masks are another common use: FFFFFF00 gives twenty-four ones followed by eight zeros, the familiar /24 mask.
Private, Free and Instant
The converter is free and handles numbers of any length. There is no sign-up, no limit and nothing to install. The conversion runs inside your browser, so your text and data are never uploaded, logged or stored. The result updates as you type or paste, and you can open a text file from your device and download the result as a new .txt file. It works on Windows, Mac, Linux, Chromebooks, iPhone and Android, in any modern browser.
Hexadecimal and Binary: Why They Pair So Well
Hexadecimal uses sixteen symbols, 0 to 9 and A to F, and it is a compact way to write binary. Every hex digit stands for exactly four bits, so converting between the two is a matter of swapping each digit for its four-bit pattern.
The conversion table
0 is 0000, 1 is 0001, 2 is 0010, 3 is 0011, 4 is 0100, 5 is 0101, 6 is 0110, 7 is 0111, 8 is 1000, 9 is 1001, A is 1010, B is 1011, C is 1100, D is 1101, E is 1110 and F is 1111. So 2F becomes 0010 1111.
Where you use it
- Colour codes: #FF8800 holds three bytes for red, green and blue.
- Memory addresses and machine code in debuggers.
- Network and hardware identifiers, such as MAC addresses.
- Bit masks, where each bit is a switch.
Leading zeros matter in binary because they keep the width, so 0F is 00001111. For the other direction, see binary to hex.
Frequently Asked Questions
Questions about hex to binary