Hex to Binary Converter

Convert hexadecimal to binary instantly, padded to whole bytes and grouped into nibbles, for any length of hex.

What It Does

This converter expands hexadecimal into binary, four bits for every hex digit. It accepts values with or without a 0x prefix and in either case, and can pad the result to whole bytes and group it into nibbles so you can see exactly which bits are set — the view you need when decoding flags, masks and register values.

When to Use It

  • You need to know which individual bits a hex mask such as 0x1F sets.
  • You are decoding a status register or a protocol flag byte shown in hex.
  • You are checking the bit layout of a colour, an IP address or a file header.
  • You want to teach or verify the nibble-to-bits mapping.

Worked Examples

0x1F

0001 1111 with byte padding: the low five bits set, a common mask.

A5

1010 0101 — an alternating test pattern used to check data lines.

ff 80 7f

Three bytes at once: all bits set, only the top bit, and all but the top bit.

Features

Converts as you type
Bulk conversion one number per line
Exact for numbers of any size
Digit grouping and 0x/0b/0o prefixes
Swap direction in one click
Explains bit width and two's complement

How to Use

1. Type or paste a hex number — or a list, one per line. 2. The binary value appears alongside, line for line. 3. Use the options to group digits or add a prefix, and the swap button to convert the other way.

Common Mistakes

  • Converting a number through a JavaScript Number. Above 9,007,199,254,740,991 it silently rounds, so the last digits come out wrong. This tool uses BigInt and stays exact at any size.
  • Forgetting that the same digits mean different values in different bases. 10 is ten in decimal, two in binary, eight in octal and sixteen in hex — always label which base a value is in.
  • Treating a minus sign as how a computer stores a negative number. Hardware uses two's complement, so a negative value's bit pattern looks nothing like its positive counterpart.

Frequently Asked Questions

Conversion runs in your browser with exact integer arithmetic. Nothing is uploaded.

Explore related topics

#Developer #Converter