Hex to Binary Converter Online

Convert any hexadecimal value to binary with nibble-by-nibble expansion. Accepts 0x and # prefixes, batch mode for bulk work, and shows all four bases — 100% in your browser.

Enter a hex value to see its binary nibble expansion and all four base representations.

What is hex to binary conversion?

Hex to binary conversion rewrites a base-16 number using only the digits 0 and 1. Because 16 = 24, every hex digit corresponds to exactly four binary bits. That one-to-one nibble mapping makes the conversion trivial — no division, no remainders, just substitution.

The OpenFormatter hex-to-binary converter runs in your browser — no upload, no rate limit, no account. It substitutes each hex digit for its 4-bit pattern, preserves leading zeros so byte boundaries stay visible, and shows the equivalent decimal and octal alongside.

How to convert hex to binary — 4 steps

  1. Enter a hex value. Up to 14 hex digits for the all-four-bases panel. The 0x and # prefixes are stripped automatically.
  2. Read the binary output. Each hex digit is replaced by its 4-bit nibble; leading zeros are preserved so byte boundaries line up.
  3. Study the nibble breakdown. The expansion panel shows the digit-by-digit substitution — invaluable for memorising the 16 nibble patterns.
  4. Switch to batch mode. Convert many hex strings at once and copy the table to a spreadsheet.

Sample input and output

Input:  FF

Output:
  Hex:     0xFF
  Binary:  11111111
  Decimal: 255
  Octal:   0o377

Nibble expansion: 0xFF = F (1111) + F (1111) = 11111111₂

FF is the largest 8-bit unsigned value — every bit set. Its binary form (11111111) appears anywhere a byte represents a maximum, mask, or all-flags-on state.

Single + Batch Modes

Decode one hex value with full nibble expansion, or paste hundreds of values (one per line) for a copyable conversion table.

Educational Nibbles

Each hex digit shown alongside its 4-bit pattern — the fastest way to internalize the 16-entry nibble lookup table.

Client-Side Only

All math runs in the browser — no upload, no telemetry. Verify in DevTools Network and use safely with internal data.

Common use cases

  • check_circleReading register dumps and memory layouts in firmware and embedded systems
  • check_circleDecoding bitmask flags from datasheets — translating 0x80 into 10000000 to spot bit 7
  • check_circleCSS color analysis — splitting #FF8800 into 24-bit RGB binary for image and shader work
  • check_circleNetwork protocol study — converting MAC, IPv6, and TCP fields into bit patterns
  • check_circleReverse engineering — translating disassembled hex constants into bit-level reasoning
  • check_circleComputer architecture coursework — understanding why 16 = 2^4 makes hex the natural binary shorthand
  • check_circleDigital electronics labs — wiring 7-segment displays, GPIO patterns, and lookup tables
  • check_circleCryptography study — visualizing key bits, S-box outputs, and bitwise round operations

Hex / binary nibble lookup table

HexBinaryDecimalHexBinaryDecimal
000000810008
100011910019
200102A101010
300113B101111
401004C110012
501015D110113
601106E111014
701117F111115

Memorise this 16-entry table and you can convert any hex string to binary by inspection — no calculator, no parseInt.

The conversion math, explained

Internally, the tool uses parseInt(hex, 16).toString(2).padStart(hex.length * 4, '0'). The padStart preserves leading zeros so a single-byte value like 0F renders as 00001111 rather than 1111. Equivalently, you can do this by hand: replace each hex digit with its 4-bit pattern and concatenate. CAFE → C=1100, A=1010, F=1111, E=1110 → 1100101011111110. The nibble lookup above gives all 16 patterns; once you know them, hex-to-binary becomes a one-second mental operation.

Need the reverse direction?

Browse the rest of the OpenFormatter base toolkit — every conversion runs in your browser.

Frequently Asked Questions

How does hex to binary conversion work?

Each hex digit maps directly to a 4-bit binary nibble. 0 = 0000, 1 = 0001, 2 = 0010, … 9 = 1001, A = 1010, B = 1011, C = 1100, D = 1101, E = 1110, F = 1111. To convert any hex string, replace every digit with its 4-bit pattern and concatenate. So FF becomes 1111 1111 = 11111111, and CAFE becomes 1100 1010 1111 1110 = 1100101011111110.

Why is each hex digit exactly 4 bits?

Because 16 = 2^4. Hexadecimal is base-16, so a single hex digit can represent 16 distinct values — exactly what 4 binary bits encode. That perfect alignment is why hex is the canonical shorthand for binary in computing: one byte is always two hex digits, four bytes is always eight hex digits, no padding tricks required.

Does the input accept 0x or # prefixes?

Yes. The converter strips a leading 0x (programmer convention) or # (CSS color convention) before parsing. So 0xFF, #FF, and FF all produce the binary 11111111. Anything other than the prefix and 0-9/A-F triggers a clear error.

Why does the output preserve leading zeros?

Each hex digit is expanded to a fixed 4-bit nibble, including leading zeros. So 0F becomes 00001111 (8 bits) instead of 1111 (4 bits). This preserves the original byte width, which matters when you are reading register dumps, protocol fields, or fixed-width memory layouts.

What is the largest hex I can convert?

Up to 14 hex digits (capped at Number.MAX_SAFE_INTEGER, 2^53 − 1) for the all-four-bases panel. The nibble-by-nibble binary expansion itself works for any length, since it operates one digit at a time. For arbitrary-length hex, BigInt is recommended: BigInt("0x" + hex).toString(2).

How do I read 32-bit register values?

A 32-bit register is exactly 8 hex digits (32 / 4 = 8). Paste the hex value (e.g. DEADBEEF) and the tool returns 11011110 10101101 10111110 11101111 — a 32-bit pattern grouped naturally into 4 bytes. Mentally split the binary into 4-bit groups and you can read each hex digit back without any math.

How is hex case handled?

Hex input is case-insensitive — 0xFF and 0xff produce the same binary. The displayed hex echoes uppercase by default to match the dominant convention in C, Java, hardware specs, and protocol documentation. Lowercase appears more often in CSS color codes and Unix tools, but they are mathematically identical.

Is the data sent to a server?

No. All conversion happens in JavaScript inside your browser. Open DevTools → Network and confirm zero requests when you click Convert. Safe for internal IDs, secret tokens, hashes, or proprietary numeric data.

Hex to Binary Converter Online — Free Base-16 to Base-2 Tool