Every letter, digit and symbol in plain English text has a numeric code, and an ASCII table lists all 128 of them. The table above shows every code in decimal, hex, octal and binary, with a name for each character, and it adds the extended codes 128 to 255 as well. Search for any character, code or name to jump straight to it. Here's how the ASCII table is organized, what the control characters do, and how ASCII relates to extended ASCII and Unicode.
What ASCII is
ASCII, the American Standard Code for Information Interchange, was published in 1963 so that different computers and teleprinters could exchange text. It assigns a number from 0 to 127 to each of 128 characters: 33 control codes and 95 printable characters, which are the space, the digits, the uppercase and lowercase English letters, and 32 punctuation marks and symbols. Because 128 is 2⁷, every ASCII code fits in 7 bits. Computers store each one in an 8-bit byte with a leading 0, which is why the binary column always starts with 0 for codes up to 127.
How the ASCII table is organized
ASCII is easiest to understand in four blocks of 32 codes. The first three bits of the binary code tell you which block a character belongs to:
| Codes | First bits | Characters |
|---|---|---|
| 0–31 | 000 | Control characters such as tab, line feed and escape |
| 32–63 | 001 | Space, punctuation, symbols and the digits 0 to 9 |
| 64–95 | 010 | @, the uppercase letters A to Z, and [ \ ] ^ _ |
| 96–127 | 011 | `, the lowercase letters a to z, { | } ~ and DEL |
This layout was chosen on purpose. Within each letter block, the last five bits give the position in the alphabet, so A ends in 00001 and Z in 11010, which is 26. The digits 0 to 9 are codes 48 to 57, so subtracting 48 from a digit's code gives its value, and the last four bits of each digit are its value in binary.
Control characters
The 33 control codes were designed to steer teleprinters: ring a bell, move the print head back, or feed a new line of paper. Most are rarely used now, but a few are everywhere. Code 9 is the tab (HT), 10 is the line feed (LF) that ends a line on Linux and macOS, and 13 is the carriage return (CR) that Windows puts before each line feed. Code 27 (ESC) starts the escape sequences that color text in a terminal, 0 (NUL) marks the end of a string in C, and 127 (DEL) originally meant "ignore this character". The table shows the standard short name and meaning of every control code.
Letters, case and a single bit
Uppercase A is 65 and lowercase a is 97, a difference of exactly 32. In binary that's a single bit: 01000001 versus 01100001. The same holds for every letter, so programs can change case by flipping one bit, and sorting by code puts all uppercase letters before all lowercase ones. That's why a plain code-order sort lists "Zebra" before "apple".
Extended ASCII (codes 128 to 255)
ASCII itself stops at 127. When 8-bit bytes became standard, the spare codes 128 to 255 were filled with accented letters, symbols and line-drawing characters, but different systems filled them differently. The table above uses Windows-1252, the most common choice in Western software and the encoding many old web pages use. Its codes 160 to 255 match ISO-8859-1 (Latin-1), so é is 233 in both, but 128 to 159 differ: in Windows-1252, 128 is the euro sign €, while in Latin-1 those codes are control characters. The original IBM PC code page, CP437, used the same range for box-drawing characters instead. "Extended ASCII" doesn't mean one fixed table, so always check which code page your data uses.
ASCII and Unicode
Unicode covers every writing system, and its first 128 code points are exactly the ASCII table. UTF-8, the encoding used by almost every website, stores those characters as the same single bytes, so plain ASCII text is already valid UTF-8. Characters beyond ASCII take 2 to 4 bytes in UTF-8, though. é is the single byte 233 in Windows-1252 but the two bytes C3 A9 in UTF-8, which is why text decoded with the wrong encoding shows up as é.
Getting around the table
- Use the Control, Printable and Extended filters to narrow the table, and search to find a single character.
- HTML accepts numeric character codes in decimal or hex, so
AandAboth displayA. - To convert whole words, use the ASCII to binary converter or the binary to ASCII converter. For just the letters, see the binary alphabet.
Bookmark this page as a reference. Every ASCII and Windows-1252 code is in one table, and the search finds any character by its code, its name or the character itself.