Convert binary to hex (base 2 → base 16)
Use this converter when you have binary integers (base 2) and need the hexadecimal representation (base 16).
This page is a focused Binary → Hex variant built for speed:
- Batch mode is enabled by default (one value per line)
- HEX output is UPPERCASE by default (
A–F) - Controls are intentionally hidden to keep this variant fast and consistent
Need decimal/octal too, swapping, or formatting options? Open the full Number Base Converter.
How to use it
- Paste your binary values into the input (left).
- Use one number per line.
- Copy the hex results from the output (right).
Signed values are supported:
-1001→-9+11111111→FF
Input rules (binary)
Allowed characters
Binary input may contain only:
0and1- an optional leading
+or-
Examples:
0101010-101010
Optional 0b prefix
You may paste values like:
0b11110000-0b1011
Separators are ignored
Spaces and underscores are ignored, so these are valid:
1111_00000b1111 0000
Output format (hex)
- Output uses digits
0–9and lettersA–F - Negative values keep a leading
- - No
0xprefix by default
Examples:
1010→A1111→F11111111→FF10000000000→400-1001→-9
Quick mental check (why hex maps nicely)
Hex is popular because it groups binary digits in chunks of 4:
1010 1101(binary) →A D(hex) →AD
You don’t need to do this manually — the converter does it — but it explains why binary ↔ hex conversions are everywhere in engineering.
Batch example (one per line)
Input (binary):
1010
1111
10101101
-1001
0b1111 0000
2
Output (hex):
A
F
AD
-9
F0
!ERROR: Binary input may contain only 0 and 1
One invalid line won’t break the rest.
Common use cases
Debugging and low-level tools
Memory addresses, bitmasks, and many debugging tools prefer hex because it’s compact and maps cleanly to binary.
Bitmasks and flags
Each hex digit represents 4 bits, so you can quickly see patterns in binary values without reading long strings.
Learning and teaching
Binary → hex conversion is a practical way to understand place values and grouping.
Troubleshooting
“Binary input may contain only 0 and 1”
A line includes an invalid character (like 2, 8, A, ., or commas).
Remove invalid characters, or switch bases in the full tool if your input isn’t actually binary.
“My input is two’s complement”
This page treats negatives as a signed string with a leading minus sign.
If you have fixed-width two’s complement (like an 8-bit byte), you’ll need the bit width to interpret negatives correctly.
Notes
- This is number base conversion for integers, not text/byte encoding.
- Everything runs locally in your browser — nothing is uploaded.