0x

HEX to Binary

βœ“ Free & no signup πŸ”’ Runs 100% in your browser Updated 2026-11-25 Binary Converter Tools

Hexadecimal and binary are two ways of writing the same numbers, and the relationship between them is exact: every single hex digit corresponds to exactly four binary digits. That one-to-four mapping is why programmers live in hex. This tool exploits it fully: paste any hexadecimal value and get its binary form instantly, live as you type, entirely inside your browser with nothing sent to a server.

Where this tool saves you time is in handling the messy real-world formats. Hex values arrive with the 0x prefix from programming languages, with spaces or colons between byte pairs from memory dumps and MAC addresses, and sometimes in lowercase from web color codes. All of that is accepted. Paste 0xDE AD BE EF, DE:AD:BE:EF, or deadbeef, and the same binary comes out: 11011110 10111011 11101111.

The output preserves byte structure. Every two hex digits, meaning every 8 bits, is separated by a space in the result, which keeps groups readable and makes the reverse conversion trivial. Six hex digits give twelve binary digits; eight give sixteen. There is no ambiguity anywhere in the mapping, unlike binary to decimal, which requires arithmetic.

What Is Hexadecimal and Why Pair It with Binary?

Hexadecimal is base 16. It uses the digits 0 through 9 for values zero to nine, then the letters A through F for ten through fifteen. Lowercase and uppercase letters mean the same thing here: ff, FF, and Ff all equal 255. The system exists for one reason, and it is a good one: sixteen is 2 to the 4th power, so one hex digit carries exactly the information of four bits.

That alignment is best seen in a table. Memorizing these sixteen rows gives you the entire conversion skill:

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

Notice the elegant pattern in the low three rows: 8 rolls the highest bit on, 4 the next, 2 the next, 1 the last. The digit D, for example, is 13, which is 8 plus 4 plus 1, so its binary is 1101. Once you see that, hex to binary becomes mental substitution rather than calculation.

How to Use This Tool (Step by Step)

  1. Paste your hex into the input box. A 0x prefix, spaces, colons, or lowercase letters are all handled; invalid characters, like G or Z, produce a clear error message naming the problem.
  2. Read the live output as groups of four bits, joined into 8-bit bytes separated by spaces.
  3. Copy the result with one click for use in code, documentation, or homework.
  4. For the reverse direction, the paired binary-to-hex tool converts your bits back; round-tripping is the quickest accuracy check.

Worked Examples

Hex inputBinary outputNotes
1A000110101 is 0001, A is 1010
0xFF11111111Prefix ignored, F is 1111
4C 61 6D 7001001100 01100001 01101101 01110000The bytes spelling the word Lamp
DE:AD:BE:EF11011110 10101101 10111110 11101111MAC-style separators stripped

The third example is worth pausing on. Hex 4C is 76, which is capital L in ASCII, and 61 is lowercase a, 6D is m, 70 is p. A hex memory dump of English text is readable through exactly this kind of conversion, which is why the skill appears in every debugging tutorial.

Common Use Cases

  • Color codes: a web color like the classic cornflower blue 6495ED is three bytes; converting to 01100100 10010101 11101101 shows the red, green, and blue components as separate 8-bit channels.
  • Network identifiers: MAC addresses are written in hex pairs precisely because each pair is one byte; converting them shows the bit-level flags used in the address structure.
  • Memory dumps and reverse engineering: debuggers and hex editors display data as hex; converting rows to binary exposes individual bit flags in status words and hardware registers.
  • Protocol analysis: packet headers in documentation are given in hex; converting to binary lets you isolate single-bit fields like flags and type indicators.
  • Teaching: the digit-by-digit mapping is the friendliest possible introduction to base conversion, because no arithmetic is needed at all.

How the Conversion Works Internally

The tool first normalizes your input: it strips the optional 0x prefix and any whitespace or separator characters, leaving a clean string of hex digits. Each remaining character is validated against the set 0-9, a-f, A-F, and any stray character triggers a named error rather than silent nonsense. Then each digit is replaced by its 4-bit pattern from the table above, and the bits are concatenated. Digits are paired into bytes for display, so an odd number of hex digits means the final nibble is padded to a full byte with leading zeros.

One property worth internalizing: hex to binary never loses information and never involves rounding, because the mapping is a lookup, not a computation. Values up to any length work, so this handles a 64-bit register or a 128-bit UUID just as comfortably as a single byte.

Tips and Best Practices

  • Keep byte pairing in mind: hex values with an even number of digits map cleanly onto bytes; odd-length input gets one padded nibble, which shifts how you read the final byte.
  • Use round trips: convert hex to binary here, feed the binary to the binary-to-hex tool, and confirm you recover the original digits.
  • When inspecting bit flags, convert the full register, then read only the low bits you care about; leading zeros are always preserved so bit positions never drift.
  • Lowercase and uppercase are interchangeable here, but stay consistent in your own documentation because some contexts, like URL fragments, treat case differently.
  • For decimal results instead of bits, use the hex-to-decimal tool on this site; it explains the positional powers of 16 that hex notation encodes.

Hex Compared with the Other Representations

The same byte 10110110 can be written as hex B6, decimal 182, or the binary above. Hex wins on compactness with exactly two characters per byte and zero ambiguity, which is why it dominates editors, debuggers, and color pickers. Binary wins when individual bits matter, such as checking whether a permission flag or hardware bit is on. Decimal is best for everyday comparison and arithmetic. This tool covers the hex-to-binary direction precisely because that is where the mental substitution is easy to get wrong under time pressure: the table is simple, but sixteen rows of patterns are exactly the kind of thing a tired brain transposes.

Frequently Asked Questions

How do I convert hex to binary by hand?
Replace each hex digit with its 4-bit pattern using the standard table: 0 is 0000, 1 is 0001, up through 9 is 1001, then A is 1010, C is 1100, E is 1110, and F is 1111. For example, 3F becomes 0011 1111, and 1A becomes 0001 1010. No arithmetic is needed because each hex digit holds exactly four bits of information. Join all the groups together and you have the binary. Keep the digit order unchanged; only substitution is involved, never rearrangement or recomputation.
Why does one hex digit equal exactly four binary digits?
Because hex is base 16 and 16 equals 2 to the 4th power. A single hex digit can represent sixteen values, 0 through 15, and four bits can also represent sixteen values, 0000 through 1111, so the two ranges match perfectly. That is precisely why programmers prefer hex over decimal for binary work: decimal digits do not align with bit boundaries, since 10 is not a power of 2, but every hex digit maps onto a fixed 4-bit group, keeping nibbles, bytes, and bit positions visually aligned.
How do I convert 0xFF to binary?
The 0x prefix just marks the value as hexadecimal and is ignored in the conversion. F in hex means fifteen, whose 4-bit binary is 1111. With two F digits, FF becomes 1111 1111, or 11111111, which is one full byte with all eight bits set, decimal 255. FF is a useful memorized anchor: it is the largest value a byte can hold, appears as the maximum in color channels like the FF in FF0000 red, and shows up constantly in masks and padding.
Can this tool handle spaces, colons, or the 0x prefix in hex input?
Yes. The converter normalizes input before decoding: the optional 0x prefix is stripped, and separators such as spaces, colons, and dashes between hex digits are ignored, so formats like DE AD BE EF, DE:AD:BE:EF, and deadbeef all produce the same binary. Output is grouped into 8-bit bytes separated by spaces for readability. Anything that is not a valid hex digit after normalization, such as the letter G, triggers a clear error message instead of a wrong answer.
What is the binary of the hex color FF5733?
Convert each hex pair separately as one byte: FF is 11111111, 57 is 01010111, and 33 is 00110011. So the full conversion is 11111111 01010111 00110011. Reading the bytes as decimal gives 255, 87, and 51, which are the red, green, and blue channel intensities of that color. This is a quick way to see the channel structure hidden inside a 6-digit web color, and it works for any RGB hex code because each color code is exactly three bytes.
Does hex to binary conversion lose any information?
Never. The hex-to-binary mapping is a pure substitution table, not a calculation, so every hex digit is replaced by exactly four bits and the result contains precisely the same information. The only nuance is formatting: an odd number of hex digits requires padding the final nibble with leading zeros to complete a byte, which changes the display grouping but not the value. Lowercase versus uppercase letters also makes no difference to the result. Converting back with a binary-to-hex tool recovers your original digits exactly.

Related Tools