What Is ASCII Code (And How To Generate and Read It)

By Alvi Ahmed

Updated: April 25, 2025, 10 min read

ASCII (American Standard Code for Information Interchange) plays a fundamental role in how text is represented and exchanged across digital devices. But what is ASCII, exactly?

At its core, ASCII is a character encoding standard that assigns unique codes to characters, numbers, punctuation marks, and special symbols. These codes help computers understand each other and display text.

Without the standardized character encoding we have today, communication between computers will be a nightmare. We can confidently say that because that was exactly the case before ASCII

What is ASCII

ASCII stands for American Standard Code for Information Interchange. While it sounds boring, and frankly is a bit of a mouthful, ASCII codes are pretty crucial for how modern computers work.

It’s a term coined by the American National Standards Institute (ANSI) way back in the 1960s to standardize how computers understand and represent numbers.

Each ASCII character gets a number from 0 to 127, forming the core ASCII values list. For instance, “A” is 65, while “a” is 97, and the number 0 is 48.

It’s simple but powerful. With that shared map, Windows, Linux, Mac, or your ancient mainframe all agree on what you typed - and can show you the accurate character, number or symbols thanks to ASCII codes.

How ASCII Code Works

When you press the “A” key, the keyboard sends a signal which the computer interprets and maps to the character “A”.

That character is then encoded as the corresponding number from the ASCII standard. This number 65 gets stored or passed around in memory whenever the letter “A” is needed.

Later, when the computer wants to display it, it does the reverse. The computer looks up 65 in the ASCII table, and shows the character “A” on screen using a font.

ASCII encoding is crucial for computers when rendering text, numbers and symbols on screen. Originally, ASCII used 7 bits per character, giving us 128 codes. This was enough for English letters, digits, punctuation, and a handful of ASCII control characters - more on control characters later.

Later, an extra bit led to the Extended ASCII table (codes 128–255) with more symbols and box-drawing lines.

How Did We Get Here: A Brief History of ASCII

Before ASCII, every computer brand had its own way of encoding and displaying characters. Imagine the chaos that was. There was no way of allowing two computers from different manufacturers to talk to each other.

Things could be much better. This is where ASCII codes and standardized character encoding came in.

In 1963, ANSI, then called ASA, drafted the American Code for Information Interchange - the full form of ASCII. By 1967 it was official. Fast forward to 1981, early internet protocols like SMTP and HTTP mandated ASCII for headers, cementing its role in digital communication.

After ASCII was standardized, every manufacturer had to follow the rules set by ANSI for character encoding. Those same codes power all kinds of things like plain text files, email headers, and console logs worldwide today.

ASCII Code Categories: Control and Printable Characters

ASCII characters fall into two main groups. You have control characters that work behind the scenes. Then there are also actual printable ASCII characters that are the ones we actually see, like letters, numbers, punctuation, and symbols.

ASCII Control Characters

These are the unsung heroes that are hidden from the spotlight. You don’t see ASCII control characters but they tell your device crucial things about formatting, new lines and more.

ASCII control codes are 0 - 31, and 127. Here are all the control codes for ASCII used for formatting:

DecHexAbbrName
00x00NULNull
10x01SOHStart of Heading
20x02STXStart of Text
30x03ETXEnd of Text
40x04EOTEnd of Transmission
50x05ENQEnquiry
60x06ACKAcknowledge
70x07BELBell
80x08BSBackspace
90x09TABHorizontal Tab
100x0ALFLine Feed
110x0BVTVertical Tab
120x0CFFForm Feed
130x0DCRCarriage Return
140x0ESOShift Out
150x0FSIShift In
160x10DLEData Link Escape
170x11DC1Device Control 1
180x12DC2Device Control 2
190x13DC3Device Control 3
200x14DC4Device Control 4
210x15NAKNegative Acknowledge
220x16SYNSynchronous Idle
230x17ETBEnd of Transmission Block
240x18CANCancel
250x19EMEnd of Medium
260x1ASUBSubstitute
270x1BESCEscape
280x1CFSFile Separator
290x1DGSGroup Separator
300x1ERSRecord Separator
310x1FUSUnit Separator
1270x7FDELDelete

ASCII Printable Characters

Codes 32 - 126 are the ASCII printable characters. These are the ones you type and see on screen every day.

Letters, digits, punctuation, and the space bar—everything from an exclamation mark (!), and question mark (?), to that classic ASCII shrug (¯\\_(ツ)_/¯) are all made up from the printable character set.

They’re the building blocks of plain-text emails, chat messages, and console games. Here is a shortened ASCII table of some of the printable characters:

DecHexCharName
320x20(space)Space
330x21!Exclamation mark
440x2C,Comma
450x2D-Hyphen
460x2E.Period
480x300Digit 0
490x311Digit 1
650x41AUppercase A
660x42BUppercase B
970x61aLowercase a
980x62bLowercase b
950x5F_Underscore
630x3F?Question mark

Obviously this isn’t an exhaustive table. Check out the full ASCII table here.

How To Read the ASCII Table

Wondering how to read ASCII table entries? It’s super simple: spot the Dec column for the number, the Hex column for its 0x shorthand, and the Char column for the symbol itself.

On Linux, “man ascii”pops it right in your terminal. In Linux, “man” command is used to bring up manuals.

Or you can also just Google “ASCII table” to find any ASCII converters or charts you like. Once you get the layout, you’ll zip through codes like a pro.

ASCII Is Integral For Computers Today (And Probably For a Long Time To Come)

Think ASCII is ancient history? Think again. As we mentioned earlier, ASCII codes are used everywhere today.

Network protocols still lean on it for headers, and countless legacy systems expect 7-bit text. Plus, there’s the playful side: anything from retro ASCII art contests to fun terminal apps like cowsay.

The “cowasy” terminal app is a quirky little app that prints what you want in the terminal. In our opinion, it’s one of the best ASCII art apps around. The fun twist is it prints it as if a cow is saying it. Like this:

If you’ve ever shared a cute ASCII animal on a forum, you know how timeless this stuff is. ASCII art is a whole other thing.

ASCII art is a form of visual art created using only text characters usually from the standard ASCII set (letters, numbers, symbols).

ASCII vs. Unicode

A thought might have crossed your mind. 128 symbols seems not enough to cover all the languages and symbols. Turns out it wasn’t. Unicode was created as a superset of ASCII.

When we need more than 128 symbols—think accented letters, Chinese characters, or emojis, Unicode is used. UTF-8 encoding cleverly preserves ASCII’s 0–127 range and then uses multibyte sequences for everything else. So:

  • ASCII Vs Unicode: ASCII is the original 7-bit set; Unicode is the global superset.
  • Stick with ASCII encoding if you only need English text or legacy compatibility.
  • Switch to UTF-8 when you need emojis or non-Latin scripts.

And if you look at the Extended ASCII table, you’ll see code pages like Windows-1252 packed in extra glyphs before Unicode took over.

How to Convert Text to ASCII Codes

Converting text to ASCII codes is a useful skill for understanding how computers store and process text. You might also need it for your job, or university assignment. There are multiple ways to do this.

Method 1: With a Programming Language

We’ll use Python in this example because it has a built-in ord() method that converts text to ASCII code easily:

In Python, converting text to ASCII can be done easily using built-in functions like the "ord()" function. Let's walk through how do to it.

an image of how to convert to ASCII code in python

The "ord()" function in Python takes a string of a single character and returns its corresponding ASCII integer value. You can also convert list of characters, symbols and numbers in Python too. If you don't know how to code in Python, there's an easier way.

Method 2: Using Online Tools

You don’t need to know programming to convert characters, symbols, and numbers to ASCII. Online tools like our Text to ASCII tool can easily do it for you in real-time.

Type or paste what you want to convert on the input and it will give you the corresponding ASCII codes instantly.

Frequently Asked Questions

Q. What is the maximum ASCII code?

Standard ASCII stops at 127. Extended ASCII table sets go up to 255 but vary by system.

Q. Can ASCII represent emojis?

No. Unicode is used for representing emojis and other special characters. So stick with Unicode for smileys and more.

Q. Is ASCII still relevant in 2025?

Sure is. From plain-text notes to basic communication layers, ASCII’s reliability means it’s here to stay.

Wrapping Up

So, that’s what ASCII is all about. It’s a shared numeric map that keeps our digital world chatting. Next time you want to experiment, try a Text to ASCII converter, type out a massive ASCII banner, or crack open your terminal and run “cowsay Hello”. You might just find yourself hooked on these humble characters that keep everything talking.

Share this post
Picture of the author
Alvi Ahmed
Writer & Tech Enthusiast
I am a technology and business writer for CopyChecker. My work explores the evolving dynamics of innovation and strategy, combining my passion for tech with an analytical approach.
linkedin
Keep Reading
Blog Title Image

Learn how to make tiny text on Discord and add some creative flair to your messages

February 7, 2025