How many ASCII characters are there? ASCII code set explained
You've probably heard of ASCII before. But do you know how many ASCII characters there are? And what are the ASCII codes and their functions? Whether you're debugging a program or exploring the principles behind digital information storage, understanding how to type ASCII characters is key — even if Unicode has taken over the digital world. So, let's look into an ASCII character table and show you how to work with all the codes.
🔎 If you want to know more about the basics of ASCII, check out our other article: "What is ASCII: The Universal Language of Computers".
Approximately, how many ASCII bit codes for characters exist? The simple, direct answer is 128. This set of characters is the backbone of the original, official standard. But if you ask a programmer, a system administrator, or anyone who wrestled with computers in the 1980s and 90s, you will almost certainly get a different answer: 256. This discrepancy isn't just a piece of trivia; it's the key to understanding one of the most chaotic and creative periods in the history of computing.
The ambiguity that surrounds this discrepancy is the tale of a simple, elegant standard driven to its endpoint — and the messy, incompatible ways that characterized an era of technology. If you're asking yourself, "How many ASCII characters are there?", then you must consider not only the original, 7-bit standard, but also its extended, 8-bit version, which was developed around its predecessor.
The American Standard Code for Information Interchange, or ASCII, completed in 1968, was a masterpiece of efficiency. It was developed during a period when every bit of information represented a valuable resource that could (and should) be conserved.
Therefore, a 7-bit ASCII code was developed. You may ask: "What is a bit?" Think of it as an on/off switch. One bit can either be a 1 or a 0, and in a 7-bit system, there exist 128 different combinations of ones and zeros, because 27 = 128 — therefore, this is how many ASCII characters were created.
These 128 slots, numbered 0 through 127, were brilliantly divided into two distinct groups: the visible characters and the hidden commands.
95 printable characters
This is the part of the ASCII character table that we see and use every day. Codes 32 through 126 are the visible, printable characters that appear on your screen. This set includes:
- 26 uppercase English letters (A-Z);
- 26 lowercase English letters (a-z),
- 10 digits (0-9); and
- 33 punctuation marks and symbols (like !, &, +, and the spacebar itself at code
32).
33 command characters
The first 32 codes (0-31) and the final one (127) are kind of like ghosts: you can't see them, but they're there, and they're doing their job. They are commands, not symbols, designed initially to control the physical mechanisms of 1960s-era teleprinters.
While most are now obsolete, they include commands like:
- BEL (code
7): Instructed the receiving terminal to ring a physical bell to get the operator's attention. - BS (code
8): Backspace. Moved the print head one space back. - LF (code
10) and CR (13): "Line Feed" and "Carriage Return," used to tell a printer to move down a line and to the far left.
This set of 128 codes (33 control and 95 printable) was the complete, official standard. For its original purpose of processing data in American English, it was perfect.
So, if the standard is 128, where does 256 come from? The answer lies in the hardware. While ASCII was a 7-bit code, the computers it ran on were quickly standardizing on an 8-bit architecture. This 8-bit chunk of data became universally known as a "byte", which created a discrepancy:
- Computers stored data in 8-bit bytes.
- ASCII characters only required 7 bits to store. So, how many ASCII characters should there be, then?
This difference left one extra bit in every single byte of text. For a long time, this 8th bit was set to 0 or sometimes used as a "parity bit" for basic error checking. But leaving that bit empty was a tantalizing opportunity for hardware and software makers; using that extra 8th bit doubled the size of the character set. The math was simple: 28 = 256. This new, expanded 8-bit space (with codes 128 through 255) became known as extended ASCII. It allowed for 128 new characters. What are the ASCII codes of those?
The reality is that there was no single, official standard for Extended ASCII. The "extended" part of the chart became a digital Wild West. Everyone who needed more than the basic English alphabet created their own solution. A computer in Germany required the addition of ü and ß. A computer in Spain needed ñ and ¿. A business user wanted graphical symbols to draw boxes and menus. These different requirements led to hundreds of competing 8-bit code pages.
A code page is simply a map of the characters that reside in those 128 extended slots. While all code pages agreed on the first 128 standard ASCII characters, they were completely incompatible in the 128-255 range. For example:
-
Code Page 437 (The IBM PC): This was the original character set of the IBM PC and MS-DOS. In its 128 extra slots, it added accented characters for some European languages, a few Greek letters, math symbols, and – most famously – a set of box-drawing characters. These blocky lines, corners, and intersections (like │, ┌, and ╣) were the graphics of the pre-Windows era, used to build every menu, window, and interface in MS-DOS.
-
ISO 8859-1 (Latin-1): As computing became more international, the International Organization for Standardization (ISO) tried to fix the code page mess. Their solution was a series of 8-bit standards, and ISO 8859-1 became the default for the Americas, Western Europe, and the early World Wide Web. It was focused purely on language, adding all the necessary characters for Spanish, French, German, Portuguese, and the Nordic languages. It did not include the box-drawing characters.
🔎 If you want to know more about Unicode, the successor of ASCII, check out our dedicated article, "Why did UTF-8 replace ASCII?".
If you ever ask this question, fret not — as long as you stick to the 7-bit standard, you'll be fine. 😉 Let's look at the original ASCII character table:
Decimal | Binary | Character / Description | Decimal | Binary | Character / Description | Decimal | Binary | Character / Description |
|---|---|---|---|---|---|---|---|---|
|
| NUL (Null) |
|
| + |
|
| V |
|
| SOH (Start of Heading) |
|
| , |
|
| W |
|
| STX (Start of Text) |
|
| - |
|
| X |
|
| ETX (End of Text) |
|
| . |
|
| Y |
|
| EOT (End of Transmission) |
|
| / |
|
| Z |
|
| ENQ (Enquiry) |
|
| 0 |
|
| [ |
|
| ACK (Acknowledge) |
|
| 1 |
|
| \ |
|
| BEL (Bell) |
|
| 2 |
|
| ] |
|
| BS (Backspace) |
|
| 3 |
|
| ^ |
|
| TAB (Horizontal Tab) |
|
| 4 |
|
| _ |
|
| LF (Line Feed) |
|
| 5 |
|
| ` |
|
| VT (Vertical Tab) |
|
| 6 |
|
| a |
|
| FF (Form Feed) |
|
| 7 |
|
| b |
|
| CR (Carriage Return) |
|
| 8 |
|
| c |
|
| SO (Shift Out) |
|
| 9 |
|
| d |
|
| SI (Shift In) |
|
| : |
|
| e |
|
| DLE (Data Link Escape) |
|
| ; |
|
| f |
|
| DC1 (Device Control 1) |
|
| < |
|
| g |
|
| DC2 (Device Control 2) |
|
| = |
|
| h |
|
| DC3 (Device Control 3) |
|
| > |
|
| i |
|
| DC4 (Device Control 4) |
|
| ? |
|
| j |
|
| NAK (Negative Acknowledge) |
|
| @ |
|
| k |
|
| SYN (Synchronous Idle) |
|
| A |
|
| l |
|
| ETB (End of Transmission Block) |
|
| B |
|
| m |
|
| CAN (Cancel) |
|
| C |
|
| n |
|
| EM (End of Medium) |
|
| D |
|
| o |
|
| SUB (Substitute) |
|
| E |
|
| p |
|
| ESC (Escape) |
|
| F |
|
| q |
|
| FS (File Separator) |
|
| G |
|
| r |
|
| GS (Group Separator) |
|
| H |
|
| s |
|
| RS (Record Separator) |
|
| I |
|
| t |
|
| US (Unit Separator) |
|
| J |
|
| u |
|
| space |
|
| K |
|
| v |
|
| ! |
|
| L |
|
| w |
|
| " |
|
| M |
|
| x |
|
| # |
|
| N |
|
| y |
|
| $ |
|
| O |
|
| z |
|
| % |
|
| P |
|
| { |
|
| & |
|
| Q |
|
| ⎪ |
|
| ' |
|
| R |
|
| } |
|
| ( |
|
| S |
|
| ~ |
|
| ) |
|
| T |
|
| DEL (Delete) |
|
| ∗ |
|
| U |
How to type ASCII characters
Very well, we now know every code from the ASCII character table. How do we use them? Well, first of all, you have to know that you can only type using ASCII and Unicode if you have a numeric keypad on a Windows computer. Once you have it, follow these steps:
- Look at an ASCII character table and take the desired code. For instance, let's type a
Q(code81). - Go into a text box.
- Press
Altand hold. - On your numeric keypad, type the code of your character in a quick succession.
- You will see a Q appear in your textbox!
If you need help with finding an ASCII code, you can also use our ASCII converter!
128 or 256, depending on:
- Standard ASCII is a 7-bit code, which means there are 27, or 128, unique codes. These are numbered 0-127.
- Extended ASCII refers to any 8-bit code that uses ASCII for its first 128 characters. This system has 28, or 256, unique codes.
This was a deliberate and very clever design choice that allowed early computers to convert text from uppercase to lowercase (or vice versa) by simply flipping one bit, an incredibly fast and simple operation that saved precious processing power.
A → 65 = 1000001a → 97 = 1100001
This article was written by Agata Flak and reviewed by Steven Wooding.