Text-to-Bytes Encoder

Understanding Binary Code

When you type a letter on a computer keyboard, what’s going on behind the scenes? Well, it turns out your computer doesn't actually see a letter. Instead, it sees a number that matches the letter you typed, using a special kind of code.

In 1963, a group of engineers agreed on a shared list called ASCII (pronounced ask-ee) to match letters to number codes. In original basic ASCII, every capital and lowercase letter, every digit from 0 to 9, and many punctuation marks were given their own number, chosen carefully to make it easy for computers to sort and compare.

For example, capital ‘A’ starts at 65, then B=66, C=67, and so on through the uppercase alphabet. Lowercase letters start later, like lowercase ‘a’ at 97, b=98, and so on.

Once a letter has an ASCII number, a computer can convert that number into binary, or the pattern of eight 0's and 1’s called a byte. So when you type the word Cat, the computer quickly and quietly translates it into three bytes: one for uppercase ‘C’ (67), one for lowercase ‘a’ (97), and one for lowercase ‘t’ (116). So even though 67-97-116 might not mean much to us, it makes purr-fect sense to our digital devices!

About the Encoder

This tool helps show the hidden translations that happen every time you type into a computer, revealing the binary patterns that computers actually store for each letter.

Get started by typing a word, up to ten letters long, or select one of the preset words. Each letter will appear as its own card that shows a dot pattern for its byte data. Tap any letter card to zoom in on the full eight-bit pattern and see the matching ASCII number value.

Once you have a feel for how to use the encoder, challenge yourself to complete the activities below!


Text-to-Bytes Encoder

Text-to-Bytes Encoder

Type a word to see each letter turned into a byte — a pattern of 8 bits!

Type a word above to see it turned into bytes!

Tap any letter card to zoom in on its byte.


Activity Challenges

1. What’s your name in binary?

Type your first name into the encoder and find your first initial. What is its ASCII number? What is its binary pattern? Now find the same letter in lowercase — how does the pattern change? Write out the full binary code for your name, byte by byte. How many bits does your whole name take up?

2. Crack the code

In pairs, groups, or with a teacher, work to decode an encoded binary string. For example: 01001000 01101001. Using the encoder, can you work out what word or message it spells? Try typing letters until you find ones whose binary patterns match. Once you've cracked it, write your own secret binary message for a classmate to decode.

2. Spot the pattern

Type the word ‘ABC’ into the encoder, then look at the binary patterns and ASCII values for A, B, and C side by side. What do you notice about how they are similar? What changes between each one? Now try ‘abc’ in lowercase. How do the lowercase patterns and values compare to the capitals? Can you predict what the binary byte pattern for D would be, before you type it? Take an educated guess, then check if you were right!

3. What about numbers and symbols?

Try entering characters like punctuation marks and other symbols on your keyboard that aren’t just letters. Do these have byte codes and ASCII values? Can you encode today’s date? How about your school’s address? Are there any symbols you’ve tried that aren’t showing up?


Note: Keeping Up with Tech

ASCII only covers 128 characters, but there’s also an extended ASCII set that covers up to 256 characters. Modern computers mostly use a new system called UTF-8, which goes even further to cover characters and symbols from every language in the world (even emoji!) while staying compatible with ASCII for standard English letters. For now, ASCII is a great place to start as we get to know binary code. Happy coding!