HCODX/Binary to Hex
100% browser-based · Batch conversion · Uppercase / lowercase

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 numbers
Hex values
Convert options
Reverse (Hex → Binary)
Input size
0 B
Output size
0 B
Numbers
0
Status
Ready
Example

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.

Binary
1010
11111111
Hex
a
ff
Use cases

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.

Step by step

How to convert binary to hex

1

Paste binary numbers

One per line, or separated by spaces or commas. 0b prefixes are stripped automatically.

2

Pick formatting

Choose lowercase or UPPERCASE, optional pad width, optional 0x prefix.

3

Click Convert

Or leave auto-convert on for live updates. Runs locally — no upload.

4

Copy or download

Copy to clipboard or save as .txt. Round-trip via the reverse tool to verify.

FAQ

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

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 0b prefix.
  • Parses each token with parseInt(t, 2) and emits the value via toString(16).
  • Optional pad width, case, and 0x prefix shape the output.
Related

Related tools