ASCII Table Query
Complete ASCII character code reference with control, printable, and extended characters
| Decimal | Hex | Character | Description | |
|---|---|---|---|---|
| 0 | 0x00 | - | Null character | |
| 1 | 0x01 | - | Start of Heading | |
| 2 | 0x02 | - | Start of Text | |
| 3 | 0x03 | - | End of Text | |
| 4 | 0x04 | - | End of Transmission | |
| 5 | 0x05 | - | Enquiry | |
| 6 | 0x06 | - | Acknowledge | |
| 7 | 0x07 | - | Bell | |
| 8 | 0x08 | - | Backspace | |
| 9 | 0x09 | - | Horizontal Tab | |
| 10 | 0x0A | - | Line Feed | |
| 11 | 0x0B | - | Vertical Tab | |
| 12 | 0x0C | - | Form Feed | |
| 13 | 0x0D | - | Carriage Return | |
| 14 | 0x0E | - | Shift Out | |
| 15 | 0x0F | - | Shift In | |
| 16 | 0x10 | - | Data Link Escape | |
| 17 | 0x11 | - | Device Control 1 | |
| 18 | 0x12 | - | Device Control 2 | |
| 19 | 0x13 | - | Device Control 3 | |
| 20 | 0x14 | - | Device Control 4 | |
| 21 | 0x15 | - | Negative Acknowledge | |
| 22 | 0x16 | - | Synchronous Idle | |
| 23 | 0x17 | - | End of Transmission Block | |
| 24 | 0x18 | - | Cancel | |
| 25 | 0x19 | - | End of Medium | |
| 26 | 0x1A | - | Substitute | |
| 27 | 0x1B | - | Escape | |
| 28 | 0x1C | - | File Separator | |
| 29 | 0x1D | - | Group Separator | |
| 30 | 0x1E | - | Record Separator | |
| 31 | 0x1F | - | Unit Separator | |
| 127 | 0x7F | - | Delete | |
| 32 | 0x20 | ␣ | Space | |
| 33 | 0x21 | ! | Exclamation mark | |
| 34 | 0x22 | " | Double quote | |
| 35 | 0x23 | # | Number sign | |
| 36 | 0x24 | $ | Dollar sign | |
| 37 | 0x25 | % | Percent sign | |
| 38 | 0x26 | & | Ampersand | |
| 39 | 0x27 | ' | Single quote | |
| 40 | 0x28 | ( | Left parenthesis | |
| 41 | 0x29 | ) | Right parenthesis | |
| 42 | 0x2A | * | Asterisk | |
| 43 | 0x2B | + | Plus sign | |
| 44 | 0x2C | , | Comma | |
| 45 | 0x2D | - | Hyphen | |
| 46 | 0x2E | . | Period | |
| 47 | 0x2F | / | Slash | |
| 48 | 0x30 | 0 | Digit 0 | |
| 49 | 0x31 | 1 | Digit 1 | |
| 50 | 0x32 | 2 | Digit 2 | |
| 51 | 0x33 | 3 | Digit 3 | |
| 52 | 0x34 | 4 | Digit 4 | |
| 53 | 0x35 | 5 | Digit 5 | |
| 54 | 0x36 | 6 | Digit 6 | |
| 55 | 0x37 | 7 | Digit 7 | |
| 56 | 0x38 | 8 | Digit 8 | |
| 57 | 0x39 | 9 | Digit 9 | |
| 58 | 0x3A | : | Colon | |
| 59 | 0x3B | ; | Semicolon | |
| 60 | 0x3C | < | Less than | |
| 61 | 0x3D | = | Equal sign | |
| 62 | 0x3E | > | Greater than | |
| 63 | 0x3F | ? | Question mark | |
| 64 | 0x40 | @ | At sign | |
| 65 | 0x41 | A | Uppercase A | |
| 66 | 0x42 | B | Uppercase B | |
| 67 | 0x43 | C | Uppercase C | |
| 68 | 0x44 | D | Uppercase D | |
| 69 | 0x45 | E | Uppercase E | |
| 70 | 0x46 | F | Uppercase F | |
| 71 | 0x47 | G | Uppercase G | |
| 72 | 0x48 | H | Uppercase H | |
| 73 | 0x49 | I | Uppercase I | |
| 74 | 0x4A | J | Uppercase J | |
| 75 | 0x4B | K | Uppercase K | |
| 76 | 0x4C | L | Uppercase L | |
| 77 | 0x4D | M | Uppercase M | |
| 78 | 0x4E | N | Uppercase N | |
| 79 | 0x4F | O | Uppercase O | |
| 80 | 0x50 | P | Uppercase P | |
| 81 | 0x51 | Q | Uppercase Q | |
| 82 | 0x52 | R | Uppercase R | |
| 83 | 0x53 | S | Uppercase S | |
| 84 | 0x54 | T | Uppercase T | |
| 85 | 0x55 | U | Uppercase U | |
| 86 | 0x56 | V | Uppercase V | |
| 87 | 0x57 | W | Uppercase W | |
| 88 | 0x58 | X | Uppercase X | |
| 89 | 0x59 | Y | Uppercase Y | |
| 90 | 0x5A | Z | Uppercase Z | |
| 91 | 0x5B | [ | Left bracket | |
| 92 | 0x5C | \ | Backslash | |
| 93 | 0x5D | ] | Right bracket | |
| 94 | 0x5E | ^ | Caret | |
| 95 | 0x5F | _ | Underscore | |
| 96 | 0x60 | ` | Grave accent | |
| 97 | 0x61 | a | Lowercase a | |
| 98 | 0x62 | b | Lowercase b | |
| 99 | 0x63 | c | Lowercase c | |
| 100 | 0x64 | d | Lowercase d | |
| 101 | 0x65 | e | Lowercase e | |
| 102 | 0x66 | f | Lowercase f | |
| 103 | 0x67 | g | Lowercase g | |
| 104 | 0x68 | h | Lowercase h | |
| 105 | 0x69 | i | Lowercase i | |
| 106 | 0x6A | j | Lowercase j | |
| 107 | 0x6B | k | Lowercase k | |
| 108 | 0x6C | l | Lowercase l | |
| 109 | 0x6D | m | Lowercase m | |
| 110 | 0x6E | n | Lowercase n | |
| 111 | 0x6F | o | Lowercase o | |
| 112 | 0x70 | p | Lowercase p | |
| 113 | 0x71 | q | Lowercase q | |
| 114 | 0x72 | r | Lowercase r | |
| 115 | 0x73 | s | Lowercase s | |
| 116 | 0x74 | t | Lowercase t | |
| 117 | 0x75 | u | Lowercase u | |
| 118 | 0x76 | v | Lowercase v | |
| 119 | 0x77 | w | Lowercase w | |
| 120 | 0x78 | x | Lowercase x | |
| 121 | 0x79 | y | Lowercase y | |
| 122 | 0x7A | z | Lowercase z | |
| 123 | 0x7B | { | Left brace | |
| 124 | 0x7C | | | Vertical bar | |
| 125 | 0x7D | } | Right brace | |
| 126 | 0x7E | ~ | Tilde | |
| 128 | 0x80 | | ||
| 129 | 0x81 | | ||
| 130 | 0x82 | | ||
| 131 | 0x83 | | ||
| 132 | 0x84 | | ||
| 133 | 0x85 | |||
| 134 | 0x86 | | ||
| 135 | 0x87 | | ||
| 136 | 0x88 | | ||
| 137 | 0x89 | | ||
| 138 | 0x8A | | ||
| 139 | 0x8B | | ||
| 140 | 0x8C | | ||
| 141 | 0x8D | | ||
| 142 | 0x8E | | ||
| 143 | 0x8F | | ||
| 144 | 0x90 | | ||
| 145 | 0x91 | | ||
| 146 | 0x92 | | ||
| 147 | 0x93 | | ||
| 148 | 0x94 | | ||
| 149 | 0x95 | | ||
| 150 | 0x96 | | ||
| 151 | 0x97 | | ||
| 152 | 0x98 | | ||
| 153 | 0x99 | | ||
| 154 | 0x9A | | ||
| 155 | 0x9B | | ||
| 156 | 0x9C | | ||
| 157 | 0x9D | | ||
| 158 | 0x9E | | ||
| 159 | 0x9F | | ||
| 160 | 0xA0 | |||
| 161 | 0xA1 | ¡ | ||
| 162 | 0xA2 | ¢ | ||
| 163 | 0xA3 | £ | ||
| 164 | 0xA4 | ¤ | ||
| 165 | 0xA5 | ¥ | ||
| 166 | 0xA6 | ¦ | ||
| 167 | 0xA7 | § | ||
| 168 | 0xA8 | ¨ | ||
| 169 | 0xA9 | © | ||
| 170 | 0xAA | ª | ||
| 171 | 0xAB | « | ||
| 172 | 0xAC | ¬ | ||
| 173 | 0xAD | | ||
| 174 | 0xAE | ® | ||
| 175 | 0xAF | ¯ | ||
| 176 | 0xB0 | ° | ||
| 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 | ¿ | ||
| 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 | ß | ||
| 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 | ü | ||
| 253 | 0xFD | ý | ||
| 254 | 0xFE | þ | ||
| 255 | 0xFF | ÿ |
What is ASCII?
ASCII (American Standard Code for Information Interchange) is a character encoding standard based on the Latin alphabet. Originally developed for telegraph communication in the 1960s, it became the foundation of character encoding in computing. Standard ASCII contains 128 characters (0-127), including 33 control characters and 95 printable characters. Extended ASCII (128-255) adds another 128 characters for symbols and international characters, though encoding varies by region. An ASCII table earns its place during encoding debugging, control-character checks, protocol work, escape-sequence lookup, terminal behavior analysis, and older file-format inspection. Decimal, hexadecimal, and binary values show how a character is actually stored or transmitted. Modern text usually uses Unicode, so ASCII represents only the historical 7-bit core. For international characters, emoji, typography marks, and mixed-language text, Unicode code points and encoding rules still need to be checked separately.
How to Use
Basic Operations
- Click any value or character to copy it
- Use the search box to quickly find specific characters
- Click category buttons to filter by character type
- Hover over characters to see detailed descriptions
Encoding Notes
- ASCII only covers the 0-127 character range; accented letters, emoji, and most non-English text require Unicode encodings such as UTF-8.
- Control characters may not display visibly, but they can still affect files, terminals, protocols, and copy-pasted text.
Use Cases
Technical Principle
ASCII (American Standard Code for Information Interchange, ANSI X3.4-1968, ISO/IEC 646:1991 IRV) is a 7-bit character encoding that assigns numeric codes 0-127 to 128 characters. The lower 32 codes (0x00-0x1F) plus 0x7F are control characters inherited from teletypes: NUL (0x00), BEL (0x07, the alert beep), LF (0x0A, line feed), CR (0x0D, carriage return), ESC (0x1B), DEL (0x7F), and so on. Codes 0x20-0x7E are printable: space, the digits 0-9 at 0x30-0x39, the uppercase letters A-Z at 0x41-0x5A, the lowercase letters a-z at 0x61-0x7A, and punctuation between them. The encoding has a deliberately regular structure. The digits are clustered: '0' = 0x30, '1' = 0x31, ..., '9' = 0x39. Converting a digit character to its numeric value is `code - 0x30`. The letters are also clustered: 'A' = 0x41, 'B' = 0x42, ..., 'Z' = 0x5A, and 'a' = 0x61, ..., 'z' = 0x7A. The difference between uppercase and lowercase for the same letter is 0x20 (32), which is exactly one bit set in position 5 (1 << 5 = 32). That makes case conversion a single XOR or OR/AND with 0x20: `code ^ 0x20` flips case, `code | 0x20` lowercases, `code & 0x5F` (= `code & ~0x20`) uppercases. This bit-trick is the fastest possible case conversion and shows up in strlen/strcmp implementations for ASCII-only strings. ASCII was designed for 7-bit teletypes and the 5-level Baudot code that preceded it, so it predates 8-bit bytes. The 8-bit 'extended ASCII' range (0x80-0xFF) was never standardised, which is why so many code pages (ISO 8859-1 Latin-1, Windows-1252, MacRoman, KOI8-R, IBM437) competed for the high half. ISO 8859-1 (Latin-1) was the closest thing to a standard, but even it lacked the Euro sign until ISO 8859-15. The C1 control range (0x80-0x9F) was supposed to be reserved (ISO 6429), but Windows-1252 reused some of it for printable characters — a long-running interoperability pain point that UTF-8 finally resolved. UTF-8 (RFC 3629, 2003) was designed by Rob Pike and Ken Thompson in 1992 as a backward-compatible superset: the 128 ASCII codes encode to themselves as single bytes (0x00-0x7F), so any ASCII text is also a valid UTF-8 text. Codes above 0x7F use 2-, 3-, or 4-byte sequences with specific bit patterns (110xxxxx 10xxxxxx, 1110xxxx 10xxxxxx 10xxxxxx, 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx) so a decoder can resync byte-by-byte after an error. EBCDIC, by contrast, was IBM's 8-bit mainframe encoding (8-bit EBCDIC was 8-bit, not 7-bit like ASCII) and assigns letters to non-contiguous code points ('A' = 0xC1, 'I' = 0xC9, 'J' = 0xD1, ..., with gaps that hurt bit-tricks and string algorithms). National variants of ISO 646 replaced a small set of ASCII characters with country-specific letters. For example, the UK variant replaced 0x23 (the American '#') with the pound sign '£', and the German variant replaced some punctuation with umlauts. This is why C's locale settings and POSIX charmap files were historically important — they mapped between the IRV (International Reference Version) and national variants. The escape from this mess is Unicode / UTF-8, which makes the entire 7-bit and 8-bit debate obsolete for any new project.
- ASCII (ANSI X3.4-1968, ISO/IEC 646 IRV) uses 7 bits per character with 128 code points: 33 control characters (0x00-0x1F, 0x7F) and 95 printable characters (0x20-0x7E).
- Control characters (0x00-0x1F, 0x7F) were inherited from teletypes: NUL, BEL (0x07, alert beep), LF (0x0A), CR (0x0D), ESC (0x1B), DEL (0x7F). Modern text still uses LF and CR; the rest are mostly history.
- Printable layout: space (0x20), digits '0'-'9' (0x30-0x39), uppercase 'A'-'Z' (0x41-0x5A), lowercase 'a'-'z' (0x61-0x7A), punctuation in between. Converting '5' to 5 is `code - 0x30`; upper-to-lower is `code | 0x20`.
- Case conversion is a single bit op: XOR 0x20 flips case; OR 0x20 lowercases; AND 0x5F (= `code & ~0x20`) uppercases. This is the fastest case conversion in any language and is how strlen/strcmp work on ASCII-only buffers.
- 8-bit extensions (0x80-0xFF) were never standardised, so Windows-1252, ISO-8859-1, MacRoman, KOI8-R, IBM437 all defined the high half differently. Windows-1252 won on the web and is the de-facto 'extended ASCII' most legacy code uses.
- UTF-8 (RFC 3629, Pike & Thompson 1992) is a strict superset of ASCII: the 128 ASCII code points encode as themselves in 1 byte; code points above U+007F use 2-4 bytes with 110xxxxx 10xxxxxx continuation bytes, so decoders can resync byte-by-byte after errors.
- EBCDIC (IBM, 1960s mainframes) is the 8-bit alternative to ASCII used on IBM z/OS. Letter positions are not contiguous ('A'=0xC1, 'I'=0xC9, 'J'=0xD1), so the ASCII case-conversion trick does not work and bit-shift algorithms like tolower() need table lookups.
- ISO 646 national variants (UK, German, Swedish, etc.) replaced a small set of ASCII characters with country-specific letters: the UK variant swapped '#' for '£' at 0x23, the German variant swapped punctuation for umlauts. Pre-Unicode localisation in a nutshell.
Examples
Quick character lookup
Character: 'A'
Decimal: 65
Hex: 0x41
Binary: 01000001
Octal: 0101
C escape: \x41 ('\x41' in C / C++ / Python / JavaScript)
Difference between upper and lower case is 0x20 (32 decimal):
'a' = 0x61 (97) = 'A' (0x41) + 0x20
'A' = 0x41 (65) = 'a' (0x61) - 0x20
This is why toggling bit 5 (mask 0x20) flips the case of a letter.
ch ^ 0x20 flips A <-> a (works for A-Z, a-z, leaves others unchanged)Debugging newline issues
LF (0x0A, decimal 10) - Unix, Linux, modern macOS '\n'
CR (0x0D, decimal 13) - classic Mac OS (pre-OS X), some network protocols '\r'
CRLF (0x0D 0x0A, '13 10') - Windows, HTTP, SMTP, FTP '\r\n'
Hex dump of a Windows-saved 'hi\r\n' file:
0000: 68 69 0d 0a hi..
Hex dump of the same content saved on Linux ('hi\n'):
0000: 68 69 0a hi.
Effect on line count:
$ wc -l windows.txt unix.txt
1 windows.txt (1 newline, 0x0D 0x0A)
1 unix.txt (1 newline, 0x0A)
The byte count differs (4 vs 3) and tools like dos2unix detect by
scanning for 0x0D 0x0A pairs and stripping the 0x0D.URL encoding reference
RFC 3986 unreserved + reserved set (must percent-encode the rest):
unreserved A-Z a-z 0-9 - _ . ~
reserved ! * ' ( ) ; : @ & = + $ , / ? # [ ]
encode everything else as %HH, where HH is the 2-digit uppercase hex
Common characters:
space 0x20 -> %20 (or '+' inside application/x-www-form-urlencoded)
! 0x21 -> %21
" 0x22 -> %22
# 0x23 -> %23
$ 0x24 -> %24
% 0x25 -> %25
& 0x26 -> %26 (separator in query strings - always encode inside values)
' 0x27 -> %27
( 0x28 -> %28
) 0x29 -> %29
+ 0x2B -> %2B (or %20 in form bodies; '+' means space there)
, 0x2C -> %2C
/ 0x2F -> %2F (reserved in path, often safe in query)
: 0x3A -> %3A
; 0x3B -> %3B
= 0x3D -> %3D
? 0x3F -> %3F
@ 0x40 -> %40
Example: https://example.com/path with space and ampersand
Encoded: https://example.com/path%20with%20space%20%26%20ampersandControl character escapes and regex metacharacters
Common control codes and their escape forms in C / Python / JavaScript strings:
NUL 0x00 '\0' (string terminator in C)
BEL 0x07 '\a' (terminal bell)
BS 0x08 '\b' (backspace)
TAB 0x09 '\t' (horizontal tab)
LF 0x0A '\n' (newline)
VT 0x0B '\v' (vertical tab)
FF 0x0C '\f' (form feed)
CR 0x0D '\r' (carriage return)
ESC 0x1B '\x1b' / '\e' (POSIX) (start of escape sequence)
DEL 0x7F '\x7f' (delete)
Regex metacharacters that must be escaped with \:
^ $ . | ? * + ( ) [ ] { } \
JavaScript snippet that mirrors the table above:
const ctrl = { 0:'NUL', 9:'TAB', 10:'LF', 13:'CR', 27:'ESC', 32:'SP', 127:'DEL' };
for (const [code, name] of Object.entries(ctrl)) {
console.log(`${code.toString().padStart(3)} 0x${(+code).toString(16).padStart(2,'0')} ${name}`);
}
// -> ' 0x20 SP' 0a LF 0d CR etc.FAQ
How big is the ASCII table?
Standard ASCII has 128 code points (0-127): 33 control characters (0-31 plus 127 DEL) and 95 printable characters (space through ~). 'Extended ASCII' refers to various 256-code-point single-byte encodings like Windows-1252 or ISO-8859-1, which are not actually ASCII.
Why is character 32 listed as 'Space' instead of a visible glyph?
Code point 32 (0x20) is the literal space character. It is printable but invisible. The page shows the label 'SP' or 'Space' so you can copy it; clicking the row still copies a real space character to the clipboard.
What are the first 32 ASCII codes for?
They are control characters from teleprinter days: TAB (9), LF (10), CR (13), ESC (27), and others. Modern software still uses TAB, LF, CR, and NUL (0); the rest (BEL, ACK, ENQ, etc.) are mostly historical and only appear in serial protocols and binary file headers.
Is ASCII the same as UTF-8?
ASCII is a 7-bit encoding for English. UTF-8 is a variable-length encoding that is byte-compatible with ASCII for the first 128 code points - so any pure-ASCII file is also valid UTF-8. UTF-8 extends with 2-4 byte sequences to cover the rest of Unicode.
How do I convert between decimal, hex, and binary for a character?
Pick a row to see all four representations. For example, 'A' is decimal 65, hex 0x41, octal 0101, binary 01000001. The Char column is the literal glyph and the Description column gives the official Unicode name.
Why doesn't this table list é, ñ, or 中?
Those characters are outside the ASCII range. é and ñ are in Latin-1 (codepoints 233 and 241); 中 is in CJK Unified Ideographs (U+4E2D). Use a Unicode lookup tool for them - ASCII only goes up to 127.
How do I type a character if I only know its ASCII code?
On Windows, hold Alt and type the decimal code on the numeric keypad (Alt+65 for A). On macOS and Linux, paste from this table or use the input method's hex code feature. In code, use \xNN (hex), \NNN (octal), or chr(N) (Python) and String.fromCharCode(N) (JavaScript).