Hex to Binary Converter

Convert hexadecimal digits to 4-bit grouped binary nibbles and translate binary strings back to hex locally in your browser.

Examples:
Converting Hexadecimal (Base 16) to Binary (Base 2).
4-Bit Nibble Breakdown
Every hex digit maps directly to 4 binary bits — computed locally in your browser.

Focused Hex Converters

Switch to a dedicated two-way tool for step-by-step math, nibble mapping, or byte-by-byte text decoding.

Why Hex to Binary Conversion Is Direct

Hexadecimal exists in computing largely because it is a compact shorthand for binary. Since 16 = 2⁴, every single hex digit maps cleanly to a fixed group of 4 binary bits (called a nibble). Unlike decimal-to-binary conversion, you never need to divide or carry across digits—each character translates independently.

How to Use This Hex to Binary Converter

  1. Paste a hex string (with or without 0x, spaces, or colons) into the input box.
  2. View grouped 4-bit nibbles in the output box and inspect each character's exact 4-bit pattern in the 4-Bit Nibble Breakdown strip.
  3. Toggle 4-bit spacing on or off depending on whether you need human-readable groups (0101 1010) or a continuous bit string (01011010).
  4. Click Swap Direction to convert binary back to hexadecimal—the tool left-pads incomplete nibbles with leading zeros automatically.

Verified Hex to Binary Examples

Hexadecimal 4-Bit Grouped Binary Continuous Binary Total Padded Bits
5A 0101 1010 01011010 8 bits
FF 1111 1111 11111111 8 bits
A0F1 1010 0000 1111 0001 1010000011110001 16 bits
CAFE 1100 1010 1111 1110 1100101011111110 16 bits

Complete 4-Bit Nibble Lookup Chart

Memorizing or referencing these 16 four-bit patterns lets you translate any length of hex or binary instantly:

Hex Digit Binary Nibble Hex Digit Binary Nibble
0 0000 8 1000
1 0001 9 1001
2 0010 A 1010
3 0011 B 1011
4 0100 C 1100
5 0101 D 1101
6 0110 E 1110
7 0111 F 1111

Converting Binary Back to Hex

When converting binary to hex manually, group the binary digits into chunks of 4 starting from the rightmost bit (least significant bit). If the leftmost group has fewer than 4 bits, pad it on the left with zeros. Then replace each 4-bit group with its matching hex symbol from the chart above.

For example, 110101 pads to 0011 0101, which maps directly to 35₁₆.

Where Developers Use Hex to Binary

  • Bitmask and flag debugging: Checking which hardware register bits or feature flags are set in values like 0x0F (0000 1111) or 0x80 (1000 0000).
  • Subnetting and IPv6 inspection: Verifying prefix boundaries and network masks quickly.
  • Computer architecture coursework: Working with ALU instructions, opcodes, and IEEE 754 bit layouts.

To see Decimal, Octal, and ASCII alongside Binary, return to the Hex Converter homepage, or convert Base-16 to Base-10 with steps on our Hex to Decimal Converter.

Frequently Asked Questions

How many binary bits are in one hex digit?

Each hexadecimal digit represents 4 binary bits (one nibble), because 2^4 = 16. Two hex digits represent 8 bits, or one full byte.

Why does the binary output include leading zeros?

Leading zeros preserve exact 4-bit nibble alignment (for example, 0x5A is 0101 1010 rather than 1011010), which is essential when inspecting bytes, registers, and bitmasks.

Can I copy the binary output without spaces?

Yes. Uncheck the 4-bit groups option in the toolbar to produce a continuous binary string with no spaces.

What happens if my binary input length is not a multiple of 4?

When converting binary to hex, the tool pads the leftmost group with leading zeros to reach a multiple of 4 bits before mapping each nibble to 0–F.