Text to binary converter
Convert text to binary and binary back to text. Type in the Text box
and each character becomes 8 binary digits (its byte), space-separated; paste digits
into the Binary box and they decode back to text. The same bytes are
also shown in hexadecimal. For example, Hi is
01001000 01101001 in binary and
48 69 in hex.
How to use it
To encode, type or paste your text on the left; the binary and hex update instantly. To decode, clear the binary box and paste your binary in: groups of 8 bits separated by spaces work best (one byte per character), but a single unbroken run of bits is also accepted as long as its length is a multiple of 8. Anything that is not a 0, a 1, or a space shows a short note instead of producing garbage.
Characters are encoded as UTF-8, the standard the web runs on. Plain English letters, digits, and punctuation are one byte (8 bits) each, exactly like ASCII. Accented letters and emoji take two to four bytes, so a single emoji shows up as several space-separated bytes, and it decodes back to the same emoji.
Worked example: Hi in binary
Each character has a number, its code point. Capital H is 72
and lowercase i is 105. Write each as an 8-bit binary number:
72 is 01001000 and 105 is 01101001.
Side by side that is 01001000 01101001, the binary for
Hi.
Going the other way, take 01001000, read it as a number (it is
72), and look up character 72, which is H. The same two bytes
in hexadecimal are 48
and 69, since each byte is exactly two hex digits.
Why characters become bytes
Computers only store numbers, so every character is assigned one. ASCII is the original table covering the English letters, digits, and common punctuation, each a value from 0 to 127 that fits in 7 bits (stored in a full 8-bit byte). Unicode extends that table to cover every writing system and emoji, and UTF-8 is the rule for packing those larger code points into one or more bytes.
That is why text is really just binary numbers underneath: a string is a list of code points, each code point is a number, and each number is a pattern of bits. Build the circuits that move those bits around in the lab.
Frequently asked
How do I convert text to binary?
Look up each character's number (its ASCII or Unicode code point), then write that number in 8-bit binary. Capital H is 72, which is 01001000. Lowercase i is 105, which is 01101001. So Hi in binary is 01001000 01101001. This tool does it for every character as you type.
How do I convert binary back to text?
Split the binary into 8-bit groups (one byte per character), read each group as a number, and look up the character with that code. 01001000 is 72, which is H. Paste the binary into the binary box and the text appears.
What is Hi in binary?
Hi in binary is 01001000 01101001: H is the byte 01001000 (72) and i is 01101001 (105). In hexadecimal the same two bytes are 48 69.
See how bits become numbers, then logic: read the theory on binary numbers, or open the lab and build the circuits that process them.
Related tools: binary converter and base converter.
Open the lab →