Text System Tutorial

How to Convert ASCII Text to Binary

A developer guide on mapping textual characters to 8-bit binary codes, with worked examples and standard tables.

Try it: ASCII Text to Binary mini-calculator

Binary Result: 01000001 01000010 01000011

What is ASCII?

ASCII (American Standard Code for Information Interchange) is a character encoding standard that assigns a unique number between 0 and 127 to English letters, numbers, and symbols.

Because computers communicate in binary, these numeric character codes must be converted to base-2 representations (typically formatted as 8-bit bytes with padding) to be stored or transmitted. If you want to translate binary code back to text, use our binary to ASCII converter. If you are encoding characters directly to base-16 instead of binary, you can use our ASCII to hexadecimal converter.

Conversion steps.

  1. Identify the decimal value of your character using a standard ASCII table (e.g. character 'A' has code 65).
  2. Convert the decimal code (65) to its binary equivalent. 65 in binary is 1000001.
  3. Pad the binary value with leading zeros to make it exactly 8 bits (one byte) wide: 01000001.
  4. Repeat this process for each character in the string, leaving a space between bytes for readability.

Frequently Asked Questions

How do you convert text characters to binary?

First, look up the character's decimal code on the ASCII table. Second, convert that decimal value to binary. Third, pad the resulting binary code on the left with leading zeros until it has exactly 8 digits (1 byte).

What is the binary code for uppercase A vs lowercase a?

Uppercase "A" has a decimal code of 65, which is 01000001 in binary. Lowercase "a" has a decimal code of 97, which is 01100001 in binary. Notice that the only difference is the 6th bit (valued at 32), which acts as a case flag.

Why is ASCII formatted as 8 bits instead of 7?

While standard ASCII uses 7 bits to represent 128 characters, computers organize memory into 8-bit bytes. Adding a leading 0 pad bit makes each ASCII character fit perfectly into a standard byte, facilitating simple parsing and database storage.

ASCII Alphabet Chart

Char Dec 8-Bit Binary
A6501000001
B6601000010
C6701000011
a9701100001
b9801100010
c9901100011