Hex to Binary

Convert hexadecimal numbers into binary. Enter one or more hex numbers separated by spaces and read the binary values.

0 characters

0 characters

About Hex to Binary

This tool provides a direct, client-side conversion from the hexadecimal[9] number system to the binary number[3] system. Hexadecimal, or base-16, is a positional notation[15] system with a radix[16] of 16. It is fundamental in computing for its role as a human-friendly representation of binary-coded values. This conversion is a core operation in low-level software development, digital logic design, computer architecture, and network analysis, where raw binary data must be inspected or manipulated in a more compact form.

The principal advantage of hexadecimal is its direct and simple relationship with binary. Since 16 is a power of 2 (16 = 2^4), each hexadecimal digit corresponds exactly to a sequence of four binary digits, also known as a nibble[14]. This one-to-four mapping allows for a straightforward substitution cipher-like conversion that is far more efficient than converting between, for example, decimal and binary. This efficiency is why hexadecimal is ubiquitously used to represent memory addresses, Unicode[17] character encodings, web colors[18], MAC addresses[13], and raw data in a hex dump[8].

The binary system, with a radix of 2, is the native language of all digital electronics. It uses only two symbols, 0 and 1, to represent a logical bit[4], corresponding to the off and on states of a transistor. The mathematical underpinnings of this system were formalized by George Boole[7] in the 19th century through what is now known as Boolean algebra[5]. In modern computing, bits are grouped into larger structures, most commonly the 8-bit byte[6] (or octet), which is the smallest addressable unit of memory in many computer architectures.

The conversion process from hex to binary is a direct mapping operation. Each of the 16 hexadecimal symbols (0-9, A-F) has a fixed 4-bit binary equivalent (e.g., '7' is '0111', 'B' is '1011'). To convert a hexadecimal string, each digit is replaced by its 4-bit counterpart, and the results are concatenated. For example, the hex value 'A9' is converted by mapping 'A' to '1010' and '9' to '1001', yielding the binary string '10101001'. This method avoids complex arithmetic and is the reason hexadecimal notation was widely adopted in early computing, notably with machines like the IBM System/360[10].

Formal standards govern the representation of these number systems. ISO/IEC 80000-2[12] provides definitions for quantities and units, including number systems. For data interchange, IETF's RFC 4648[20] defines the "Base16" encoding scheme, which is identical to hexadecimal representation using uppercase letters. The prevalence of hexadecimal is also seen in character encoding standards like ASCII[1] and Unicode, where code points are conventionally written in hex (e.g., U+20AC for the Euro sign), linking the abstract character to its underlying binary pattern.

How to Use

  1. Enter or paste a valid hexadecimal string into the input field. The input is not case-sensitive (e.g., 'FF' is the same as 'ff').
  2. The tool instantly processes the input, performing a direct substitution for each hexadecimal digit.
  3. Each hex digit is converted into its corresponding 4-bit binary group, also known as a nibble.
  4. The resulting binary groups are concatenated in order to form the final binary string.
  5. Leading zeros are preserved for each 4-bit group to maintain the correct positional value and bit length.
  6. Use the copy button to transfer the complete binary string to your clipboard for further use.

Frequently Asked Questions

Why is hexadecimal used in computing instead of just binary?

Hexadecimal serves as a compact, human-readable representation of binary data. Since one hex digit represents four binary digits, a long binary string can be shortened by a factor of four, making it easier to read, write, and debug without losing precision.

What is the significance of a nibble in this conversion?

A nibble[14] is a four-bit unit of data. Its significance is that it is the exact number of bits represented by a single hexadecimal digit. The hex-to-binary conversion is fundamentally a process of converting a sequence of hex digits into a sequence of nibbles.

Does the case of hexadecimal letters (a-f versus A-F) matter?

For numerical value, no. 'A' and 'a' both represent the decimal value 10 (binary 1010). While some strict standards like RFC 4648[20] specify uppercase letters for Base16 encoding, most parsers and converters, including this one, are case-insensitive.

Why are leading zeros important in the binary output?

Each hexadecimal digit must map to a full 4-bit binary group to maintain correct positional value. For example, hex '1F' is '00011111'. If you omit the leading zeros for '1' and write '11111', this would be misinterpreted as hex '1F' instead of '3F'. The zeros are significant placeholders.

How is hexadecimal-to-binary conversion used in practice?

It is used extensively in debugging memory dumps, analyzing network packets with tools like Wireshark[19], programming embedded systems, defining colors in CSS (Hex triplet[18]), and working with machine code or assembly language.

What is the difference between Base16 (Hex) and Base64 encoding?

Hexadecimal is Base16, using 16 symbols to represent data. Base64[2] uses 64 symbols. Base64 is more space-efficient for encoding binary data into text, packing 3 bytes of data into 4 characters, whereas Base16 uses 2 characters to represent 1 byte.

How do you manually convert a hexadecimal number to binary?

You substitute each hexadecimal digit with its 4-bit binary equivalent. You can use a lookup table or memorize the patterns: 0=0000, 1=0001, ..., 9=1001, A=1010, B=1011, C=1100, D=1101, E=1110, F=1111. Then, you concatenate the binary groups in the same order.

Is there an official standard for hexadecimal notation?

Multiple standards apply in different contexts. ISO/IEC 80000-2[12] defines number systems. Programming languages define their own syntax (e.g., '0x' prefix). For data transmission, RFC 4648[20] specifies Base16 encoding.

Sources (20)
  1. Wikipedia: ASCII
  2. Wikipedia: Base64
  3. Wikipedia: Binary number
  4. Wikipedia: Bit
  5. Wikipedia: Boolean algebra
  6. Wikipedia: Byte
  7. Wikipedia: George Boole
  8. Wikipedia: Hex dump
  9. Wikipedia: Hexadecimal
  10. Wikipedia: IBM System/360
  11. Wikipedia: IPv6
  12. Wikipedia: ISO/IEC 80000-2
  13. Wikipedia: MAC address
  14. Wikipedia: Nibble
  15. Wikipedia: Positional notation
  16. Wikipedia: Radix
  17. Wikipedia: Unicode
  18. Wikipedia: Web colors (Hex triplet)
  19. Wikipedia: Wireshark
  20. IETF RFC 4648: The Base16, Base32, and Base64 Data Encodings

About Matt George

I'm Matt George, a software engineer in the startup space. I run my own shop building software for early-stage founders, and I love making free tools and experiences that people actually use. Enjoy using Hex to Binary!

More Free Tools