Skip to content

Hex to Binary Converter

Expand hexadecimal values into their exact bit patterns, four bits per digit, with optional grouping and padding.

Processed locally in your browser

Options
One number per line. Spaces and underscores inside a number are ignored.0 chars · 0 lines
The result will appear here.

What is Hex to Binary Converter?

Each hexadecimal digit maps to exactly four bits: F is 1111, A is 1010, 5 is 0101. Converting hex to binary is therefore a digit-by-digit lookup, and 0xA5 is 1010 0101. This tool does it for values of any length and keeps the leading zeros by default, so the width matches the number of hex digits.

Use it to inspect flags, masks and registers bit by bit. You can group the output by nibbles or bytes, add a 0b prefix, pad to a multiple of 8 to 64 bits, or drop leading zeros to get the shortest binary form. A leading 0x, spaces and underscores in the input are ignored.

How does it work?

  1. Paste one hexadecimal value per line, with or without 0x.
  2. Leave “Keep leading zeros” on for a fixed 4 bits per digit, or turn it off for the shortest binary.
  3. Choose grouping (4 or 8 bits), the 0b prefix and padding.
  4. Copy the bits; a single value also shows its decimal value and bit length.

Common use cases

  • Seeing which bits are set in a status register or permission mask such as 0x1F4.
  • Reading a colour or byte value in binary while working with bitwise operators.
  • Expanding a hex-encoded field from a network or file format specification.
  • Studying how hexadecimal and binary relate in computer-science courses.

Examples

Try this input in the tool above:

Input
0xA5
FF00
1f
Output
10100101
1111111100000000
00011111

Privacy

Hex to Binary Converter runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

Only the characters 0-9 and A-F (any case) are valid. The value is treated as a bit pattern, so it is not sign-interpreted: to read hex as a signed number use the Hex to Decimal tool.

Frequently asked questions

What is 0xFF in binary?

11111111: two hex digits F and F, each expanded to 1111.

Why does my result start with zeros?

Each hex digit becomes four bits, so 0x0F is 0000 1111. Turn off “Keep leading zeros” if you want 1111 only.

Can I convert a long hexadecimal string such as a hash?

Yes. A 64-digit SHA-256 hash expands to 256 bits instantly, and you can group them by bytes to read them more easily.

More tools in Developer Tools →