MasterKit

Hex to Binary Converter

Convert hexadecimal to binary instantly, see the step-by-step working for every digit, and use the hex to binary table. Switch direction any time to convert binary back to hex.

Hex to binary table

Memorise these 16 rows and you can convert any hexadecimal number to binary by hand.

HexBinaryDecimal
000000
100011
200102
300113
401004
501015
601106
701117
810008
910019
A101010
B101111
C110012
D110113
E111014
F111115

About Hex to Binary Converter

What is the Hex to Binary Converter?

The Hex to Binary Converter turns any hexadecimal number into binary in a single step. Paste or type a hex value such as 1A3F or 0xFF and the binary result appears immediately, grouped in blocks of four or eight bits so it is easy to read. You also get the decimal value, the number of bits and a step-by-step breakdown that shows how every hex digit was converted. A built-in hex to binary table lets you check the 16 digits at any time, and the Swap button converts binary back to hex.

Hexadecimal, or base 16, is a compact way of writing binary numbers. Programmers, electronics students and network engineers use it for memory addresses, colour codes, MAC addresses, machine code and debugging. Because the two systems fit together perfectly, converting between them is quick once you know the method, and this tool lets you practise and check your answers.

How to convert hex to binary

  • Write down the hexadecimal number, for example 2F. Remove any 0x prefix.
  • Look up each hex digit in the hex to binary table: 2 is 0010 and F is 1111.
  • Replace every hex digit with its 4-bit binary group, keeping the same order.
  • Join the groups: 2F becomes 0010 1111, or 101111 if you remove the leading zeros.
  • Check the result by converting back to hex or to decimal: 2F is 47 in decimal.

Hex to binary table

Every hexadecimal digit equals exactly four binary digits, called a nibble. The digits 0 to 9 follow the normal numbers and A to F stand for 10 to 15.

  • 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

Hex to binary conversion examples

  • FF = 1111 1111 (255 in decimal, the largest value of one byte).
  • 1A3F = 0001 1010 0011 1111.
  • 7E = 0111 1110.
  • C0FFEE = 1100 0000 1111 1111 1110 1110.
  • DEADBEEF = 1101 1110 1010 1101 1011 1110 1110 1111.

Converting binary back to hex

To go the other way, split the binary number into groups of four bits starting from the right. If the leftmost group has fewer than four bits, add zeros on the left. Then replace each group with its hex digit. For example, 1111 1111 1 becomes 0001 1111 1111, which is 1FF. The converter does this padding automatically.

Tips and notes

Hex digits can be written in upper or lower case, and the tool also accepts spaces, underscores and the 0x prefix in your input. Leading zeros do not change a value, so you can use the Remove leading zeros option when you only need the shortest binary form. Keep them when you need a fixed width, such as 8 bits for one byte.

Very long hex values are supported, and the decimal value is calculated exactly using big integers. Everything is processed in your browser, so nothing you enter is uploaded or stored.

Frequently asked question

Why does one hex digit equal four binary digits? Because 16 is 2 to the power of 4. Four bits can represent exactly 16 different values, from 0000 to 1111, which matches the 16 hex digits from 0 to F. This is why hex to binary conversion needs no calculation, only a quick lookup in the table, and why programmers prefer hex to long strings of zeros and ones.

Looking for something else? Browse all free tools.