Looking up character...
Search above or click any cell in the table to look up a character.
What Is ASCII?
ASCII (American Standard Code for Information Interchange) is a character encoding standard originally developed by Bell Labs and published as ANSI X3.4 in 1968. It defines 128 characters — encoded as 7-bit integers from 0 to 127 — covering the English alphabet, digits, punctuation, and 33 non-printable control characters.
Every modern text encoding descends from ASCII. UTF-8, the dominant encoding on the web, is fully backward-compatible: the first 128 code points of UTF-8 are byte-for-byte identical to ASCII. This means any pure-ASCII file is also a valid UTF-8 file.
Despite being over 50 years old, ASCII remains the foundation of virtually every programming language, network protocol, and file format in use today.
Control Characters (0–31, 127)
The first 32 characters and the last (DEL, 127) are non-printable control characters. They originated as signals for physical devices — teletype machines, printers, and modems — and many are still in active use today:
| Name | Dec | Hex | Common use today |
|---|---|---|---|
| NUL | 0 | 00 | String terminator in C/C++ |
| HT | 9 | 09 | Tab indentation, TSV files |
| LF | 10 | 0A | Line ending on Unix/Linux/macOS |
| CR | 13 | 0D | Part of Windows CRLF line endings |
| ESC | 27 | 1B | ANSI terminal escape sequences |
| SP | 32 | 20 | Word separator (technically printable) |
| DEL | 127 | 7F | Originally punched a hole over all tracks on paper tape |
Printable Characters (32–126)
Characters 32–126 are printable. They fall into three groups:
Digits
48–57
Characters '0'–'9'. Note: the digit '0' is decimal 48, not 0. Subtract 48 from any digit code to get its numeric value.
Uppercase
65–90
Letters 'A'–'Z'. To convert to lowercase, add 32 (or OR with 0x20). 'A' = 65, 'Z' = 90.
Lowercase
97–122
Letters 'a'–'z'. To convert to uppercase, subtract 32 (or AND with 0xDF). 'a' = 97, 'z' = 122.
The remaining printable characters (33–47, 58–64, 91–96, 123–126) are punctuation and symbols. The layout was deliberately designed so that digits, uppercase, and lowercase form three consecutive blocks — making case conversion and digit detection trivially fast with bitmask arithmetic.
ASCII vs Unicode vs UTF-8
ASCII encodes 128 characters in 7 bits. It covers only English and basic punctuation.
Unicode is a standard that assigns code points to over 1.1 million characters covering every writing system. The first 128 Unicode code points (U+0000–U+007F) are identical to ASCII.
UTF-8 is a variable-width encoding for Unicode. Characters 0–127 use a single byte — identical to their ASCII representation. Characters above 127 use 2–4 bytes. This backward-compatibility means that any software reading a pure-ASCII file as UTF-8 will produce exactly the same result.
Extended ASCII (code pages 128–255) is an unofficial term for various single-byte extensions that assign characters to the 8th bit. These are not standardised — Windows-1252, ISO 8859-1, and IBM Code Page 437 all define different characters for the same byte values.
Common Escape Sequences
| Char | Dec | C | URL | HTML | JSON |
|---|---|---|---|---|---|
| NUL | 0 | \0 | %00 | � | \u0000 |
| HT | 9 | \t | %09 | 	 | \t |
| LF | 10 | \n | %0A | | \n |
| CR | 13 | \r | %0D | | \r |
| SP | 32 | (sp) | %20 | | (sp) |
| " | 34 | \" | %22 | " | \" |
| & | 38 | & | %26 | & | & |
| < | 60 | < | %3C | < | < |
| > | 62 | > | %3E | > | > |
| \ | 92 | \\ | %5C | \ | \\ |
Frequently Asked Questions
What is the difference between ASCII and UTF-8?
Why do printable characters start at 32 (space)?
What is a null terminator (ASCII 0)?
How do I get a character's ASCII code in code?
What are ASCII escape sequences used for?
What comes after ASCII code 127?
Further Reading
- Unicode Consortium — C0 Controls and Basic Latin (PDF) — The official Unicode chart for ASCII code points U+0000–U+007F
- RFC 20 — ASCII Format for Network Interchange — The original 1969 ARPANET RFC that standardised ASCII on the internet
- MDN: String.charCodeAt() — JavaScript method to retrieve the UTF-16 code unit (= ASCII code for 0–127)
- MDN Glossary: ASCII — Concise developer-focused overview of the ASCII encoding