Updated June 29, 2026
ASCII table
ASCII assigns a number from 0 to 127 to letters, digits, punctuation, and control codes. Codes 0-31 are non-printing control characters; 32-126 are printable; 127 is delete.
Common control codes (0-31)
| Dec | Hex | Char | Name |
|---|---|---|---|
0 | 00 | NUL | Null. |
8 | 08 | BS | Backspace. |
9 | 09 | HT | Horizontal tab. |
10 | 0A | LF | Line feed (newline). |
13 | 0D | CR | Carriage return. |
27 | 1B | ESC | Escape. |
Punctuation and digits (32-64)
| Dec | Hex | Char | Name |
|---|---|---|---|
32 | 20 | (space) | Space. |
33 | 21 | ! | Exclamation mark. |
35 | 23 | # | Number sign. |
36 | 24 | $ | Dollar sign. |
37 | 25 | % | Percent sign. |
38 | 26 | & | Ampersand. |
48 | 30 | 0 | Digit zero (digits run 48-57). |
57 | 39 | 9 | Digit nine. |
64 | 40 | @ | At sign. |
Letters (65-122)
| Dec | Hex | Char | Name |
|---|---|---|---|
65 | 41 | A | Uppercase A (A-Z run 65-90). |
90 | 5A | Z | Uppercase Z. |
95 | 5F | _ | Underscore. |
97 | 61 | a | Lowercase a (a-z run 97-122). |
122 | 7A | z | Lowercase z. |
127 | 7F | DEL | Delete. |
ASCII and UnicodeThe first 128 Unicode code points are identical to ASCII, and in UTF-8 they encode as a single byte. So ASCII is effectively a subset of modern Unicode text.
References
Questions
What is the difference between ASCII and Unicode?
ASCII covers 128 characters in the English alphabet and basic symbols. Unicode extends this to virtually every script and symbol, while keeping the first 128 code points the same as ASCII.
Why do digits and letters sit in neat ranges?
ASCII was designed so 0-9, A-Z, and a-z are contiguous. That makes character math easy, such as converting a digit character to its number by subtracting 48.