ASCII Table
ASCII (American Standard Code for Information Interchange) is a 7-bit character encoding standard defining 128 characters: 33 non-printable control codes (0–31 and 127) and 95 printable characters (32–126). Every ASCII character maps 1:1 to the same byte value in UTF-8, Latin-1, and Windows-1252, making ASCII the safe common ground across all major encodings.
The table below shows decimal, hexadecimal, octal, and binary representations for each codepoint. Click any character to see its full Unicode encoding reference.
Control Codes (0–31)
The first 32 ASCII characters are non-printable control codes inherited from teletype machines and early terminals. Most are obsolete in modern use, but a handful — NUL, HT, LF, CR, ESC, DEL — appear constantly in programming. In C-family languages, the common ones have dedicated escape sequences shown in the Escape column.
| Dec | Hex | Oct | Bin | Abbr | Escape | Name |
|---|---|---|---|---|---|---|
| 0 | 0000 | 0 | 0000000 | NUL | \0 | Null |
| 1 | 0001 | 1 | 0000001 | SOH | Start of Heading | |
| 2 | 0002 | 2 | 0000010 | STX | Start of Text | |
| 3 | 0003 | 3 | 0000011 | ETX | End of Text | |
| 4 | 0004 | 4 | 0000100 | EOT | End of Transmission | |
| 5 | 0005 | 5 | 0000101 | ENQ | Enquiry | |
| 6 | 0006 | 6 | 0000110 | ACK | Acknowledge | |
| 7 | 0007 | 7 | 0000111 | BEL | \a | Bell |
| 8 | 0008 | 10 | 0001000 | BS | \b | Backspace |
| 9 | 0009 | 11 | 0001001 | HT | \t | Horizontal Tab |
| 10 | 000A | 12 | 0001010 | LF | \n | Line Feed |
| 11 | 000B | 13 | 0001011 | VT | \v | Vertical Tab |
| 12 | 000C | 14 | 0001100 | FF | \f | Form Feed |
| 13 | 000D | 15 | 0001101 | CR | \r | Carriage Return |
| 14 | 000E | 16 | 0001110 | SO | Shift Out | |
| 15 | 000F | 17 | 0001111 | SI | Shift In | |
| 16 | 0010 | 20 | 0010000 | DLE | Data Link Escape | |
| 17 | 0011 | 21 | 0010001 | DC1 | Device Control 1 (XON) | |
| 18 | 0012 | 22 | 0010010 | DC2 | Device Control 2 | |
| 19 | 0013 | 23 | 0010011 | DC3 | Device Control 3 (XOFF) | |
| 20 | 0014 | 24 | 0010100 | DC4 | Device Control 4 | |
| 21 | 0015 | 25 | 0010101 | NAK | Negative Acknowledge | |
| 22 | 0016 | 26 | 0010110 | SYN | Synchronous Idle | |
| 23 | 0017 | 27 | 0010111 | ETB | End of Transmission Block | |
| 24 | 0018 | 30 | 0011000 | CAN | Cancel | |
| 25 | 0019 | 31 | 0011001 | EM | End of Medium | |
| 26 | 001A | 32 | 0011010 | SUB | Substitute | |
| 27 | 001B | 33 | 0011011 | ESC | \e | Escape |
| 28 | 001C | 34 | 0011100 | FS | File Separator | |
| 29 | 001D | 35 | 0011101 | GS | Group Separator | |
| 30 | 001E | 36 | 0011110 | RS | Record Separator | |
| 31 | 001F | 37 | 0011111 | US | Unit Separator |
Printable Characters (32–126)
Codepoints 32–126 are printable. Code 32 is the space character. Codepoints 48–57 are the decimal digits 0–9. Uppercase letters run from 65–90, lowercase from 97–122 — exactly 32 apart, which is why toggling bit 5 swaps case in ASCII.
| Char | Dec | Hex | Oct | Bin | HTML Entity | Unicode Name |
|---|---|---|---|---|---|---|
| 32 | 0020 | 40 | 0100000 | — | SPACE | |
| ! | 33 | 0021 | 41 | 0100001 | — | EXCLAMATION MARK |
| " | 34 | 0022 | 42 | 0100010 | " | QUOTATION MARK |
| # | 35 | 0023 | 43 | 0100011 | — | NUMBER SIGN |
| $ | 36 | 0024 | 44 | 0100100 | — | DOLLAR SIGN |
| % | 37 | 0025 | 45 | 0100101 | — | PERCENT SIGN |
| & | 38 | 0026 | 46 | 0100110 | & | AMPERSAND |
| ' | 39 | 0027 | 47 | 0100111 | ' | APOSTROPHE |
| ( | 40 | 0028 | 50 | 0101000 | — | LEFT PARENTHESIS |
| ) | 41 | 0029 | 51 | 0101001 | — | RIGHT PARENTHESIS |
| * | 42 | 002A | 52 | 0101010 | — | ASTERISK |
| + | 43 | 002B | 53 | 0101011 | — | PLUS SIGN |
| , | 44 | 002C | 54 | 0101100 | — | COMMA |
| - | 45 | 002D | 55 | 0101101 | — | HYPHEN-MINUS |
| . | 46 | 002E | 56 | 0101110 | — | FULL STOP |
| / | 47 | 002F | 57 | 0101111 | — | SOLIDUS |
| 0 | 48 | 0030 | 60 | 0110000 | — | DIGIT ZERO |
| 1 | 49 | 0031 | 61 | 0110001 | — | DIGIT ONE |
| 2 | 50 | 0032 | 62 | 0110010 | — | DIGIT TWO |
| 3 | 51 | 0033 | 63 | 0110011 | — | DIGIT THREE |
| 4 | 52 | 0034 | 64 | 0110100 | — | DIGIT FOUR |
| 5 | 53 | 0035 | 65 | 0110101 | — | DIGIT FIVE |
| 6 | 54 | 0036 | 66 | 0110110 | — | DIGIT SIX |
| 7 | 55 | 0037 | 67 | 0110111 | — | DIGIT SEVEN |
| 8 | 56 | 0038 | 70 | 0111000 | — | DIGIT EIGHT |
| 9 | 57 | 0039 | 71 | 0111001 | — | DIGIT NINE |
| : | 58 | 003A | 72 | 0111010 | — | COLON |
| ; | 59 | 003B | 73 | 0111011 | — | SEMICOLON |
| < | 60 | 003C | 74 | 0111100 | < | LESS-THAN SIGN |
| = | 61 | 003D | 75 | 0111101 | — | EQUALS SIGN |
| > | 62 | 003E | 76 | 0111110 | > | GREATER-THAN SIGN |
| ? | 63 | 003F | 77 | 0111111 | — | QUESTION MARK |
| @ | 64 | 0040 | 100 | 1000000 | — | COMMERCIAL AT |
| A | 65 | 0041 | 101 | 1000001 | — | LATIN CAPITAL LETTER A |
| B | 66 | 0042 | 102 | 1000010 | — | LATIN CAPITAL LETTER B |
| C | 67 | 0043 | 103 | 1000011 | — | LATIN CAPITAL LETTER C |
| D | 68 | 0044 | 104 | 1000100 | — | LATIN CAPITAL LETTER D |
| E | 69 | 0045 | 105 | 1000101 | — | LATIN CAPITAL LETTER E |
| F | 70 | 0046 | 106 | 1000110 | — | LATIN CAPITAL LETTER F |
| G | 71 | 0047 | 107 | 1000111 | — | LATIN CAPITAL LETTER G |
| H | 72 | 0048 | 110 | 1001000 | — | LATIN CAPITAL LETTER H |
| I | 73 | 0049 | 111 | 1001001 | — | LATIN CAPITAL LETTER I |
| J | 74 | 004A | 112 | 1001010 | — | LATIN CAPITAL LETTER J |
| K | 75 | 004B | 113 | 1001011 | — | LATIN CAPITAL LETTER K |
| L | 76 | 004C | 114 | 1001100 | — | LATIN CAPITAL LETTER L |
| M | 77 | 004D | 115 | 1001101 | — | LATIN CAPITAL LETTER M |
| N | 78 | 004E | 116 | 1001110 | — | LATIN CAPITAL LETTER N |
| O | 79 | 004F | 117 | 1001111 | — | LATIN CAPITAL LETTER O |
| P | 80 | 0050 | 120 | 1010000 | — | LATIN CAPITAL LETTER P |
| Q | 81 | 0051 | 121 | 1010001 | — | LATIN CAPITAL LETTER Q |
| R | 82 | 0052 | 122 | 1010010 | — | LATIN CAPITAL LETTER R |
| S | 83 | 0053 | 123 | 1010011 | — | LATIN CAPITAL LETTER S |
| T | 84 | 0054 | 124 | 1010100 | — | LATIN CAPITAL LETTER T |
| U | 85 | 0055 | 125 | 1010101 | — | LATIN CAPITAL LETTER U |
| V | 86 | 0056 | 126 | 1010110 | — | LATIN CAPITAL LETTER V |
| W | 87 | 0057 | 127 | 1010111 | — | LATIN CAPITAL LETTER W |
| X | 88 | 0058 | 130 | 1011000 | — | LATIN CAPITAL LETTER X |
| Y | 89 | 0059 | 131 | 1011001 | — | LATIN CAPITAL LETTER Y |
| Z | 90 | 005A | 132 | 1011010 | — | LATIN CAPITAL LETTER Z |
| [ | 91 | 005B | 133 | 1011011 | — | LEFT SQUARE BRACKET |
| \ | 92 | 005C | 134 | 1011100 | — | REVERSE SOLIDUS |
| ] | 93 | 005D | 135 | 1011101 | — | RIGHT SQUARE BRACKET |
| ^ | 94 | 005E | 136 | 1011110 | — | CIRCUMFLEX ACCENT |
| _ | 95 | 005F | 137 | 1011111 | — | LOW LINE |
| ` | 96 | 0060 | 140 | 1100000 | — | GRAVE ACCENT |
| a | 97 | 0061 | 141 | 1100001 | — | LATIN SMALL LETTER A |
| b | 98 | 0062 | 142 | 1100010 | — | LATIN SMALL LETTER B |
| c | 99 | 0063 | 143 | 1100011 | — | LATIN SMALL LETTER C |
| d | 100 | 0064 | 144 | 1100100 | — | LATIN SMALL LETTER D |
| e | 101 | 0065 | 145 | 1100101 | — | LATIN SMALL LETTER E |
| f | 102 | 0066 | 146 | 1100110 | — | LATIN SMALL LETTER F |
| g | 103 | 0067 | 147 | 1100111 | — | LATIN SMALL LETTER G |
| h | 104 | 0068 | 150 | 1101000 | — | LATIN SMALL LETTER H |
| i | 105 | 0069 | 151 | 1101001 | — | LATIN SMALL LETTER I |
| j | 106 | 006A | 152 | 1101010 | — | LATIN SMALL LETTER J |
| k | 107 | 006B | 153 | 1101011 | — | LATIN SMALL LETTER K |
| l | 108 | 006C | 154 | 1101100 | — | LATIN SMALL LETTER L |
| m | 109 | 006D | 155 | 1101101 | — | LATIN SMALL LETTER M |
| n | 110 | 006E | 156 | 1101110 | — | LATIN SMALL LETTER N |
| o | 111 | 006F | 157 | 1101111 | — | LATIN SMALL LETTER O |
| p | 112 | 0070 | 160 | 1110000 | — | LATIN SMALL LETTER P |
| q | 113 | 0071 | 161 | 1110001 | — | LATIN SMALL LETTER Q |
| r | 114 | 0072 | 162 | 1110010 | — | LATIN SMALL LETTER R |
| s | 115 | 0073 | 163 | 1110011 | — | LATIN SMALL LETTER S |
| t | 116 | 0074 | 164 | 1110100 | — | LATIN SMALL LETTER T |
| u | 117 | 0075 | 165 | 1110101 | — | LATIN SMALL LETTER U |
| v | 118 | 0076 | 166 | 1110110 | — | LATIN SMALL LETTER V |
| w | 119 | 0077 | 167 | 1110111 | — | LATIN SMALL LETTER W |
| x | 120 | 0078 | 170 | 1111000 | — | LATIN SMALL LETTER X |
| y | 121 | 0079 | 171 | 1111001 | — | LATIN SMALL LETTER Y |
| z | 122 | 007A | 172 | 1111010 | — | LATIN SMALL LETTER Z |
| { | 123 | 007B | 173 | 1111011 | — | LEFT CURLY BRACKET |
| | | 124 | 007C | 174 | 1111100 | — | VERTICAL LINE |
| } | 125 | 007D | 175 | 1111101 | — | RIGHT CURLY BRACKET |
| ~ | 126 | 007E | 176 | 1111110 | — | TILDE |
DEL (127)
Codepoint 127 is the Delete character (DEL). Like the control codes, it is non-printable. It was historically used on paper tape to delete a character by punching all seven bits — all ones in binary (1111111). On modern systems it is rarely encountered directly but appears in some terminal emulators as the backspace key code.
| Dec | Hex | Oct | Bin | Abbr | Name |
|---|---|---|---|---|---|
| 127 | 7F | 177 | 1111111 | DEL | Delete |
ASCII FAQ
Is ASCII the same as UTF-8?
For the 128 ASCII characters, yes — the byte values are identical. UTF-8 was deliberately designed to be ASCII-compatible: any ASCII file is a valid UTF-8 file. The difference is that UTF-8 extends beyond 127 using multi-byte sequences, while ASCII stops at 127.
Why do uppercase and lowercase letters differ by 32?
It was intentional. Uppercase A is 65 (1000001) and lowercase a is 97 (1100001). They differ only in bit 5 (0-indexed). This means you can toggle case by XORing with 32, or convert to lowercase by ORing with 32 — a trick that worked on early hardware without conditional logic.
What is the difference between LF and CRLF?
LF (Line Feed, code 10, \n) moves the cursor down one line. CR (Carriage Return, code 13, \r) moves it to the start of the line. Unix systems use LF alone for newlines. Windows uses CRLF (both, in sequence). Classic Mac OS used CR alone. This is the source of the "line ending" differences that break text files across operating systems.
Why does ASCII only go to 127?
ASCII uses 7 bits, which allows 27 = 128 values (0–127). The eighth bit was reserved for parity checking in serial transmission. When extended encodings like Latin-1 needed more characters, they used the eighth bit to reach 256 values (0–255). This is why Latin-1 is a direct superset of ASCII.