HEX To Binary
Convert Hex to Binary instantly. Paste hex bytes (with or without spaces) or upload a file to get clean 4-bit binary output for debugging, networking, embedded work, and study—no installs, accurate results, and privacy-first on ToolsPiNG.
The Hex to Binary Converter expands hexadecimal values into their binary representation. Paste hex digits — with or without spaces between bytes — click Convert to Binary, and the tool returns the full binary output with 4 bits per hex digit. File upload is also supported.
This is the reverse of the Binary to Hex Converter: where binary-to-hex compresses data into a compact form, hex-to-binary expands it to reveal individual bits. You need full binary expansion when working with bit flags, bitmasks, hardware registers, protocol field analysis, and any task that requires inspecting or manipulating specific bit positions within a value.
How to use the Hex to Binary Converter
Paste your hexadecimal value into the input field. Valid characters are 0–9 and A–F (case-insensitive). Spaces between bytes are optional and accepted.
Click Convert to Binary.
The output shows the binary equivalent with 4 bits for each hex digit. Bytes are typically separated by spaces for readability.
Copy the binary output for use in debugging, documentation, or further analysis.
Worked example — converting AC to binary: A expands to 1010. C expands to 1100. Result: 1010 1100. Each hex digit always produces exactly 4 binary bits — no rounding, no ambiguity. Two hex digits (one byte) always produce exactly 8 binary bits. The conversion is completely mechanical: look up each digit, write the 4-bit expansion, read left to right.
Hex to binary lookup table — all 16 digits
Every hexadecimal digit (0 through F) maps to exactly one 4-bit binary sequence. The table below covers all 16 values — A through F are highlighted in red as they use letters rather than digits:
| Hex | Dec | 4-bit Binary | Hex | Dec | 4-bit Binary | Hex | Dec | 4-bit Binary |
| 0 | 0 | 0000 | 1 | 1 | 0001 | 2 | 2 | 0010 |
| 3 | 3 | 0011 | 4 | 4 | 0100 | 5 | 5 | 0101 |
| 6 | 6 | 0110 | 7 | 7 | 0111 | 8 | 8 | 1000 |
| 9 | 9 | 1001 | A | 10 | 1010 | B | 11 | 1011 |
| C | 12 | 1100 | D | 13 | 1101 | E | 14 | 1110 |
| F | 15 | 1111 |
Step-by-step conversion method
Write the hex value left to right. Example: F0AC.
Replace each hex digit with its 4-bit binary equivalent from the lookup table: F → 1111, 0 → 0000, A → 1010, C → 1100.
Write the 4-bit groups in the same left-to-right order: 1111 0000 1010 1100.
This is the complete binary output. No padding, no rounding — every hex digit always produces exactly 4 bits.
Worked examples
| Hex input | Each digit → 4 bits | Binary output |
| F | F → 1111 | 1111 |
| A | A → 1010 | 1010 |
| FF | F → 1111 F → 1111 | 1111 1111 |
| AC | A → 1010 C → 1100 | 1010 1100 |
| F0 | F → 1111 0 → 0000 | 1111 0000 |
| 1A 3F | 1→0001 A→1010 3→0011 F→1111 | 0001 1010 0011 1111 |
| FF 00 AC | F→1111 F→1111 0→0000 0→0000 A→1010 C→1100 | 1111 1111 0000 0000 1010 1100 |
| C0DE | C→1100 0→0000 D→1101 E→1110 | 1100 0000 1101 1110 |
Hex is case-insensitive: FF, ff, Ff, and fF all represent the same value (255 decimal, 11111111 binary). The converter accepts both uppercase and lowercase A–F. Convention in most documentation uses uppercase for hex digits A–F, but this is purely stylistic.
When you need to expand hex to binary
Binary-to-hex compression is useful for displaying data. Hex-to-binary expansion is useful for analysing data. The two directions serve opposite purposes:
| Use case | Why hex-to-binary helps |
| Bit flags and register values | Hardware registers and configuration bytes are often specified as hex values in datasheets. To understand which specific bits are set, you must expand hex to binary. For example, a status register value of 0x6B is meaningless until expanded to 01101011 — at which point you can read individual flag bits by position. |
| Network protocol field analysis | TCP/IP headers, Ethernet frames, and other protocol payloads are captured as hex bytes. To analyse individual bit-level fields — the TCP control bits (SYN, ACK, FIN, RST), IP flags, or VLAN tags — each hex byte must be expanded to 8 bits. Protocol fields often span multiple bits within a byte. |
| Subnet masks and CIDR notation | An IPv4 subnet mask like 255.255.255.128 has the hexadecimal equivalent FF FF FF 80. Expanding 0x80 to binary gives 10000000 — immediately showing the /25 prefix length (one bit set in the last octet). Hex-to-binary expansion makes subnet boundary calculations visual. |
| Bitmask debugging | Bitmasks are used in programming to set, clear, and test specific bits in integer values. When a bitmask is expressed in hex (e.g. 0x0F, 0x80, 0xF0), expanding to binary reveals which bits it targets: 0x0F = 00001111 (lower nibble), 0x80 = 10000000 (bit 7 only), 0xF0 = 11110000 (upper nibble). |
| Colour channel analysis | A CSS hex colour like #FF5733 is three bytes: R=FF, G=57, B=33. Expanding to binary shows the individual bit patterns for each channel: FF=11111111 (maximum red), 57=01010111, 33=00110011. Useful when working with colour manipulation at the bitwise level. |
| Firmware and hex dump analysis | Firmware images and binary files are typically viewed as hex dumps (rows of hex bytes). To inspect specific bits — protocol version flags, feature enable bits, configuration bits — individual hex bytes must be expanded to binary. This is routine in reverse engineering and firmware security analysis. |
Usage limits
| Guest (no account) | Registered (free) | |
| Daily conversions | 25 per day | 100 per day |
| Words per conversion | 200 words | 1000 words |
Related tools
Binary to Hex — compress binary back to hexadecimal. The reverse of this tool: each 4-bit nibble collapses to one hex digit.
Binary to Decimal — convert binary numbers to standard decimal (base-10).
Decimal to Hex — convert base-10 numbers directly to hexadecimal without going through binary.
Binary to Text — decode ASCII/UTF-8 binary-encoded text. When working with hex dumps of text data, convert hex to binary then use binary-to-text, or convert hex bytes directly to their ASCII character values.
Frequently asked questions
How does hex to binary conversion work?
Each hexadecimal digit is replaced by its 4-bit binary equivalent. There are only 16 possible hex digits (0–9 and A–F), and each maps to a unique 4-bit pattern. The conversion is completely mechanical: look up each digit in the table, write the corresponding 4 bits, read the result left to right. F0AC becomes 1111 0000 1010 1100 by replacing F with 1111, 0 with 0000, A with 1010, and C with 1100.
Why does each hex digit produce exactly 4 binary bits?
Hexadecimal is base-16, so each digit position can hold 16 distinct values (0 through 15). Four binary bits can also represent exactly 16 values (0000 through 1111, decimal 0 through 15). Because both ranges are identical, there is a perfect one-to-one mapping between each hex digit and a 4-bit binary sequence. This exact alignment is why hex and binary coexist so naturally in computing — hex is simply a compact, human-readable notation for binary data.
What is hex used for in computing?
Hexadecimal is the standard compact notation for binary data in virtually all technical contexts. Memory addresses are displayed in hex (0x00400000). Machine code opcodes and operands are written in hex. Colour values in CSS and HTML use hex (#FF5733). Cryptographic hashes output as hex strings. Network protocol bytes are displayed as hex. Hardware register values and bitmasks are specified in hex in processor and microcontroller documentation. Hex is used wherever binary would be too long to read but decimal does not map cleanly to byte boundaries.
Can I enter hex values with or without spaces?
Both are accepted. FF0A1C (no spaces) and FF 0A 1C (spaces between bytes) produce the same binary output. Spaces are for readability only and carry no mathematical meaning. The standard convention is to group hex as pairs of digits (bytes) separated by spaces, which makes the byte boundaries visible — but the converter handles either format.
Is hex conversion case-sensitive?
No. The converter accepts both uppercase (A–F) and lowercase (a–f) hex digits. FF, ff, Ff, and fF all represent the same value (255 decimal, 11111111 binary). Standard convention uses uppercase for hex digits A–F in technical documentation, but the converter is case-insensitive.
What is the difference between a nibble and a byte in hex?
A nibble is 4 bits — exactly one hex digit. A byte is 8 bits — exactly two hex digits. A byte can hold values from 0 (00 in hex, 00000000 in binary) to 255 (FF in hex, 11111111 in binary). In hex dumps and technical documentation, bytes are almost always written as hex pairs (two digits), so byte values span exactly two hex characters. Understanding the nibble-byte relationship is fundamental to reading any hex representation of data.
How do I read specific bit positions from a hex value?
Convert the hex value to binary, then count bit positions from right to left starting at position 0. For example, the hex value 0x6B expands to 01101011. Bit 0 (rightmost) = 1, bit 1 = 1, bit 2 = 0, bit 3 = 1, bit 4 = 0, bit 5 = 1, bit 6 = 1, bit 7 (leftmost) = 0. If you need to check whether a specific bit is set, expand the hex to binary and read the relevant bit position directly. This is the primary reason hex-to-binary conversion is useful in embedded development and protocol analysis.
Is the Hex to Binary Converter free?
Yes. The converter is free within the usage limits. Guest users can convert up to 200 words of hex per conversion and run 25 conversions per day. Registering a free ToolsPiNG account increases the word limit to 1,000 words per conversion and the daily limit to 100 conversions.