ASCII
ASCII is a character encoding table in which each letter, number, and symbol corresponds to a specific number. The standard ASCII table contains 128 characters, numbered from 0 to 127. These include Latin letters, digits, punctuation marks, and control characters.
ASCII table
ASCII (American Standard Code for Information Interchange) is a set of character codes. The table shows the characters (Char) and their values in decimal (Dec) and hexadecimal (Hex) notations. Several codes (00–32, 7F) are control codes and are used as commands (Cmd).
You can check whether the code and symbol match in the standard Windows Notepad: hold down Alt and enter the decimal code on the numeric keypad. For example, Alt+1 will display the ☺ symbol.
This is what the ASCII table looks like with characters from 0 to 127:
| Dec | Hex | Char | Cmd |
|---|---|---|---|
| 0 | 0x00 | NUL | NUL |
| 1 | 0x01 | ☺ | SOH |
| 2 | 0x02 | ☻ | STX |
| 3 | 0x03 | ♥ | ETX |
| 4 | 0x04 | ♦ | EOT |
| 5 | 0x05 | ♣ | ENQ |
| 6 | 0x06 | ♠ | ACK |
| 7 | 0x07 | • | BEL |
| 8 | 0x08 | ◘ | BS |
| 9 | 0x09 | ○ | TAB |
| 10 | 0x0A | ◙ | LF |
| 11 | 0x0B | ♂ | VT |
| 12 | 0x0C | ♀ | FF |
| 13 | 0x0D | ♪ | CR |
| 14 | 0x0E | ♫ | SO |
| 15 | 0x0F | ☼ | SI |
| 16 | 0x10 | ► | DLE |
| 17 | 0x11 | ◄ | DC1 |
| 18 | 0x12 | ↕ | DC2 |
| 19 | 0x13 | ‼ | DC3 |
| 20 | 0x14 | ¶ | DC4 |
| 21 | 0x15 | § | NAK |
| 22 | 0x16 | ▬ | SYN |
| 23 | 0x17 | ↨ | ETB |
| 24 | 0x18 | ↑ | CAN |
| 25 | 0x19 | ↓ | EM |
| 26 | 0x1A | → | SUB |
| 27 | 0x1B | ← | ESC |
| 28 | 0x1C | ∟ | FS |
| 29 | 0x1D | ↔ | GS |
| 30 | 0x1E | ▲ | RS |
| 31 | 0x1F | ▼ | US |
| 32 | 0x20 | (sp) | |
| 33 | 0x21 | ! | |
| 34 | 0x22 | « | |
| 35 | 0x23 | # | |
| 36 | 0x24 | $ | |
| 37 | 0x25 | % | |
| 38 | 0x26 | & | |
| 39 | 0x27 | ‘ | |
| 40 | 0x28 | ( | |
| 41 | 0x29 | ) | |
| 42 | 0x2A | * | |
| 43 | 0x2B | + | |
| 44 | 0x2C | , | |
| 45 | 0x2D | — | |
| 46 | 0x2E | . | |
| 47 | 0x2F | / | |
| 48 | 0x30 | 0 | |
| 49 | 0x31 | 1 | |
| 50 | 0x32 | 2 | |
| 51 | 0x33 | 3 | |
| 52 | 0x34 | 4 | |
| 53 | 0x35 | 5 | |
| 54 | 0x36 | 6 | |
| 55 | 0x37 | 7 | |
| 56 | 0x38 | 8 | |
| 57 | 0x39 | 9 | |
| 58 | 0x3A | : | |
| 59 | 0x3B | ; | |
| 60 | 0x3C | < | |
| 61 | 0x3D | = | |
| 62 | 0x3E | > | |
| 63 | 0x3F | ? |
| Dec | Hex | Char | Cmd |
|---|---|---|---|
| 64 | 0x40 | @ | |
| 65 | 0x41 | A | |
| 66 | 0x42 | B | |
| 67 | 0x43 | C | |
| 68 | 0x44 | D | |
| 69 | 0x45 | E | |
| 70 | 0x46 | F | |
| 71 | 0x47 | G | |
| 72 | 0x48 | H | |
| 73 | 0x49 | I | |
| 74 | 0x4A | J | |
| 75 | 0x4B | K | |
| 76 | 0x4C | L | |
| 77 | 0x4D | M | |
| 78 | 0x4E | N | |
| 79 | 0x4F | O | |
| 80 | 0x50 | P | |
| 81 | 0x51 | Q | |
| 82 | 0x52 | R | |
| 83 | 0x53 | S | |
| 84 | 0x54 | T | |
| 85 | 0x55 | U | |
| 86 | 0x56 | V | |
| 87 | 0x57 | W | |
| 88 | 0x58 | X | |
| 89 | 0x59 | Y | |
| 90 | 0x5A | Z | |
| 91 | 0x5B | [ | |
| 92 | 0x5C | \ | |
| 93 | 0x5D | ] | |
| 94 | 0x5E | ^ | |
| 95 | 0x5F | _ | |
| 96 | 0x60 | ` | |
| 97 | 0x61 | a | |
| 98 | 0x62 | b | |
| 99 | 0x63 | c | |
| 100 | 0x64 | d | |
| 101 | 0x65 | e | |
| 102 | 0x66 | f | |
| 103 | 0x67 | g | |
| 104 | 0x68 | h | |
| 105 | 0x69 | i | |
| 106 | 0x6A | j | |
| 107 | 0x6B | k | |
| 108 | 0x6C | l | |
| 109 | 0x6D | m | |
| 110 | 0x6E | n | |
| 111 | 0x6F | o | |
| 112 | 0x70 | p | |
| 113 | 0x71 | q | |
| 114 | 0x72 | r | |
| 115 | 0x73 | s | |
| 116 | 0x74 | t | |
| 117 | 0x75 | u | |
| 118 | 0x76 | v | |
| 119 | 0x77 | w | |
| 120 | 0x78 | x | |
| 121 | 0x79 | y | |
| 122 | 0x7A | z | |
| 123 | 0x7B | { | |
| 124 | 0x7C | | | |
| 125 | 0x7D | } | |
| 126 | 0x7E | ~ | |
| 127 | 0x7F | ⌂ | DEL |
Please note that this table only contains basic control characters, numbers, Latin letters (lowercase and uppercase), and some special characters. The more extended ASCII table (extended ASCII) includes characters with codes from 128 to 255, but these may vary depending on the encoding (e.g., UTF-8 or ISO-8859-1).
Below is a table of the IBM CP866 code page, which was used in DOS to display Cyrillic and pseudographics:
| Dec | Hex | Char |
|---|---|---|
| 128 | 0x80 | A |
| 129 | 0x81 | B |
| 130 | 0x82 | IN |
| 131 | 0x83 | G |
| 132 | 0x84 | D |
| 133 | 0x85 | E |
| 134 | 0x86 | AND |
| 135 | 0x87 | Z |
| 136 | 0x88 | AND |
| 137 | 0x89 | Y |
| 138 | 0x8A | TO |
| 139 | 0x8B | L |
| 140 | 0x8C | M |
| 141 | 0x8D | N |
| 142 | 0x8E | ABOUT |
| 143 | 0x8F | P |
| 144 | 0x90 | I |
| 145 | 0x91 | R |
| 146 | 0x92 | WITH |
| 147 | 0x93 | T |
| 148 | 0x94 | U |
| 149 | 0x95 | F |
| 150 | 0x96 | X |
| 151 | 0x97 | C |
| 152 | 0x98 | Ch |
| 153 | 0x99 | Sh |
| 154 | 0x9A | SCH |
| 155 | 0x9B | Ъ |
| 156 | 0x9C | Y |
| 157 | 0x9D | Ь |
| 158 | 0x9E | E |
| 159 | 0x9F | Yu |
| 160 | 0xA0 | I |
| Dec | Hex | Char |
|---|---|---|
| 161 | 0xA1 | A |
| 162 | 0xA2 | b |
| 163 | 0xA3 | V |
| 164 | 0xA4 | G |
| 165 | 0xA5 | d |
| 166 | 0xA6 | e |
| 167 | 0xA7 | and |
| 168 | 0xA8 | s |
| 169 | 0xA9 | And |
| 170 | 0xAA | y |
| 171 | 0xAB | To |
| 172 | 0xAC | l |
| 173 | 0xAD | m |
| 174 | 0xAE | n |
| 175 | 0xAF | O |
| 176 | 0xB0 | p |
| 177 | 0xB1 | ░ |
| 178 | 0xB2 | ▒ |
| 179 | 0xB3 | ▓ |
| 180 | 0xB4 | │ |
| 181 | 0xB5 | ┤ |
| 182 | 0xB6 | ╡ |
| 183 | 0xB7 | ╢ |
| 184 | 0xB8 | ╖ |
| 185 | 0xB9 | ╕ |
| 186 | 0xBA | ╣ |
| 187 | 0xBB | ║ |
| 188 | 0xBC | ╗ |
| 189 | 0xBD | ╝ |
| 190 | 0xBE | ╜ |
| 191 | 0xBF | ╛ |
| Dec | Hex | Char |
|---|---|---|
| 192 | 0xC0 | ┐ |
| 193 | 0xC1 | └ |
| 194 | 0xC2 | ┴ |
| 195 | 0xC3 | ┬ |
| 196 | 0xC4 | ├ |
| 197 | 0xC5 | ─ |
| 198 | 0xC6 | ┼ |
| 199 | 0xC7 | ã |
| 200 | 0xC8 | Ã |
| 201 | 0xC9 | ╚ |
| 202 | 0xCA | ╔ |
| 203 | 0xCB | ╩ |
| 204 | 0xCC | ╦ |
| 205 | 0xCD | ╠ |
| 206 | 0xCE | ═ |
| 207 | 0xCF | ╬ |
| 208 | 0xD0 | ¤ |
| 209 | 0xD1 | ð |
| 210 | 0xD2 | Ð |
| 211 | 0xD3 | Ê |
| 212 | 0xD4 | Ë |
| 213 | 0xD5 | È |
| 214 | 0xD6 | Í |
| 215 | 0xD7 | Î |
| 216 | 0xD8 | Ï |
| 217 | 0xD9 | ┘ |
| 218 | 0xDA | ┌ |
| 219 | 0xDB | █ |
| 220 | 0xDC | ▄ |
| 221 | 0xDD | ▌ |
| 222 | 0xDE | ▐ |
| 223 | 0xDF | ▀ |
| Dec | Hex | Char |
|---|---|---|
| 224 | 0xE0 | α |
| 225 | 0xE1 | ß |
| 226 | 0xE2 | Γ |
| 227 | 0xE3 | π |
| 228 | 0xE4 | Σ |
| 229 | 0xE5 | σ |
| 230 | 0xE6 | µ |
| 231 | 0xE7 | τ |
| 232 | 0xE8 | Φ |
| 233 | 0xE9 | Θ |
| 234 | 0xEA | Ω |
| 235 | 0xEB | δ |
| 236 | 0xEC | ∞ |
| 237 | 0xED | φ |
| 238 | 0xEE | ε |
| 239 | 0xEF | ∩ |
| 240 | 0xF0 | ≡ |
| 241 | 0xF1 | ± |
| 242 | 0xF2 | ≥ |
| 243 | 0xF3 | ≤ |
| 244 | 0xF4 | ⌠ |
| 245 | 0xF5 | ⌡ |
| 246 | 0xF6 | ÷ |
| 247 | 0xF7 | ≈ |
| 248 | 0xF8 | ° |
| 249 | 0xF9 | ∙ |
| 250 | 0xFA | · |
| 251 | 0xFB | √ |
| 252 | 0xFC | No. |
| 253 | 0xFD | ¤ |
| 254 | 0xFE | ■ |
| 255 | 0xFF | (nbsp) |
What is ASCII?
The table was developed in America in the 1960s, and its name stands for American Standard Code for Information Interchange. The abbreviation is pronounced, “ASK.”
There are national ASCII extensions that encode letters and symbols used in other alphabets. The “standard” table is called US-ASCII, or the international version. Most national extensions replace only some symbols, such as the dollar sign with the pound sign. However, for languages that use non-Latin alphabets, most symbols are replaced. Russian is one such language.
What is the ASCII table for?
Digital devices don’t understand symbols by default—only numbers. Therefore, letters, numbers, and symbols must be encoded to communicate to the computer the correspondence between a specific symbol and a numerical value. There are currently several encoding options, and ASCII is one of the earliest. It set the standards for subsequent solutions.
When this encoding was developed, computers as we know them today didn’t yet exist. It was developed for teletypes—information exchange devices similar to telegraphs and typewriters. They’re rarely used today, but some standards have survived from that era, including the ASCII character set, which is now used to encode information in computers.
Today, ASCII is used to encode data in computer devices; several other encoding systems are based on it. It’s also used in creative arts, where images are created using symbols. This is called ASCII art.
Practical application
- When developing a website or application, a developer may need to use ASCII to encode characters that are not included in the national encoding.
- You can save a document or other file in ASCII format, which will encode all its characters using that character set. This can be useful if you need to convey information that will be readable anywhere, but some formatting features will be unavailable in this mode.
- You can enter an ASCII code directly from the keyboard: hold down the Alt key and type the numeric value corresponding to a character from the table. This also works for characters found in extended versions of the character set, such as emojis, hieroglyphs, letters from other alphabets, and so on. The code for these characters can be much longer than the standard 128 letters and numbers.
How ASCII is structured internally
Uppercase and lowercase letters in ASCII are distinct elements. Moreover, in the table, lowercase letters are arranged below uppercase letters, in the same column but on different rows. This makes the entries more visually clear, and the information is easier to check and manipulate, such as editing the case using automatic commands.
How are characters arranged in ASCII?
- The first two lines of the table are control characters: Backspace, line feed, beginning and end of paragraph, and others.
- The third line contains punctuation marks and special characters such as percentage % or asterisk *.
- The fourth line contains numbers and mathematical symbols, as well as a colon, semicolon, and question mark.
- The fifth and sixth lines contain capital letters and some other special characters.
- The seventh and eighth lines describe lowercase letters and a few other symbols.
Differences from Unicode
When we talk about encoding, the first thing that comes to mind is the international character encoding system, Unicode. It’s important not to confuse it with ASCII—the two concepts are not identical.
ASCII was developed earlier and includes fewer characters. The standard table has only 128, not counting extensions for other languages. Meanwhile, Unicode, implemented by UTF-8 and UTF-32 encodings, currently has 2²¹ characters—more than two million. This set includes virtually all existing characters, making it a very broad one.
Unicode can be thought of as an extension of ASCII. The first 128 characters in Unicode are encoded the same way as in ASCII, and they are the same characters.