Binary to Hex
Convert binary numbers to hexadecimal in your browser. One number per line or space-separated; output in upper or lower case with optional 0x prefix.
Binary in, hex out
Each group of 4 binary digits (a nibble) maps to exactly one hex digit. So an 8-bit byte becomes 2 hex chars.
1010 11111111
a ff
What you'll use this for
Hex is the compact human-readable form of binary — four bits per character, with one-to-one nibble alignment.
Bit-pattern lookup
See which hex value corresponds to a bit pattern.
Color conversion
RGB bit components to hex color channels.
CS homework
Quickly verify base-conversion exercises and bit-twiddling answers.
Memory addresses
Translate raw bit patterns into hex addresses for low-level debugging.
How to convert binary to hex
Paste binary numbers
One per line, or separated by spaces or commas. 0b prefixes are stripped automatically.
Pick formatting
Choose lowercase or UPPERCASE, optional pad width, optional 0x prefix.
Click Convert
Or leave auto-convert on for live updates. Runs locally — no upload.
Copy or download
Copy to clipboard or save as .txt. Round-trip via the reverse tool to verify.
Frequently asked questions
Spaces, newlines, commas. 0b prefix is optional.
Optional — 2 / 4 / 8 chars.
Yes.
It's a toggle (default off). Turn it on under Show 0x prefix.
About binary-to-hex conversion
Binary (base 2) uses only the digits 0 and 1. Hexadecimal (base 16) packs four binary digits into one symbol from the alphabet 0-9a-f. The mapping is exact and lossless, which makes hex the natural compact stand-in for raw bit patterns.
Why hex
- Each hex digit represents exactly one nibble (4 bits) — easy to read and write.
- A byte fits in 2 hex characters, so memory dumps stay compact.
- Web colors (
#ffcc00), MAC / IP forms, and machine-code listings all use hex.
How this converter works
- Splits input on whitespace and commas, strips any
0bprefix. - Parses each token with
parseInt(t, 2)and emits the value viatoString(16). - Optional pad width, case, and
0xprefix shape the output.