How the binary translator works
Computers do not store letters. They store numbers, and those numbers are written in binary, a base-2 system that uses only two digits: 0 and 1. This tool moves between the text you read and the binary a machine sees, in both directions.
Text to binary
Turning text into binary happens in two steps:
- Look up each character’s number. Using the UTF-8 encoding, every character maps to one or more bytes. The letter
His byte number 72, andiis byte number 105. - Write each byte in 8-bit binary. The number 72 in binary is
1001000, padded to eight digits it is01001000. The number 105 is01101001.
So Hi becomes:
01001000 01101001
Each group of eight digits is one byte, and one byte here is one letter. The spaces are just for readability; the machine sees a continuous stream of bits.
Binary to text
Decoding reverses the process:
- Strip the spaces so you are left with a clean run of 0s and 1s.
- Split into 8-bit groups.
0100100001101001splits into01001000and01101001. - Convert each group to a number.
01001000is 72,01101001is 105. - Map the numbers back to characters with UTF-8. Byte 72 is
H, byte 105 isi, givingHi.
If the input has characters other than 0 and 1, or the bit count is not a multiple of 8, the bytes cannot line up cleanly, so the translator shows a short message instead of guessing.
Bits, bytes, and encodings
A bit and a byte
A bit is the smallest unit of data, a single 0 or 1. Group eight bits into a byte and you can count from 0 to 255, which is 256 distinct values. That range is enough to cover every English letter (upper and lower case), the digits 0 to 9, and common punctuation, which is why classic ASCII text is exactly one byte per character.
ASCII and UTF-8
ASCII is the original scheme, defining 128 characters (codes 0 to 127), each in a single byte. It handles unaccented English perfectly but has no room for anything else.
UTF-8 is the modern standard and a superset of ASCII. Plain ASCII characters still use one byte, so A is 01000001 in both. But UTF-8 can also represent every character in Unicode by using up to four bytes. An accented é takes two bytes, and most emoji take four. This translator uses UTF-8 in both directions, so accented text and emoji survive a round trip intact.
A worked example
Take the word Cat:
Cis byte 67, which is01000011.ais byte 97, which is01100001.tis byte 116, which is01110100.
The full binary is 01000011 01100001 01110100, three bytes for three letters.
Common uses
- Learning and teaching: a hands-on way to see how characters map to numbers and bits when studying computer science or the ASCII table.
- Puzzles and games: escape rooms, geocaching, and CTF challenges often hide messages as strings of 0s and 1s.
- Debugging and curiosity: checking exactly how many bytes a piece of text takes, or how a particular character is encoded.
- Fun messages: writing a note in pure binary for someone to decode.
Binary is not encryption. Anyone can decode it in seconds, so treat it as a representation of text, not a way to keep secrets.