SEOLyzerPro
Use 47 free online tools: meta tag and robots.txt generators, image and text tools, JSON converters, calculators and unit converters. No signup needed
Text to Binary Converter
Convert text into binary code
Text to Binary Converter
What this tool does
The Text to Binary Converter writes text in binary, the system of zeros and ones that computers use to store information. Type or paste a word or sentence, click Convert, and the tool shows each character as a group of eight binary digits. Students use it to learn how computers represent text, teachers use it for lessons and puzzles, and programmers use it to look at the raw bytes behind a string.
How to use it
- Type or paste your text into the input box.
- Click Convert.
- Read the binary result. Each group of eight digits is one byte, and spaces separate the groups.
- Copy the result. Use Reset to start again.
Worked examples
| Text | Binary |
|---|---|
| A | 01000001 |
| a | 01100001 |
| Hi | 01001000 01101001 |
| Hello | 01001000 01100101 01101100 01101100 01101111 |
| 0 | 00110000 |
| ! | 00100001 |
| (space) | 00100000 |
How the conversion works
Computers store each character as a number, called its code. The tool looks up the code for each character, writes that number in binary, and pads it with zeros on the left to make eight digits.
Take the letter H. Its code is 72. To write 72 in binary, divide by 2 again and again and note the remainders:
- 72 ÷ 2 = 36, remainder 0
- 36 ÷ 2 = 18, remainder 0
- 18 ÷ 2 = 9, remainder 0
- 9 ÷ 2 = 4, remainder 1
- 4 ÷ 2 = 2, remainder 0
- 2 ÷ 2 = 1, remainder 0
- 1 ÷ 2 = 0, remainder 1
Reading the remainders from bottom to top gives 1001000, which is seven digits. Adding a zero at the front gives 01001000.
You can check this the other way. A binary number has place values, from the right, of 1, 2, 4, 8, 16, 32, 64 and 128. In 01001000, the digits that are 1 are at the places for 64 and 8, and 64 + 8 = 72, which is the code for H.
For the letter i, the code is 105, which is 64 + 32 + 8 + 1, so the binary form is 01101001. That is why “Hi” becomes 01001000 01101001.
Bits, bytes and ASCII
A bit is a single binary digit, either 0 or 1. A byte is a group of eight bits, and it can hold 256 different values, from 0 to 255. The famous ASCII table gives codes for 128 characters, which cover the English letters, the digits, punctuation marks and some control characters. Capital letters begin at 65 (A), lowercase letters begin at 97 (a), and the digits 0 to 9 begin at 48. So the character “0” is code 48, not the number zero, and its binary form is 00110000. A space is code 32, which is 00100000.
A pattern you can notice: a lowercase letter differs from the same capital letter by 32, which is a single bit. A is 01000001 and a is 01100001. Only the third bit from the left is different.
What happens with other languages and emoji
ASCII covers only English characters. To write all the languages of the world, modern systems use Unicode, and the most common way of storing it is UTF-8. UTF-8 is the same as ASCII for the first 128 characters, and it uses two, three or four bytes for others.
- The letter é uses two bytes: C3 A9 in hexadecimal, which is 11000011 10101001 in binary. So “café” has five bytes, which is 40 bits, even though it has four letters.
- Each Urdu or Arabic letter normally takes two bytes.
- The emoji 😀 uses four bytes: F0 9F 98 80, which is 11110000 10011111 10011000 10000000.
For this reason, the number of binary groups can be larger than the number of characters you typed.
How long is the result?
Every ordinary English character takes 8 binary digits. “Hello” has 5 characters, so it has 40 digits. “Hello World” has 11 characters, including the space, so it has 88 digits. The binary text is eight times longer than the original, plus separators.
Compare this with the Base64 encoding, which turns three bytes into four characters, and so is only about one third longer than the original. Binary text is easy to learn from, but it is not an efficient way to store or send data.
Where it is useful
- Learning. See how computers represent letters, and practise converting numbers between decimal and binary.
- Teaching and homework in computer science, electronics and mathematics.
- Puzzles and games. Binary messages are popular in escape rooms, geocaching and coding challenges.
- Programming. Look at the bits of a value when you work with flags, masks and low-level data.
- Digital electronics. Understand how data is stored in memory and sent along wires.
- Fun. Write your name in binary for a poster, a gift or a social media post.
Binary is not encryption
Writing a message in binary may look secret, but it is only a different way of writing the same text. Anyone can convert it back in seconds with a converter or a table. Do not use binary, Base64 or any similar encoding to protect passwords or private information. Encryption needs a key and a proper algorithm.
Tips for good results
- Keep the eight-digit groups together. If one digit is missing, the rest of the message will be read incorrectly.
- Use a space between bytes for readability. Some tools offer the choice to remove spaces.
- Remember that capital and small letters have different codes.
- Check whether the tool uses ASCII or UTF-8 when your text has accents, Urdu letters or emoji.
- To read a binary message by hand, split it into groups of eight, add up the place values (128, 64, 32, 16, 8, 4, 2, 1) for each group, and look up the number in an ASCII table.
- For a classroom exercise, try converting your first name and checking the result by hand.
Privacy
“The conversion happens in your browser and your text is not sent to our server.” Do not paste passwords or private information into any online tool.
Limits of this tool
The tool changes how text is written. It does not compress, encrypt or protect it. Results depend on the encoding that the tool uses, and very long text may be slow in older browsers. Binary strings produced by other tools may use different separators or lengths, such as seven-bit groups, which may not match this tool’s output.
Frequently asked questions
Why does each letter have eight digits?
A byte has eight bits, and the tool pads shorter numbers with zeros at the front.
What is “Hello” in binary?
01001000 01100101 01101100 01101100 01101111.
Why is “café” longer than four bytes?
The letter é takes two bytes in UTF-8.
Is binary the same as ASCII?
No. ASCII is a table of character codes, and binary is a way of writing numbers. The tool uses the codes and writes them in binary.
Related tools
Base64 Encode, Base64 Decode, Number to Word Converter, Number to Roman Numerals, Color Converter and Case Converter.