Hex to Binary
Convert hexadecimal strings into a binary string — 100% in your browser.
Input
Output
What is Hex?
Hexadecimal, usually shortened to "hex", is a base-16 number system that uses the digits 0–9 and the letters A–F to represent the values 10–15. In computing, hex is the most common way to write raw bytes because every byte (0–255) fits into exactly two hex digits — for example, the byte 255 becomes FF and the byte 72 becomes 48. Hex strings are often prefixed with 0x (e.g. 0x4A6F) to make the base explicit.
Because each hex digit represents 4 bits, a pair of hex digits always represents exactly one byte. This makes hex a compact, unambiguous and human-readable way to inspect and exchange binary data — you can read it, copy it, paste it into a chat or a ticket, and another developer will receive the exact same bytes.
What is Binary?
Binary is the base-2 number system used by every digital computer. It uses only two digits, 0 and 1, and each digit is called a bit. A group of eight bits is a byte, which can represent any value from 0 to 255. Binary is the language that the machine itself understands — every instruction, every memory cell and every pixel is ultimately a sequence of bits.
While binary is the native representation inside the hardware, it is rarely used directly by humans because it is verbose: a single byte requires eight digits. Tools that convert between hex and binary let you move between the compact hex form that humans prefer to read and the explicit bit-by-bit form needed for low-level reasoning.
Hex vs Binary
Hex and binary both represent the same underlying bytes, but they use different bases and densities. Hex is base 16 — each hex digit encodes 4 bits, so one byte is two hex characters. Binary is base 2 — each binary digit encodes 1 bit, so one byte is eight binary characters. As a result, the binary form of the same data is four times longer than the hex form.
Hex is the better choice when you want to keep data compact and readable, for example when copying a cryptographic digest or sharing a memory address. Binary is the better choice when you need to reason about individual bits — for instance, when interpreting bit masks, flags fields, or hardware registers. Converting from hex to binary lets you expand a compact hex value into the explicit bit pattern so you can see exactly which bits are set.
When to convert Hex to Binary
Converting hex to binary is useful in several practical scenarios:
- Bitmask analysis. Inspect which bits are set in a flag field, permission mask or status register.
- Hardware work. Decode register values documented in datasheets as bit fields.
- Network protocols. Many protocol headers pack flags into bytes that are easier to read in binary.
- Cryptography. Understand the bit structure of keys, nonces or S-box outputs.
- Education. Teach and learn how base-16 and base-2 representations relate.
Whenever you have a hex value and need the explicit bit pattern, this converter expands it instantly.
How to convert Hex to Binary
Converting hex to binary with this tool takes a second and happens entirely in your browser. No upload, no sign-up, no installation. Follow these steps:
- Paste your hex string. Spaces, newlines and a leading
0xare accepted and stripped automatically. - Click "Convert". Each pair of hex digits is expanded to an 8-bit binary group, separated by a space for readability.
- Copy the result. Click "Copy" to copy the binary string to your clipboard, then paste it where you need it.
Because every step runs locally with JavaScript, your data never leaves your browser. This makes the tool safe for keys, tokens and other confidential bytes.
Is this Hex to Binary converter free?
Yes, completely free with no sign-up, no watermarks and no limits beyond your device's memory.
Does it accept spaces and a 0x prefix?
Yes. Whitespace, newlines and a leading 0x are stripped automatically before decoding.
What if the hex string has an odd length?
An even number of hex digits is required (two digits per byte). The tool shows an error if the length is odd or the input contains non-hex characters.
Is my input uploaded?
No. All processing is local. Your hex string never leaves your browser.