Text to Binary: How to Convert Words Into 1s and 0s

To convert text to binary, look up the character code for each letter and write that number as eight binary digits.

crossorigin="anonymous">

Computers cannot store letters directly, only numbers. A text encoding such as ASCII or UTF-8 assigns every character a number, and that number is then stored as a byte of 8 bits. Converting text to binary just means doing that lookup yourself.

Text to Binary Converter

Type any text to see it as binary. Each group of 8 digits is one byte.

How to Convert Text to Binary Step by Step

  1. Take the first character and find its code in the ASCII table.
  2. Convert that decimal number to binary (divide by 2, or subtract powers of two).
  3. Pad the result with zeros on the left until it is 8 digits long.
  4. Repeat for each character and put a space between the bytes so they are easy to read.

Example: the Word Hello

CharacterASCII codeBinary
H7201001000
e10101100101
l10801101100
l10801101100
o11101101111

So "Hello" in binary is 01001000 01100101 01101100 01101100 01101111. Take the first row: H is code 72, and 72 = 64 + 8, which is 01001000.

Common Characters in Binary

CharacterASCII codeBinary
H7201001000
e10101100101
l10801101100
o11101101111
(space)3200100000
A6501000001
a9701100001
75500110111

Uppercase and lowercase letters have different codes. A is 01000001 and a is 01100001. They differ by exactly one bit, the one worth 32. See the full binary alphabet from A to Z for every letter.

What About Numbers, Spaces and Symbols?

They are characters too. The digit 7 is stored as the character code 55, not as the number 7, so it becomes 00110111. A space is code 32 (00100000), and punctuation has its own codes.

Letters Outside Basic English (UTF-8)

ASCII only covers 128 characters. Most modern text uses UTF-8, which stores basic English characters in one byte but uses two to four bytes for everything else. The letter é takes two bytes, 11000011 10101001, and the Arabic letter ع also takes two, 11011000 10111001. The converter above uses UTF-8, so it handles these characters correctly. Read more in ASCII vs Unicode.

Common Mistakes

  • Forgetting to pad to 8 digits. The letter A is 01000001, not 1000001.
  • Converting the digit, not the character. The character 5 is code 53, not the number 5.
  • Ignoring case. Each letter has a different code in upper and lower case.

Frequently Asked Questions

How do you write "Hi" in binary?

01001000 01101001. H is 72 and i is 105.

Is there a limit on how much text I can convert?

No fixed limit, but every character adds at least 8 digits, so long text produces a very long string of 1s and 0s.

How do I turn binary back into text?

Split the digits into groups of 8, convert each group to decimal and look up the character. Our binary to text converter does it instantly, and binary to ASCII explains the steps.

Related Guides

Leave a Comment