Hex to Binary Converter

Every hex digit is exactly 4 bits — expand and read. 8-bit or nibble view, decimal values included, and forgiving input that cleans up after messy pastes.

Result
Waiting for input — conversion happens instantly in your browser.

How Hex to Binary Works

Hex is binary in shorthand: one hex digit abbreviates exactly four bits, because 16 is 2^4. Converting back is pure expansion — no arithmetic.

Take 4F: the digit 4 is 0×8 + 1×4 + 0×2 + 0×1, so 0100; F is 15 = 8+4+2+1, so 1111. Together: 0100 1111 — one byte. That is the whole algorithm, and it works at any length because the mapping never crosses digit boundaries. This is exactly the reverse of our binary to hex converter, which compresses nibbles into digits; the pair covers both directions of the same idea, and binary vs hexadecimal explains why the two notations are glued together.

Everything else about this page is forgiveness: spaced pairs, continuous strings, 0x prefixes and lowercase letters all convert, the cleaning report counts what was removed, and a decimal readout sits under the result — per byte and as one overall value — so you never have to open a second tool.

Reverse Speed-Reading: The 4-Bit Anchors

You do not need all 16 rows memorized. Three anchors plus the 8-4-2-1 weights rebuild any digit in your head.

Anchors: 8 = 1000 (only the 8-bit on), A = 1010 (8 + 2), F = 1111 (everything on). From there, neighbors are one bit away: 9 is A minus 1 (1001), E is F minus 1 (1110), C is 8 + 4 (1100). The full table — generated by the same engine that powers the converter above:

HexDecimalBinary (4 bits)
000000
110001
220010
330011
440100
550101
660110
770111
881000
991001
A101010
B111011
C121100
D131101
E141110
F151111

When You Actually Need the Bits Back

Hex is for compact writing; bits are where the meaning lives. Three everyday scenes:

  • Bitmask analysis. The mask 0xF0 expands to 11110000 — instantly visible: it keeps the high nibble and zeroes the low four bits. 0x01 is 00000001, the lowest bit. Reading masks in hex hides exactly the information you are looking for.
  • Permission and flag registers. Unix permissions do the same trick in octal: 755 expands three bits per digit to 111 101 101, which is rwx r-x r-x. Hardware register documentation likewise lists bitfields — "bits 7:4 = mode" — and expanding the hex value shows which mode bits are set.
  • Debugging bytes. A protocol dump says 0x3C; the bits 0011 1100 tell you which flags are on. Our binary to decimal converter takes over when you also need the numeric value with signed options.

One honest limit: this converter is byte-oriented, so it expects complete pairs of hex digits. A lone F fails with a precise message instead of a guess — pad it to 0F if you meant the single-digit value. And leading zeros inside a nibble are data, not decoration: 0F (15) and F0 (240) are very different bytes.

Common Mistakes

  • Mistake: dropping leading zeros inside a nibble. Writing A as 101 instead of 1010 shifts every following bit. Correction: every hex digit is exactly 4 bits, zeros included — 1A is 0001 1010.
  • Mistake: an odd digit count. 486 is a truncated copy, one digit short of a byte. Correction: hex bytes come in pairs — re-copy the source, or pad a leading 0 if the value was truly single-digit.
  • Mistake: reading the binary output as one number when you needed bytes. Correction: check the grouping. The 8-bit view is one group per byte; the decimal line below the result shows both per-byte values and the overall number so you can tell them apart.

Practice

1. Convert 3C to binary. 3 = 0011, C = 12 = 1100 — answer: 0011 1100.

2. Convert 1010 1111 back to hex. 1010 = A, 1111 = F — answer: AF. Check it in the Binary → Hex direction above.

3. Which mask zeroes the low nibble of a byte? The high nibble stays, the low four bits are 0: 11110000 = 0xF0.

Hex to Binary FAQ

How do I convert hex to binary?

Expand each hex digit into exactly 4 bits using the 8-4-2-1 weights: F is 15 = 8+4+2+1, so F is 1111 and FF becomes 1111 1111. The converter above does it instantly and accepts spaces, continuous strings and 0x prefixes.

Why does one hex digit equal exactly 4 bits?

Because 16 is 2^4. A hex digit holds a value from 0 to 15, and 4 bits hold exactly 0000 to 1111 — the same sixteen values. That clean fit is the entire reason programmers write binary as hex in the first place.

What is FF in binary?

FF is 11111111 — decimal 255, the largest value one byte can hold. Each F expands to 1111, and the two nibbles side by side fill all eight bit positions.

Do I need the 0x prefix when converting hex?

No. 0x is just a C-style marker saying “the following digits are hex” — it carries no value. This converter strips 0x prefixes automatically and counts the cleanup in its report.

Is lowercase hex different from uppercase?

Not at all. 4f and 4F are the same byte — letter case in hex is pure convention. Style guides usually prefer uppercase for readability, but the value never changes.

Can binary be converted back to hex?

Yes — group the bits into 4s starting from the right, then read each group as one hex digit: 1010 1111 becomes AF. Switch to the Binary → Hex direction above; the tool pads the leftmost group for you.