Guide

Text to Binary: How Words Become Binary Code

Computers store every letter as a number, and every number as binary digits. This guide shows how a word turns into 1s and 0s and how to reverse it.

The idea in three steps

  1. Each character has a code number. In ASCII, the capital letter A is 65 and the lowercase letter a is 97.
  2. That number is written in base 2, which uses only 0 and 1.
  3. The result is padded to 8 digits, called a byte.

So A is 65, which is 01000001 in binary.

Worked example: the word Hi

H is 72, which is 01001000. The letter i is 105, which is 01101001. The word Hi becomes 01001000 01101001. Try it in the Text to Binary Converter and decode it back to check.

ASCII, Unicode and UTF 8

ASCII covers 128 basic characters. Unicode covers many more, including accented letters, symbols and emoji. UTF 8 is the common way to store Unicode, and it uses one to four bytes per character. English letters take one byte, so they match ASCII, while many other characters take more.

Related conversions

If you need to change a number between bases, use the Binary, Decimal and Hex Converter. For encoded text in web work, see the Base64 Encoder and Decoder, and for dots and dashes, the Morse Code Translator.

Frequently asked questions

How do I convert text to binary?

Look up each character's code, write that number in base 2 and pad it to 8 digits. A converter does this for the whole text at once.

What is the binary for the letter A?

The capital letter A is 01000001 in 8 bit ASCII.

Can I convert binary back to text?

Yes. Split the binary into groups of 8, convert each group to a number and map the number to a character.

Why do some characters need more than 8 bits?

UTF 8 uses more bytes for characters outside basic ASCII, such as many symbols and emoji.

More guides

Tools for this guide