fast&private

Convert Hexadecimal to Binary

Convert a hexadecimal value to binary.

Your data is never sent to any server.

The hexadecimal to binary converter expands a base 16 value into its sequence of ones and zeros. Each hexadecimal digit becomes four bits, directly and with no intermediate arithmetic.

One digit, four bits

The conversion is a digit-by-digit substitution. Taking AD:

HexAD
Value1013
Bits10101101

The result is 10101101. Length does not matter: the method is the same for two digits as for twenty.

The substitution table

HexBitsHexBits
0000081000
1000191001
20010A1010
30011B1011
40100C1100
50101D1101
60110E1110
70111F1111

Need the other direction? Go to binary to hex.

How to use Hex to Binary

  1. 1

    Type the hexadecimal value

    Enter the base 16 number with digits 0 to 9 and letters A to F, in upper or lower case.

  2. 2

    Read the binary sequence

    The result in ones and zeros appears highlighted instantly, expanding each hexadecimal digit into four bits.

  3. 3

    Copy the result

    Press the copy button on the binary row to take the whole sequence with you.

  4. 4

    Check decimal and octal

    Below you get the same number in the other bases, useful for verifying the value.

Frequently asked questions

How do you convert hexadecimal to binary by hand?

Replace each digit with its four bits, leaving the others alone. A is 1010, D is 1101, so AD becomes 10101101. No divisions or sums required.

Why is each digit exactly four bits?

Because base 16 is 2 to the power of 4: four bits cover the sixteen possible values of a hexadecimal digit, from 0 to F.

Does the result keep leading zeros?

The minimal representation is shown, with no zeros in front. If you need a fixed width of 8 or 16 bits, add them yourself: they do not change the value.

Do I have to strip the 0x prefix?

No need: the tool recognises it and ignores it, because it is a programming language marker and not part of the number. The hash used for colors (#) does have to go.

How many bits does a hexadecimal value take?

Four per digit. Two digits are a byte (8 bits), four digits are 16 bits and eight digits are 32 bits, the size of an RGBA color or a classic memory address.