How to Convert Text to Binary (Step by Step, With Worked Examples)

You have seen binary code in films: long strings of 1s and 0s scrolling across a screen. What you may not know is that every letter you type — every A, every space, every exclamation mark — has its own 8-digit binary number, and converting text to binary is just a matter of looking each character up and writing its number down.

This guide shows you exactly how it works, with worked examples you can check yourself.

What Does Text to Binary Actually Mean?

Computers do not store letters. They store numbers, and every character on your keyboard has a number assigned to it in a standard table called ASCII (American Standard Code for Information Interchange).

To convert text to binary, you do two things for each character:

  1. Find its ASCII number. The letter A is number 65, lowercase a is 97, and a space is 32.
  2. Write that number in binary. The number 65 in binary is 01000001. That 8-digit string is what the computer actually stores for the letter A.

Every character becomes exactly 8 binary digits (bits), and one character’s worth of bits is called a byte.

How to Convert Text to Binary in 3 Steps

Step 1: Split the text into characters. Work one character at a time, from left to right — and do not skip the spaces. A space is a character too, with its own binary code (00100000).

Step 2: Find each character’s number. Use the table below for the most common characters — or remember the pattern: capitals run from 65 (A) to 90 (Z), lowercase from 97 (a) to 122 (z), and the digits 0 to 9 from 48 to 57.

Character ASCII number Binary
A 65 01000001
B 66 01000010
C 67 01000011
H 72 01001000
T 84 01010100
a 97 01100001
e 101 01100101
h 104 01101000
i 105 01101001
l 108 01101100
o 111 01101111
space 32 00100000
! 33 00100001

Step 3: Write the 8-bit binary for each character, separated by spaces. The spaces between the groups are only there so humans can read the result — the computer does not need them.

Worked Example 1 — “Hi”

  • H is number 72. In binary, 72 is 64 + 8, which gives 01001000.
  • i is number 105. In binary, 105 is 64 + 32 + 8 + 1, which gives 01101001.

Put it together: 01001000 01101001

Worked Example 2 — “CAT”

  • C is 67 (64 + 2 + 1) → 01000011
  • A is 65 (64 + 1) → 01000001
  • T is 84 (64 + 16 + 4) → 01010100

Put it together: 01000011 01000001 01010100

Worked Example 3 — “hello”

  • h is 104 (64 + 32 + 8) → 01101000
  • e is 101 (64 + 32 + 4 + 1) → 01100101
  • l is 108 (64 + 32 + 8 + 4) → 01101100
  • l is 108 again → 01101100
  • o is 111 (64 + 32 + 8 + 4 + 2 + 1) → 01101111

Put it together: 01101000 01100101 01101100 01101100 01101111

Worked Example 4 — “Hi!”

The exclamation mark is a character too, so it gets its own group:

  • H → 01001000
  • i → 01101001
  • ! is number 33 (32 + 1) → 00100001

Put it together: 01001000 01101001 00100001

And here is a trap beginners fall into: the digit 1 is not the number 1. The character “1” is number 49 in ASCII, so its binary is 00110001, while the number 1 itself is just 1. Text and numbers are different things to a computer, even when they look the same on screen.

Converting Back: Binary to Text

The reverse trip is the best way to check your answer: split the binary into groups of 8, turn each group into a number, then look up the character.

Take 01000011 01000001 01010100:

  • 01000011 is 64 + 2 + 1 = 67, which is C.
  • 01000001 is 64 + 1 = 65, which is A.
  • 01010100 is 64 + 16 + 4 = 84, which is T.

That spells CAT — the same word we started with. If you want to practise the reverse direction in detail, our guide on how to convert binary to text walks through it with more examples. And if you would rather skip the arithmetic, our free Binary Translator converts text to binary and binary to text instantly, in both directions.

Common Mistakes When Converting Text to Binary

1. Using 7 bits instead of 8. The number 65 is 1000001 in 7 bits, but text always uses 8 bits: 01000001. That leading zero is not decoration — without it, the computer cannot tell where one character ends and the next begins.

2. Forgetting the space. “Hi there” has a space between the words, and the space is number 32: 00100000. Leave it out and your binary reads as “Hithere”.

3. Mixing up uppercase and lowercase. A is 65 (01000001) but a is 97 (01100001). They are different characters with different binary codes — the difference is exactly 32, the value of the bit that flips case.

4. Confusing digits with numbers. As in the “Hi!” example, the character “1” (ASCII 49, 00110001) is not the number 1. The digits 0 to 9 are characters 48 to 57, not 0 to 9.

Frequently Asked Questions

How do I convert text to binary?
Split the text into characters, find each character’s ASCII number, and write that number as 8-bit binary. For example, A is 65, which is 01000001. A translator tool does all three steps for you in one click.

What is “Hi” in binary?
01001000 01101001 — H is 72 (01001000) and i is 105 (01101001).

What is “hello” in binary?
01101000 01100101 01101100 01101100 01101111 — one 8-bit group per letter.

Why is binary always 8 digits per letter?
Because text uses the ASCII standard, which stores each character as one byte — 8 bits. The leading zeros keep every group the same length.

Can I convert binary back to text?
Yes — split the binary into groups of 8 bits, turn each group into a number, and look up the character. 01001000 01101001 becomes “Hi” again.

Try It Yourself

Write your name in binary by hand — one letter at a time, using the table above — then paste the same name into our free Binary Translator and check your answer. If the two match, you have understood ASCII. And if you want to go deeper, learn how to convert binary to decimal next: it is the same place-value skill, applied to plain numbers instead of letters.