Strings of 0s and 1s turn up in puzzles, escape rooms, geeky T-shirts and computer science homework. Behind every one is ordinary text stored the way computers store it. Learning how to convert text to binary is a fun way to understand what really happens when you type, and it only takes two steps: turn each letter into a number, then turn each number into binary.
Step 1: Find each character's number
Computers use a character code to give every letter a number. For English text, the codes come from ASCII (and the identical first part of Unicode):
- A = 65, B = 66, C = 67 … Z = 90
- a = 97, b = 98, c = 99 … z = 122
- Space = 32
- 0 = 48 … 9 = 57
Read what is ASCII for the full story, or look any character up in the ASCII Converter.
Step 2: Turn each number into 8-bit binary
Each character is usually written as one byte – eight binary digits. Convert the number to binary using place values 128, 64, 32, 16, 8, 4, 2, 1, and pad with leading zeros to make eight digits.
Example: "Hi"
H = 72 = 64 + 8 → 01001000 i = 105 = 64 + 32 + 8 + 1 → 01101001
So "Hi" in binary code is: 01001000 01101001
Example: "A"
A = 65 = 64 + 1 → 01000001
If converting numbers to binary is new to you, our guide how to convert binary to decimal explains the place-value method.
Reading binary back into text
To decode a binary message:
- Split it into groups of eight digits.
- Convert each group to a decimal number.
- Look up the character for each number.
Try this one: 01001111 01001011 01001111 = 64 + 8 + 4 + 2 + 1 = 79 = O 01001011 = 64 + 8 + 2 + 1 = 75 = K The message is OK.
Spaces and capital letters
Spaces are characters too (00100000), so a sentence like "Hi there" has eight bytes, including the space. Capital and lower-case letters have different codes – "A" is 01000001 but "a" is 01100001. The only difference is one bit, the one worth 32.
What about emoji and other languages?
Characters outside basic English – é, ₦, emoji, Arabic or Chinese – are stored in Unicode, usually as UTF-8, which uses two to four bytes per character. A good binary-to-text tool handles UTF-8 automatically, so you do not have to work these out by hand.
Fun uses for binary code
- Secret messages in birthday cards and treasure hunts
- Classroom activities for teaching how computers work
- Jewellery and bracelets with names spelled in beads
- Coding club and escape-room puzzles
Do it instantly
The free Binary Converter translates text to binary and binary back to text in real time, including spaces and Unicode characters. For number conversions rather than text, use the Number Base Converter. Developers working with encoded data may also like Base64 Encode and Decode.
Frequently asked questions
Why is each letter eight digits long? Computers group bits into bytes of eight. ASCII only needs seven bits, so the first digit of an English character is always 0.
Is binary code the same as Morse code? No. Morse uses dots, dashes and pauses for human operators, and letters have different lengths. Binary text uses fixed groups of eight 0s and 1s.
What does 01001001 00100000 01101100 01101111 01110110 01100101 00100000 01110101 mean? Decode it with the tool and see – it is a classic message people put on cards.
Can numbers be written as text in binary? Yes. The character "7" is stored as 00110111 (code 55), which is different from the number seven, 00000111.
Summary
Now you know how to convert text to binary: look up each character's ASCII value, then write that value as an 8-bit binary number. To decode, split the message into groups of eight, convert each to decimal and look up the letter. Encode and decode any message in seconds with the free Binary Converter.