ASCII (American Standard Code for Information Interchange, pronounced "ask-ee") is the 1963 standard that first gave every character a number — and every text file, email, and web page since then owes it something. This guide explains how ASCII works, what's inside its 128 codes, and how it grew into the Unicode world we use today.
Why ASCII exists
In the early 1960s, every computer maker encoded text differently — an IBM machine couldn't read a DEC machine's tapes. The American Standards Association fixed this with a single 7-bit code: 128 characters, numbered 0 to 127, that everyone agreed on. Seven bits was a deliberate choice — the 8th bit stayed free for parity error-detection on noisy phone lines — and 128 codes were judged plenty for English text plus machine control. Teletypes, then terminals, then PCs all adopted it, and it stuck so well that it's still inside every modern system.
How ASCII works
Each ASCII character is a number from 0 to 127, which fits in 7 bits. (Stored in practice as one 8-bit byte, with the top bit zero — that spare bit was once used for parity error-checking.) To encode the letter "A", you store the number 65, which in binary is 1000001. Decoding is the reverse: read 65, look up "A". Our text to binary converter does exactly this for any text you type.
The three groups inside ASCII
1. Control characters (0–31): invisible instructions inherited from teletype machines, not printable symbols. The important ones: NUL (0, string terminator in C), BEL (7, beep), LF (10, line feed — the "\n" newline), CR (13, carriage return), ESC (27, the Escape key), and TAB (9).
2. Printable characters (32–126): everything you can type and see — space (32), digits 0–9 (48–57), uppercase A–Z (65–90), lowercase a–z (97–122), and punctuation.
3. DEL (127): the delete character, a historical leftover from punched tape (all holes punched = all 1-bits).
Codes worth memorizing
| Character | Decimal | Hex | Binary |
|---|---|---|---|
| space | 32 | 20 | 00100000 |
| 0 | 48 | 30 | 00110000 |
| 9 | 57 | 39 | 00111001 |
| A | 65 | 41 | 01000001 |
| Z | 90 | 5A | 01011010 |
| a | 97 | 61 | 01100001 |
| z | 122 | 7A | 01111010 |
| LF (newline) | 10 | 0A | 00001010 |
See the pattern? Uppercase and lowercase versions of a letter differ by exactly 32 (one bit) — that's why flipping bit 5 toggles case, a classic bit-twiddling trick. Digits are sequential from 48, which is why char - '0' converts a digit character to its value in C. See all 128 codes in our full ASCII table.
The logic behind the layout
ASCII's ordering isn't random. Digits 0–9 sit together starting at 48, so digit_char − 48 yields the numeric value — a trick used in virtually every programming language. Uppercase letters start at 65 and lowercase at 97, exactly 32 apart (one bit), so toggling bit 5 flips case. Punctuation fills the gaps, and the printable range was arranged so that numeric order roughly matches alphabetical order — which meant early computers could "alphabetize" text with a plain numeric comparison. The control block (0–31) came first simply because teletypes needed those machine commands before printable text even mattered.
Extended ASCII and Unicode: what came next
128 characters cover English, but not much else. Extended ASCII used the 8th bit for 128 more characters (128–255) — but everyone defined them differently, causing the infamous mojibake garbled text. The real fix was Unicode: one universal numbering of 150,000+ characters, encoded in practice as UTF-8. The brilliant part: UTF-8 was designed so that codes 0–127 encode identically to ASCII — every ASCII file ever written is automatically valid UTF-8.
ASCII in everyday life
You still touch ASCII constantly: URLs are ASCII-only (that's why non-English addresses get percent-encoded), email headers are ASCII, programming languages reserve ASCII for their syntax, and file formats like CSV and JSON are ASCII-based. Even HTTP is ASCII at heart — status lines like HTTP/1.1 200 OK must be ASCII, which is why international domain names get punycode-encoded (münchen.de becomes xn--mnchen-3ya.de) before they hit the wire. When you paste binary into our binary to text converter, the 8-bit groups it decodes are ASCII codes whenever they fall between 0 and 127.
Browse every ASCII code with binary and hex values:
Open the ASCII TableFrequently asked questions
What does ASCII stand for?
ASCII stands for American Standard Code for Information Interchange. It's a character encoding standard that assigns a number from 0 to 127 to 128 characters.
How many characters are in ASCII?
Standard ASCII defines 128 characters: 33 control characters, 94 printable characters, and DEL.
What is ASCII 65?
ASCII code 65 is the uppercase letter 'A'. Lowercase 'a' is 97, and the digit '0' is 48.
Is ASCII still used today?
Yes — ASCII is embedded inside UTF-8, the dominant text encoding on the web. Every ASCII text file is automatically valid UTF-8.