ASCII Explained: The 128 Characters That Started Computing

ASCII explained in plain terms means the simple table that turned letters, digits, and punctuation into numbers so early computers could store text. The central question is how a machine that only understands numbers can hold a letter at all, and the answer is that ASCII gave every common character its own number, and every computer agreed to use the same table.

ASCII stands for the American Standard Code for Information Interchange. It was published in 1963, when computers from different makers could not exchange text reliably, and it defined just 128 characters: the English alphabet in both cases, the digits, punctuation, and a set of control codes for machines.

It worked well for American English and nothing else, and its limits eventually forced the world to build Unicode. Yet ASCII has never gone away, because it lives on inside UTF-8 as its first 128 characters. This article explains what ASCII is, how it works, and why it still matters.

Key takeaways

  • ASCII gives each of 128 characters a number from 0 to 127.
  • It covers English letters, digits, punctuation, and control codes only.
  • Every character fits in seven bits, stored as one byte each.
  • It could not handle other languages, which led to Unicode.
  • ASCII still lives on as the first 128 characters of UTF-8.

What ASCII is

ASCII is a character encoding, a table that maps characters to numbers. The letter A is 65, the letter a is 97, the digit 0 is 48, and a space is 32. When a computer stores the word cat, it stores the numbers 99, 97, and 116, and when it displays those numbers, it looks each one up in the table and draws the matching character.

The table has 128 entries, numbered 0 to 127, which is exactly what fits in seven bits. The first 32 entries are control characters, invisible codes that once drove printers and terminals: 10 means new line, 13 means carriage return, 9 means tab, and 7 rings the bell. The next 95 entries are the printable characters, and the last entry, 127, is the delete code.

Because ASCII uses seven bits, each character fits in a single byte, with the eighth bit left unused. That simplicity made text easy to store, easy to send over early networks, and easy to sort, since sorting numbers is the same as sorting the characters in the table’s order.

How ASCII works

When you type a letter, the keyboard sends a code to the computer, and the computer stores that number in memory. When the computer needs to show the letter, it looks the number up in the ASCII table and draws the character the font provides for it. The table only defines which number means which character, not what the character looks like, so the same letter can appear in many different fonts.

Sorting and comparing text in ASCII is simple arithmetic. The digits come before the upper-case letters, which come before the lower-case letters, so a program can sort words by comparing their numbers. That ordering explains a common surprise: in ASCII, Z comes before a, and the digit 2 comes before the letter A, because their numbers are smaller.

Control characters were once as important as the letters. A terminal used them to move the cursor, clear the screen, and signal the end of a transmission, and early printers used them to feed paper and ring bells. Some of them still matter today: the new line character ends every line of a text file, and the tab character still separates columns.

ASCII’s limits appeared as soon as computers spread beyond English. It has no accented letters, no characters for other alphabets, and no symbols for maths or money beyond the dollar sign. Each country invented its own extension, using the unused eighth bit to add 128 more characters, but those extensions disagreed with each other, and a document written in one country turned to gibberish in another. Our guide to Unicode explains the universal standard that replaced that patchwork, and our guide to HTML explains how web pages declare their encoding so browsers know how to read them.

A laptop on a dark desk with its screen showing a glowing green table of letters and numbers
A laptop screen shows a glowing green table of letters and numbers, the ASCII table itself: each character paired with the number that represents it.

Comparing ASCII with other encodings

ASCII is the oldest of the common encodings, and later standards either extended it or replaced it. Understanding the differences shows why the world moved on, and why ASCII still survives inside its successor.

The table below sets out the main contrasts.

Aspect ASCII Unicode HTML entities
Characters covered 128 More than 150,000 Any character, by name or number
Languages supported English only Nearly every living language Any, through the page encoding
Size per character One byte One to four bytes in UTF-8 Several bytes as text
Accented letters None Fully supported Supported as entities
Modern use Inside UTF-8 The default almost everywhere Escaping special characters

The practical result is that ASCII is the foundation every other encoding builds on, Unicode is the standard that covers the world’s writing, and HTML entities are a way to write any character safely inside a page.

Where ASCII is used

Plain text files are the most common place to meet ASCII. Configuration files, source code, and simple documents are usually ASCII or UTF-8, and the two look identical for English text, because UTF-8 keeps ASCII’s numbers unchanged. A file that contains only ASCII is already a valid UTF-8 file.

Network protocols use ASCII heavily. The early internet was built on text protocols such as HTTP, SMTP, and FTP, and their commands and headers are ASCII words such as GET, HELO, and USER. That choice made the protocols easy to debug, because a person could read the traffic as it passed.

Programming languages are written in ASCII. Keywords, operators, and punctuation in almost every language come from the ASCII set, which is why code looks similar across languages and why programmers can type it on any keyboard.

File formats use ASCII for their readable parts. The headers of many formats, from email messages to image files, are ASCII text, so a person opening a file in a text editor can read the labels even when the rest is binary data.

Control characters still appear in everyday computing. The escape key on a keyboard sends ASCII 27, the backspace key sends ASCII 8, and the new line that ends each line of a text file is ASCII 10 on most systems, or the pair 13 and 10 on Windows.

Strengths and limits

The greatest strength of ASCII is its simplicity. One byte per character, one table for everyone, and no ambiguity about what a number means. That simplicity made early computing possible, and it is why ASCII became the foundation that later standards kept rather than replaced.

It is also a strength that ASCII is universal in the narrow sense that matters: any system that reads text can read ASCII, and every later encoding was designed to stay compatible with it. That compatibility is the reason old files still open correctly after sixty years.

The limits are obvious and were obvious early on. ASCII covers only English, it has no characters for other languages, and it cannot represent the symbols that science, maths, and trade need. Those limits forced the invention of Unicode, and they are the reason ASCII is a foundation rather than a complete solution.

ASCII checklist

  • Remember that ASCII covers 128 characters, numbered 0 to 127.
  • Check that a file is ASCII before assuming it has no encoding problems.
  • Save new text as UTF-8, which keeps ASCII compatibility and adds the rest.
  • Watch for sorting surprises, since digits sort before letters in ASCII.
  • Use control characters deliberately, not by accident, in data files.
  • Escape non-ASCII characters when a system only accepts ASCII.
  • Test with accented letters to find out whether a tool handles them.
  • Read file headers as text, since they are usually ASCII even in binary files.
  • Keep code and configuration in ASCII so it works on any system.

Frequently asked questions

What does ASCII stand for?

ASCII stands for the American Standard Code for Information Interchange. It is a table that assigns a number from 0 to 127 to each of 128 characters, including English letters, digits, punctuation, and control codes.

How many characters are in ASCII?

There are 128 characters in ASCII: 95 printable characters, 32 control characters, and the delete code. The printable set includes upper-case and lower-case letters, digits, punctuation, and the space.

What is the ASCII code for the letter A?

The letter A is 65 in ASCII, and the lower-case a is 97. The digits start at 48 for 0, and the space is 32. These numbers are fixed and have not changed since the standard was published.

Is ASCII still used today?

Yes, inside UTF-8. The first 128 characters of Unicode match ASCII exactly, so every ASCII file is also a valid UTF-8 file, and the standard lives on as the foundation of modern text encoding.

What is the difference between ASCII and Unicode?

ASCII covers 128 characters for English only, while Unicode covers more than 150,000 characters for nearly every language in the world. Unicode includes ASCII as its first 128 characters, so the two are compatible for English text.

Why is ASCII limited to 128 characters?

Because it was designed to fit in seven bits, which can represent exactly 128 values. Seven bits were enough for English and for the control codes that early machines needed, but not for the rest of the world’s writing.

The bottom line

ASCII explained in one line is this: a table of 128 numbers that let early computers store English text, and the foundation that every later encoding kept.

It is too small for the world’s languages, but it was the right size for its time, and its numbers still sit at the heart of UTF-8. Every time you type a letter, ASCII is doing the quiet work underneath.

This article is general information about how ASCII works, not advice about choosing an encoding for a particular system.

Latest articles

Scroll to Top