Guide
Expanding hexadecimal into bits, one digit at a time
A hexadecimal value tells you what a number is; the bits tell you what it does. Status registers, permission masks, protocol flags and feature switches pack many on-off settings into one hex number, and reading them means expanding the number to its bits. This page does the expansion and lays out the table so you can follow it.
The sixteen patterns
Every hex digit maps to a fixed group of four bits: 0 is 0000, 1 is 0001, up to 9 which is 1001, then A is 1010, B is 1011, C is 1100, D is 1101, E is 1110 and F is 1111. Learning these sixteen is the quickest way to read hex by eye, and the working on this page prints the ones your number uses so you can learn them with real examples. To convert, replace each digit by its group and join the groups.
Why the conversion is exact
Hexadecimal and binary are both powers of two, so no arithmetic is needed: the digits map directly and nothing can be lost. That is different from converting to decimal, where the place values do not line up. For that reason this conversion is also the safest one to do by hand when you are checking another tool.
Options
The page accepts upper and lower case, a 0x prefix, and separators such as spaces or underscores, so you can paste straight from a debugger or a log. Adding “Add 0b prefix” to the output helps if you are pasting into source code, and “Group digits” splits the result into readable blocks. The same number is shown in octal, decimal and base 36 in the box below.
Edge cases
Leading zeros disappear: 0F is 1111, not 00001111. If a format needs a full byte, pad the left side yourself. Hex can also hold fractions, such as 1F4A.8, and the digits after the point are expanded in the same way. A character that is not 0–9 or A–F stops the line and the message points to its position, which catches mistakes such as the letter O in place of zero.
Very large values are fine. A 64-digit hex string, such as a SHA-256 digest, becomes 256 bits without any rounding.
A worked example
The Sample button loads 1F4A.8. The digits expand as 1 → 0001, F → 1111, 4 → 0100, A → 1010, and after the point 8 → 1000. Dropping the leading zeros gives 1111101001010.1. In decimal that value is 8010.5: 4096 + 3840 + 64 + 10 for the integer part and 0.5 for the fraction. In octal it is 17512.4. Seeing the same number in several bases makes it easy to spot a transcription mistake in any of them.
Limits
The page expands whatever you give it and does not know which bits mean what. It will not pad to a width, mark the bit positions or name the flags of a particular device, so keep the data sheet at hand. For a quick view of how individual bits combine into masks, the bitmask calculator is a better fit. If the hex came from a network capture and the bytes look reversed, the endian converter shows both readings.
Related tools
- Binary to Hex goes the other way and shows how bits are grouped.
- Hex to Decimal gives the numeric value with a place-value table.
- Bitmask Calculator tests and combines flags.
- Endian Converter swaps bytes when a multi-byte value looks wrong.
Checked against the current version of the Hex to Binary on .

