Hex to Binary Converter

Convert hex to binary (base 16 → base 2)

Use this converter when you have hexadecimal integers (base 16) and want the binary representation (base 2).

This page is a focused Hex → Binary variant built for speed:

  • Batch mode is enabled by default (one value per line)
  • Controls are intentionally hidden to keep this variant fast and distraction-free

Need decimal/octal too, swapping, or output formatting? Open the full Number Base Converter.


How to use it

  1. Paste your hex values into the input (left).
  2. Use one number per line.
  3. Copy the binary results from the output (right).

Signed values are supported:

  • -1A-11010
  • +FF11111111

Input rules (hex)

Allowed characters

Hex input may contain:

  • digits 0–9
  • letters A–F (or a–f)
  • an optional leading + or -

Examples:

  • 0
  • A
  • ff
  • 1A2B
  • -DEAD

Optional 0x prefix

You may paste values like:

  • 0xFF
  • -0x1A
  • +0x10

Separators are ignored

Spaces and underscores are ignored, so these are valid:

  • FF_FF
  • 0xFF FF
  • DEAD_BEEF

Output format (binary)

  • Output uses only 0 and 1
  • Negative values keep a leading -
  • No 0b prefix by default
  • Output is not padded (minimal representation)

Examples:

  • A1010
  • 1010000
  • FF11111111
  • 10001000000000000
  • -1A-11010

Quick mental check (4-bit mapping)

Hex maps cleanly to binary because each hex digit equals 4 bits:

  • A (hex) → 1010 (binary)
  • F (hex) → 1111 (binary)

So:

  • AD (hex) → 1010 1101 (binary) → 10101101

You don’t need to do this manually — the converter does it — but it’s useful for sanity-checking.


Batch example (one per line)

Input (hex):

A
0x10
FF
dead_beef
-1A
G1

Output (binary):*

1010
10000
11111111
11011110101011011011111011101111
-11010
!ERROR: Hex input may contain only 0–9 and A–F

One invalid line won’t break the rest.


Common use cases

Bitmasks and flags

Hex is the standard compact way to store bit patterns. Converting to binary makes it obvious which bits are set.

Debugging and low-level work

Registers, addresses, and many debugging tools output hex. Binary helps you inspect the underlying bit structure.

Learning and teaching

Hex → binary is one of the cleanest demonstrations of base conversions thanks to the 4-bit mapping.


Troubleshooting

“Hex input may contain only 0–9 and A–F”

A line contains an invalid character (like G, Z, ., or commas).

Remove invalid characters, or switch to the full tool if your input is actually decimal/octal/binary.

“I need 8/16/32-bit output”

This converter outputs the minimal binary representation.

If you need fixed widths, pad with leading zeros to the left (or use your preferred bit-width rules in code).

“My hex is two’s complement”

This page treats -1A as a signed string with a leading minus sign.

If you have a fixed-width two’s complement value (like FF meaning −1 in 8-bit), you need the bit width to interpret negatives.


Notes

  • This is number base conversion for integers, not text/byte encoding.
  • Everything runs locally in your browser — nothing is upl

Frequently Asked Questions

Yes. Use a leading minus sign (−) or plus sign (+). The sign is preserved in the binary output.

Yes. This variant runs in batch mode by default: paste one hex integer per line and get one binary result per line.

Yes. Inputs like 0xFF, -0x1A, and +0x10 are accepted in this variant.

Yes. Spaces and underscores are ignored, so values like FF_FF or 0xFF FF work.

No. This converter outputs the minimal binary representation. If you need a fixed width, pad with leading zeros.

Try one of our format-specific converters below

Explore Our Tools

Read More From Our Blog