HCODX/Hex to Binary
100% browser-based · Batch conversion · Nibble grouping

Hex to Binary

Convert hex numbers to binary in your browser. Output one binary value per line, padded to 4-bit nibbles, with optional spacing between bytes.

Hex numbers
Binary values
Convert options
Reverse (Binary → Hex)
Input size
0 B
Output size
0 B
Numbers
0
Status
Ready
Example

Hex in, binary out

Each hex digit unpacks to four binary digits. Optional padding aligns each value to nibble or byte boundaries.

Hex
a
ff
2a
Binary
1010
11111111
101010
Use cases

What you'll use this for

Binary is the natural form when bit-level structure matters — flags, masks, hardware registers, and packed fields.

Bit twiddling

See exactly which bits are set when working with flags and bitmasks.

Hardware register debug

Map register hex values to bit patterns.

CS homework

Quickly verify base-conversion exercises and bit-twiddling answers.

Color analysis

Inspect the bit pattern of an RGB or RGBA hex color.

Step by step

How to convert hex to binary

1

Paste hex numbers

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

2

Pick padding & grouping

Pad to 4 / 8 / 16 / 32 bits, and optionally insert spaces every nibble or byte for readability.

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

No. FF and ff both work.

Yes — perfect for byte-by-byte bit analysis.

Yes.

Whitespace, newlines, or commas. 0x prefixes are stripped.

About

About hex-to-binary conversion

Hexadecimal (base 16) uses 16 symbols — 0-9a-f — to represent four binary digits at a time. Because four bits map to exactly one hex digit, the conversion is loss-free and nibble-aligned: every hex digit unpacks to the same four binary digits, every time.

Why nibble-aligned

  • Hardware registers, memory addresses, and color values are naturally byte-aligned.
  • Padding to 8 / 16 / 32 bits makes byte and word boundaries visually obvious.
  • Grouping bits in chunks of 4 or 8 aids quick visual scanning.

How this converter works

  • Splits input on whitespace and commas, strips any 0x prefix and stray characters.
  • Parses with parseInt(t, 16) and emits the value via toString(2).
  • Pad width, bit grouping, and 0b prefix shape the output.
Related

Related tools