Expand hexadecimal digits into readable four-bit binary groups, with a reverse mode for rebuilding hex from grouped binary.
Last updated: August 2026 | By Workshelve Team
Converted output will appear here...
Hexadecimal uses sixteen digit values: 0 through 9 followed by A through F. Because one hex character represents four bits, reading hex as binary is an expansion rather than a whole-number calculation: each source digit can be replaced independently by its four-bit pattern.
This page keeps those nibble boundaries visible by inserting spaces between the four-bit groups. For example, C0DE becomes 1100 0000 1101 1110. The spaces are for readability and are not part of the binary number.
Leading zero hex digits are deliberately preserved. That means 0F is shown as 0000 1111, which keeps the width encoded by the two input digits. The converter also accepts lowercase hex, whitespace, and one optional leading 0x prefix; other characters are rejected rather than silently removed.
Remove one leading 0x marker and whitespace. Keep every hexadecimal digit, including leading zeros.
Replace each hex digit with its four-bit equivalent. C becomes 1100, 0 becomes 0000, and F becomes 1111.
Write the four-bit groups in the same left-to-right order so the binary output mirrors the structure of the source hex.
Three hex digits expand to three 4-bit groups.
Each source digit keeps its own nibble boundary.
Leading zero hex digits remain visible as 0000 groups.
Letters A-F represent values ten through fifteen.
The spaces separate the four-bit group produced by each hexadecimal digit. They are display separators only and do not change the binary value.
This converter preserves the width implied by the hexadecimal input. Each hex digit expands to exactly four bits, so the leading 0 becomes a visible 0000 group.
They are the six digits after 9 in base 16: A=10, B=11, C=12, D=13, E=14, and F=15.
No. 0x is a common programming-language prefix that marks a following integer literal as hexadecimal. This tool accepts one optional 0x prefix at the start and removes it before conversion.
Yes. Hex digits A-F are case-insensitive here, so c0de and C0DE produce the same binary groups.
Not with the # marker. This calculator accepts hexadecimal digits, whitespace, and an optional leading 0x prefix. Remove # first if you only want to inspect the underlying hex digits as bits.
Base 16 has 16 possible digit values, and four bits also have 16 possible patterns from 0000 through 1111. Preserving four bits per digit keeps the mapping one-to-one.
It pads the left side with zeros until the binary length is a multiple of four, then maps each group to one hex digit. Whitespace between binary groups is allowed.
Related Tools
Convert HEX color codes into RGB color values.
Convert number base values.
Convert Base64 encoded data into hexadecimal values.
Convert hexadecimal values into Base64 encoded data.
Convert binary values into hexadecimal numbers.
Convert CMYK color values into HEX color codes.