Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Binary (4 bits per hex digit)
0001101000111111
Hex 1A3F
Trimmed binary 1101000111111
Hexadecimal 1A3F
Decimal 6,719

What is a Hex to Binary Converter?

A hex to binary converter turns a hexadecimal (base-16) number into its binary (base-2) representation. Because 16 is a power of 2 (\(16 = 2^4\)), the conversion is wonderfully simple: every single hexadecimal digit maps to exactly four binary bits, called a nibble. This makes hexadecimal a compact, human-friendly shorthand for binary, which is why it is used everywhere in computing — memory addresses, color codes, machine code, and data dumps.

How to use it

Type a hexadecimal value into the box (for example 1A3F). You may include an optional 0x prefix and use upper- or lowercase letters. Press calculate to see the binary string. The result shows the padded binary (4 bits per hex digit), a trimmed version with leading zeros removed, and the decimal equivalent for reference.

The formula explained

Each hex digit has a value from 0 to 15, which fits in exactly 4 bits. Convert each digit to its 4-bit pattern, then write those groups left to right:

$$\text{Binary}_2 = \left(\;\Vert_{i}\; \text{nibble}_4\!\left(d_i\right)\right), \quad d_i \in \text{Hexadecimal value}$$

  • 0 → 0000, 1 → 0001, 2 → 0010, 3 → 0011
  • 4 → 0100, 5 → 0101, 6 → 0110, 7 → 0111
  • 8 → 1000, 9 → 1001, A → 1010, B → 1011
  • C → 1100, D → 1101, E → 1110, F → 1111
One hex digit A converting into the 4-bit binary group 1010
Each hexadecimal digit maps to exactly 4 binary bits.

Worked example

Convert 1A3F: \(1 \to 0001\), \(A \to 1010\), \(3 \to 0011\), \(F \to 1111\). Concatenate to get 0001 1010 0011 1111, or 0001101000111111. In decimal that is 6719.

Hex number 2F7 split into three 4-bit groups 0010 1111 0111 then joined
Convert each digit to 4 bits, then concatenate the groups left to right.

FAQ

Does case matter? No — both 1a3f and 1A3F give the same result.

Why is each group 4 bits? Because \(16 = 2^4\), one hex digit always encodes exactly four binary digits, with no remainder.

What about the 0x prefix? The optional 0x prefix is recognized and stripped automatically before conversion.

Last updated: