Hex to binary converter
Enter a hexadecimal number of any length and see it in binary and decimal straight away, grouped into nibbles if you like.
Runs in your browser. Nothing you enter is uploaded.
How to use the hex to binary converter
- Type or paste a hex value into the Hexadecimal box; a 0x prefix, spaces and lower case are fine.
- Read the binary and decimal results as you type.
- Tick Group nibbles to split the bits into groups of four, or untick Keep leading zeros to drop them.
- Click Copy to use a result elsewhere.
How do you convert hex to binary?
Replace every hex digit with its four-bit pattern from the nibble table and join them together. 1F becomes 0001 and 1111, so the binary value is 00011111, which is 31 in decimal. A5 becomes 1010 0101, or 165. No division or long arithmetic is needed, because 16 is a power of two and each hex digit covers exactly four bits.
Keeping the leading zeros shows the full width of the value: two hex digits always give eight bits, one byte. Untick Keep leading zeros when you only want the significant bits, so 3 becomes 11 instead of 0011.
Where do you need hex to binary?
Whenever individual bits matter: reading flags and bit masks in configuration registers, checking which permissions are set in a numeric value, understanding network masks, or following a hex dump at bit level. Grouping by nibble lines the bits up with the original hex digits, so you can see that F in 0x1F sets the lowest four bits.
Frequently asked questions
Can I convert very long hex values?
Yes. Each digit is converted on its own, so the binary output has no length limit, and the decimal value uses BigInt, which keeps every digit exact. Hashes, keys and 64-bit or 128-bit values all convert without rounding.
Does it accept 0x and lower-case letters?
Yes. A leading 0x is ignored, letters can be upper or lower case, and spaces are removed, so 0xdead beef works. Characters outside 0-9 and A-F show an error naming the character, while the last good result stays on screen.
What is a nibble?
A nibble is four bits, half a byte. It can hold 16 values, from 0000 to 1111, which is exactly the range of one hex digit from 0 to F. That one-to-one match is what makes hex such a convenient shorthand for binary.
Why is the decimal value so large?
Every extra hex digit multiplies the value by 16, so long hex strings become very large numbers: eight digits can reach 4,294,967,295 and sixteen digits more than 18 quintillion. The converter shows the exact value instead of switching to scientific notation.