Every computer in the world runs on two digits: 0 and 1. Every photo, video, message and document you have ever opened is stored as a long string of those two digits, called binary code. You never normally see it, but converting text to binary is a useful skill โ it is how programmers, students and puzzle-makers peek behind the screen.
This guide explains how text becomes binary, how to read the code yourself, and how to convert any text in seconds with a free online tool.
What is binary code?
Binary is a number system with only two digits, 0 and 1. Our everyday decimal system has ten digits (0โ9); binary has two, so numbers grow longer faster. The decimal number 5 is 101 in binary; 65 is 1000001; 255 is 11111111. Each position in a binary number is worth twice the one before it โ 1, 2, 4, 8, 16, 32, 64, 128.
Computers use binary because their hardware has only two stable states: a switch that is on, or off; a voltage that is high, or low. A 0 is off, a 1 is on, and millions of those tiny switches together store everything a computer knows. Text is no exception โ every letter you type is stored as a binary number.
How letters become binary: ASCII
The standard that turns letters into numbers is called ASCII (American Standard Code for Information Interchange). It gives every common character a number from 0 to 127, and that number is written in 8-bit binary โ eight 0s and 1s, called a byte.
The pattern is easy to learn once you see it:
| Character | Decimal | Binary | |---|---|---| | A | 65 | 01000001 | | B | 66 | 01000010 | | Z | 90 | 01011010 | | a | 97 | 01100001 | | z | 122 | 01111010 | | 0 | 48 | 00110000 | | 9 | 57 | 00111001 | | Space | 32 | 00100000 | | ! | 33 | 00100001 |
Notice two useful things. First, uppercase and lowercase letters differ by exactly 32: A is 65 and a is 97, and in binary only one digit changes. Second, digits are in order: 0 is 48, 1 is 49, up to 9 at 57.
Putting it together, the word "Hi" becomes two bytes: 01001000 01101001 โ H is 72, i is 105. The famous distress signal "SOS" is 01010011 01001111 01010011. And "Hello" is 01001000 01100101 01101100 01101100 01101111. Each letter takes exactly eight digits, and a space between bytes keeps the code readable.
Modern text goes beyond ASCII โ emojis, accented letters and scripts like Urdu and Arabic use a wider standard called UTF-8. But for ordinary English text, 8-bit ASCII is all you need, and it is what most binary converters use.
How to convert text to binary
There are three ways, from slowest to fastest.
Method 1: Work it out by hand
Look up each letter's ASCII number in a table, then convert the number to binary by dividing by 2 and reading the remainders backwards. For "A" (65): 65 รท 2 = 32 remainder 1, 32 รท 2 = 16 remainder 0, and so on down to 1 โ reading the remainders backwards gives 1000001, padded to eight digits as 01000001. It is a good exercise for a computing exam, but doing it for a whole sentence takes a long time and one slip ruins the result.
Method 2: Use a programming language
In Python, a one-liner does it: ' '.join(format(ord(c), '08b') for c in "Hi") gives 01001000 01101001. This is the right approach if you are writing a program, but it means opening a code editor for a job that takes seconds another way.
Method 3: Use a free online text to binary converter
The fastest option is a dedicated tool. Paste your text into the free Text to Binary Converter and it shows the binary instantly, with a space between each byte โ and it works in reverse too, decoding binary back into readable text.
It is free, needs no sign-up, and works on your phone as well as your computer. Nothing is uploaded; the conversion happens in your browser. Paste the text, copy the code, done.
How to read binary back into text
Decoding is the same process in reverse: split the code into groups of eight digits, work out each group's decimal value, and look up the letter.
Take 01001000. Read the positions from right to left: 1, 2, 4, 8, 16, 32, 64, 128. The 1s are in the 64 and 8 positions, so the value is 64 + 8 = 72 โ the letter H. Do that for every byte and the message appears.
Why people convert text to binary
Students. Binary conversion is on nearly every school and college computing syllabus. Practising with a converter โ converting a word, then checking it by hand โ is the fastest way to learn it.
Programmers. Binary shows up in debugging, file formats and networking. Seeing the bytes behind a string explains why a file looks the way it does.
Puzzles and games. A message in 0s and 1s looks unreadable until you know the trick, which makes it perfect for escape rooms, treasure hunts and secret notes.
Curiosity. It is the simplest answer to "how does a computer store my words?" โ and once you have seen "Hi" as 01001000 01101001, the machine feels a little less mysterious.
If you like codes in general, binary pairs naturally with Morse code โ another way of writing letters with two symbols, dots and dashes instead of 0s and 1s. Our guide on how to translate Morse code online explains that alphabet the same way, with a free translator included.
Common mistakes to avoid
1. Forgetting the leading zero. The letter A is 01000001, not 1000001. Drop the zero and your groups no longer line up, and the decode comes out wrong.
2. Mixing up the bit order. Binary reads left to right, with the biggest value (128) on the left. Reading it backwards gives a different number entirely.
3. Using the wrong number of bits. Some systems use 7-bit ASCII, and UTF-8 uses variable lengths. For plain English text, 8 bits per character is the rule.
4. Losing the spaces between bytes. A long run of 0s and 1s with no separators is still decodable, but only if you count carefully in eights. Keep a space between bytes while you are learning, and let the converter do the same.
5. Forgetting that binary is case-sensitive. Uppercase A (01000001) and lowercase a (01100001) are different codes, because they are different strings.
FAQ
How do I convert text to binary? Paste the text into a free converter, such as the Text to Binary Converter, and it shows the 8-bit binary for every character instantly. By hand, look up each letter's ASCII number and convert it by dividing by 2.
What is the binary code for "Hello"? 01001000 01100101 01101100 01101100 01101111. Each letter is one byte: H is 72 (01001000), e is 101 (01100101), l is 108 (01101100), and o is 111 (01101111).
What is 01000001 in text? The letter A. It is decimal 65 in ASCII โ 64 + 1 โ which is the first uppercase letter.
How many bits are in a letter? Eight, for ordinary English text โ one byte per character, using the ASCII standard. A space is also a byte (00100000), so the sentence "Hi there" is 8 bytes, or 64 bits.
Can I convert binary back to text? Yes. Split the code into groups of eight digits, convert each group to its decimal value, and look up the letter. A converter does this in both directions โ paste binary in, get readable text out.
The bottom line
Binary is the language every computer speaks: letters become numbers, numbers become 0s and 1s, and eight bits make a byte. Learn the ASCII table for the common letters, keep your bytes in groups of eight, and let a tool do the heavy lifting for anything longer than a word.
Try it now: type your name into the free Text to Binary Converter and see what it looks like in 0s and 1s โ then paste the code back in and watch it turn into words again.
Related: "How to Translate Morse Code Online" (blog), for the Text to Binary Converter tool.