Hex to Binary Converter
Paste a hexadecimal value and read its base-2 form the moment you stop typing. A 0x prefix is optional, spaces between bytes are ignored, and a padding toggle lines the output up into clean 4-bit nibbles. Conversion runs on BigInt in your browser, so even 64-bit and larger values stay exact.
How to convert hex to binary
- Type or paste your hexadecimal digits into the 'Hexadecimal input' box, or press 'Load sample' to try DE AD BE EF.
- Leave the 0x prefix in or drop it, and space out bytes however you like. Both are stripped before conversion.
- Tick 'Pad to 4-bit groups' if you want every nibble to keep its leading zeros.
- Read the base-2 result in the 'Binary output' box below.
- Use the Copy button to put the binary string on your clipboard.
Examples
One byte, prefix stripped
0xFF
11111111
Four bytes with spaces ignored
DE AD BE EF
11011110101011011011111011101111
Single nibble with padding on
5
0101
Frequently asked questions
How does one hex digit map to binary?
Each hexadecimal digit is exactly four binary digits, a group called a nibble. F is 1111, A is 1010, 8 is 1000 and 0 is 0000, so you can translate a value one digit at a time and concatenate the nibbles.
Why does the output sometimes have fewer digits than I expect?
Binary numbers drop leading zeros, so hex 5 becomes 101 rather than 0101. Turn on 'Pad to 4-bit groups' and the tool left-pads the whole result to the next multiple of four bits, so 5 becomes 0101 and every nibble keeps its width.
Does padding align to bytes or to nibbles?
It aligns to nibbles, meaning multiples of four bits, not eight. Hex value 1F pads to 00011111 (eight bits, which is also a byte here), but a three-nibble value pads to twelve bits rather than sixteen. If you need whole bytes, feed input that is a whole number of byte pairs.
Do I need the 0x prefix?
No. The 0x or 0X prefix is optional and case-insensitive, so FF, 0xFF and 0XFF all produce 11111111. Whitespace between digits is removed too, which is why grouped input like DE AD BE EF converts cleanly.
Can it handle very large hex values?
Yes. Conversion uses JavaScript BigInt, so there is no fixed width limit and no floating-point rounding. Long hashes, 128-bit UUIDs and larger integers convert exactly.
Are uppercase and lowercase hex both accepted?
Yes. Digits a through f and A through F are treated the same, so deadbeef and DEADBEEF give identical binary output.
What happens if I type an invalid character?
Anything outside 0-9 and a-f triggers an 'Invalid hexadecimal' message in red under the input, and the binary box stays empty until you fix it. Letters like g through z, punctuation and a stray minus sign all count as invalid.
What does an empty box produce?
An empty input, or one that is only spaces and a 0x prefix, returns an empty binary output rather than an error. Nothing is shown until there is at least one valid hex digit to convert.
Is my data uploaded anywhere?
No. The conversion runs entirely in your browser with client-side JavaScript, so the hex you paste never leaves your device. The optional JSON API is separate and only runs when you call it directly.
Learn more
- Hex, binary and the nibble: how base 16 lines up with base 2
Why one hex digit equals four binary bits, how nibbles keep long values readable, and when to pad binary output to fixed-width groups.
Related tools
Binary to Hex
Convert binary to hexadecimal online. Paste a binary number and get exact hex, with optional uppercase. Handles huge values. Runs in your browser.
Hex to Decimal
Convert hex to decimal online. Paste a hexadecimal value, with or without a 0x prefix, and get the exact base 10 number. Runs in your browser.
Air Fryer Converter
Convert any conventional oven recipe to air fryer settings. Lower the temperature by 25 F and cut the cook time by about 20 percent automatically.
Baker's Percentage Calculator
Turn a bread formula into grams with baker's percentages. Flour is 100 percent, enter water, salt and yeast percents to get weights and hydration.
Baking Pan Converter
Swap one baking pan for another and scale the batter to fit. Compares pan areas for round, square and rectangular pans and gives a batter scale factor.
Binary to Decimal
Convert binary to decimal online. Paste any binary number, with or without spaces, and get the exact base-10 value instantly. Runs in your browser.