ASCII table
ASCII has 128 codes, 0 to 127: 33 control characters and 95 printable ones, with the space at 32 counted among the printable. Capital A is 65 and lower-case a is 97, so the case bit is the difference of 32 — a single bit, which is why toggling case was once a bitwise operation rather than a lookup.
All 128 codes in decimal, hex, octal and binary, with every control character named and the escape sequence a C-family language writes it as. 95 are printable and 33 are control codes — and the two that surprise people are that the space is in the first group and DEL is in the second.
Codes checked against RFC 20 and the Unicode Basic Latin chart · How we check
Printable characters, 32 to 126
| Char | Dec | Hex | Oct | Binary |
|---|---|---|---|---|
| space | 32 | 20 | 040 | 0100000 |
| ! | 33 | 21 | 041 | 0100001 |
| " | 34 | 22 | 042 | 0100010 |
| # | 35 | 23 | 043 | 0100011 |
| $ | 36 | 24 | 044 | 0100100 |
| % | 37 | 25 | 045 | 0100101 |
| & | 38 | 26 | 046 | 0100110 |
| ' | 39 | 27 | 047 | 0100111 |
| ( | 40 | 28 | 050 | 0101000 |
| ) | 41 | 29 | 051 | 0101001 |
| * | 42 | 2A | 052 | 0101010 |
| + | 43 | 2B | 053 | 0101011 |
| , | 44 | 2C | 054 | 0101100 |
| - | 45 | 2D | 055 | 0101101 |
| . | 46 | 2E | 056 | 0101110 |
| / | 47 | 2F | 057 | 0101111 |
| 0 | 48 | 30 | 060 | 0110000 |
| 1 | 49 | 31 | 061 | 0110001 |
| 2 | 50 | 32 | 062 | 0110010 |
| 3 | 51 | 33 | 063 | 0110011 |
| 4 | 52 | 34 | 064 | 0110100 |
| 5 | 53 | 35 | 065 | 0110101 |
| 6 | 54 | 36 | 066 | 0110110 |
| 7 | 55 | 37 | 067 | 0110111 |
| 8 | 56 | 38 | 070 | 0111000 |
| 9 | 57 | 39 | 071 | 0111001 |
| : | 58 | 3A | 072 | 0111010 |
| ; | 59 | 3B | 073 | 0111011 |
| < | 60 | 3C | 074 | 0111100 |
| = | 61 | 3D | 075 | 0111101 |
| > | 62 | 3E | 076 | 0111110 |
| ? | 63 | 3F | 077 | 0111111 |
| @ | 64 | 40 | 100 | 1000000 |
| A | 65 | 41 | 101 | 1000001 |
| B | 66 | 42 | 102 | 1000010 |
| C | 67 | 43 | 103 | 1000011 |
| D | 68 | 44 | 104 | 1000100 |
| E | 69 | 45 | 105 | 1000101 |
| F | 70 | 46 | 106 | 1000110 |
| G | 71 | 47 | 107 | 1000111 |
| H | 72 | 48 | 110 | 1001000 |
| I | 73 | 49 | 111 | 1001001 |
| J | 74 | 4A | 112 | 1001010 |
| K | 75 | 4B | 113 | 1001011 |
| L | 76 | 4C | 114 | 1001100 |
| M | 77 | 4D | 115 | 1001101 |
| N | 78 | 4E | 116 | 1001110 |
| O | 79 | 4F | 117 | 1001111 |
| P | 80 | 50 | 120 | 1010000 |
| Q | 81 | 51 | 121 | 1010001 |
| R | 82 | 52 | 122 | 1010010 |
| S | 83 | 53 | 123 | 1010011 |
| T | 84 | 54 | 124 | 1010100 |
| U | 85 | 55 | 125 | 1010101 |
| V | 86 | 56 | 126 | 1010110 |
| W | 87 | 57 | 127 | 1010111 |
| X | 88 | 58 | 130 | 1011000 |
| Y | 89 | 59 | 131 | 1011001 |
| Z | 90 | 5A | 132 | 1011010 |
| [ | 91 | 5B | 133 | 1011011 |
| \ | 92 | 5C | 134 | 1011100 |
| ] | 93 | 5D | 135 | 1011101 |
| ^ | 94 | 5E | 136 | 1011110 |
| _ | 95 | 5F | 137 | 1011111 |
| ` | 96 | 60 | 140 | 1100000 |
| a | 97 | 61 | 141 | 1100001 |
| b | 98 | 62 | 142 | 1100010 |
| c | 99 | 63 | 143 | 1100011 |
| d | 100 | 64 | 144 | 1100100 |
| e | 101 | 65 | 145 | 1100101 |
| f | 102 | 66 | 146 | 1100110 |
| g | 103 | 67 | 147 | 1100111 |
| h | 104 | 68 | 150 | 1101000 |
| i | 105 | 69 | 151 | 1101001 |
| j | 106 | 6A | 152 | 1101010 |
| k | 107 | 6B | 153 | 1101011 |
| l | 108 | 6C | 154 | 1101100 |
| m | 109 | 6D | 155 | 1101101 |
| n | 110 | 6E | 156 | 1101110 |
| o | 111 | 6F | 157 | 1101111 |
| p | 112 | 70 | 160 | 1110000 |
| q | 113 | 71 | 161 | 1110001 |
| r | 114 | 72 | 162 | 1110010 |
| s | 115 | 73 | 163 | 1110011 |
| t | 116 | 74 | 164 | 1110100 |
| u | 117 | 75 | 165 | 1110101 |
| v | 118 | 76 | 166 | 1110110 |
| w | 119 | 77 | 167 | 1110111 |
| x | 120 | 78 | 170 | 1111000 |
| y | 121 | 79 | 171 | 1111001 |
| z | 122 | 7A | 172 | 1111010 |
| { | 123 | 7B | 173 | 1111011 |
| | | 124 | 7C | 174 | 1111100 |
| } | 125 | 7D | 175 | 1111101 |
| ~ | 126 | 7E | 176 | 1111110 |
Control characters, 0 to 31 and 127
None of these has a glyph. Most are dead conventions from teleprinters and paper tape; about six are still load-bearing in software written today.
| Dec | Hex | Name | Escape | Still matters because |
|---|---|---|---|---|
| 0 | 00 | NUL — null | \0 | Ends a string in C. A byte of zero, not the digit 0. |
| 1 | 01 | SOH — start of heading | ||
| 2 | 02 | STX — start of text | ||
| 3 | 03 | ETX — end of text | ||
| 4 | 04 | EOT — end of transmission | ||
| 5 | 05 | ENQ — enquiry | ||
| 6 | 06 | ACK — acknowledge | ||
| 7 | 07 | BEL — bell | \a | Rang the teleprinter bell. Terminals still beep on it. |
| 8 | 08 | BS — backspace | \b | |
| 9 | 09 | HT — horizontal tab | \t | |
| 10 | 0A | LF — line feed | \n | A newline on Unix and macOS. Windows writes CR LF, which is why a file moved between them grows or shrinks by one byte a line. |
| 11 | 0B | VT — vertical tab | \v | |
| 12 | 0C | FF — form feed | \f | A page break to a printer. |
| 13 | 0D | CR — carriage return | \r | Returns to column one without advancing. Alone it is a classic mangled-file symptom. |
| 14 | 0E | SO — shift out | ||
| 15 | 0F | SI — shift in | ||
| 16 | 10 | DLE — data link escape | ||
| 17 | 11 | DC1 — device control 1 | ||
| 18 | 12 | DC2 — device control 2 | ||
| 19 | 13 | DC3 — device control 3 | ||
| 20 | 14 | DC4 — device control 4 | ||
| 21 | 15 | NAK — negative acknowledge | ||
| 22 | 16 | SYN — synchronous idle | ||
| 23 | 17 | ETB — end of block | ||
| 24 | 18 | CAN — cancel | ||
| 25 | 19 | EM — end of medium | ||
| 26 | 1A | SUB — substitute | ||
| 27 | 1B | ESC — escape | \e | Opens an ANSI escape sequence — every terminal colour starts here. |
| 28 | 1C | FS — file separator | ||
| 29 | 1D | GS — group separator | ||
| 30 | 1E | RS — record separator | ||
| 31 | 1F | US — unit separator | ||
| 127 | 7F | DEL — delete | Not a control code by position: it is all bits set, which is what punching out every hole on a paper tape produced. |
Questions people actually ask
- How many characters are in ASCII?
- 128, numbered 0 to 127, of which 33 are control characters — 0 to 31 plus DEL at 127 — and 95 are printable, counting the space. Anything numbered above 127 is not ASCII: it belongs to whatever code page or encoding is in use, which is why the same byte shows as é, ‚ or † depending on where the file is opened.
- Why is DEL 127 rather than 0?
- Because ASCII was designed for paper tape. 127 is 1111111 — every bit set — so a character could be deleted by punching out all seven holes over whatever was already there. There was no way to un-punch a hole, so the delete code had to be the one that overwrites everything.
- Is the space a control character?
- No. Space is code 32 and is the first printable character; it simply has no ink. DEL at 127 is the control character that sits above every graphic one. Hand-written tables regularly get both backwards.
- What is the difference between ASCII and UTF-8?
- For the first 128 codes, nothing — UTF-8 encodes them as a single byte with the same value, which is why ASCII text is valid UTF-8 unchanged. Above 127 they diverge completely: UTF-8 uses two to four bytes and covers every script, while ASCII stops.
- Why is the difference between A and a exactly 32?
- Because 32 is bit 5, and the alphabet was laid out so that case is a single bit. A is 1000001 and a is 1100001, so changing case is one XOR — which is how every C library implemented toupper for thirty years.
Cite this page
- APA
- Rule Calculator. (2026). ASCII Table. Rule Calculator. https://rulecalculators.com/ascii-table
- MLA
- "ASCII Table." Rule Calculator, August 16, 2026, https://rulecalculators.com/ascii-table.
- Chicago
- Rule Calculator. "ASCII Table." Rule Calculator. Last reviewed August 16, 2026. https://rulecalculators.com/ascii-table.
The date is when the figures on this page were last checked against their source, not the day you opened it. Add your own access date if your style needs one.