Convert hex to binary (base 16 → base 2)
Use this converter when you have hexadecimal integers (base 16) and want the binary representation (base 2).
This page is a focused Hex → Binary variant built for speed:
- Batch mode is enabled by default (one value per line)
- Controls are intentionally hidden to keep this variant fast and distraction-free
Need decimal/octal too, swapping, or output formatting? Open the full Number Base Converter.
How to use it
- Paste your hex values into the input (left).
- Use one number per line.
- Copy the binary results from the output (right).
Signed values are supported:
-1A→-11010+FF→11111111
Input rules (hex)
Allowed characters
Hex input may contain:
- digits
0–9 - letters
A–F(ora–f) - an optional leading
+or-
Examples:
0Aff1A2B-DEAD
Optional 0x prefix
You may paste values like:
0xFF-0x1A+0x10
Separators are ignored
Spaces and underscores are ignored, so these are valid:
FF_FF0xFF FFDEAD_BEEF
Output format (binary)
- Output uses only
0and1 - Negative values keep a leading
- - No
0bprefix by default - Output is not padded (minimal representation)
Examples:
A→101010→10000FF→111111111000→1000000000000-1A→-11010
Quick mental check (4-bit mapping)
Hex maps cleanly to binary because each hex digit equals 4 bits:
A(hex) →1010(binary)F(hex) →1111(binary)
So:
AD(hex) →1010 1101(binary) →10101101
You don’t need to do this manually — the converter does it — but it’s useful for sanity-checking.
Batch example (one per line)
Input (hex):
A
0x10
FF
dead_beef
-1A
G1
Output (binary):*
1010
10000
11111111
11011110101011011011111011101111
-11010
!ERROR: Hex input may contain only 0–9 and A–F
One invalid line won’t break the rest.
Common use cases
Bitmasks and flags
Hex is the standard compact way to store bit patterns. Converting to binary makes it obvious which bits are set.
Debugging and low-level work
Registers, addresses, and many debugging tools output hex. Binary helps you inspect the underlying bit structure.
Learning and teaching
Hex → binary is one of the cleanest demonstrations of base conversions thanks to the 4-bit mapping.
Troubleshooting
“Hex input may contain only 0–9 and A–F”
A line contains an invalid character (like G, Z, ., or commas).
Remove invalid characters, or switch to the full tool if your input is actually decimal/octal/binary.
“I need 8/16/32-bit output”
This converter outputs the minimal binary representation.
If you need fixed widths, pad with leading zeros to the left (or use your preferred bit-width rules in code).
“My hex is two’s complement”
This page treats -1A as a signed string with a leading minus sign.
If you have a fixed-width two’s complement value (like FF meaning −1 in 8-bit), you need the bit width to interpret negatives.
Notes
- This is number base conversion for integers, not text/byte encoding.
- Everything runs locally in your browser — nothing is upl