ASCII Table Reference
The full 128-character ASCII table with decimal, hexadecimal, octal and binary values, control character names and notes on how the layout works.
By the tools4free.dev team · Last reviewed 4 December 2026
How to read this reference
ASCII, the American Standard Code for Information Interchange, assigns a number from 0 to 127 to each of 128 characters. It was standardised as ANSI X3.4 and is described for internet use in RFC 20. Seven bits are enough to hold every code, and in practice each one is stored in a byte whose top bit is zero. Modern encodings such as UTF-8 keep ASCII unchanged: the first 128 Unicode code points are the ASCII characters, and a UTF-8 byte below 128 means the same thing in both.
The table below is split into four blocks of 32 codes. Each row shows the code in decimal, hexadecimal, octal and 8-bit binary, then the character and a description. Codes 0 to 31 and 127 are control characters: they do not print but control devices and data flow, and they are listed by their standard abbreviations. Codes 32 to 126 are the printable characters: the space, digits, punctuation and letters.
The values in these tables were generated by a program from the code number itself, so the four number bases always agree. To convert any value yourself, use the number base converter. To look up what a key press produces, see the key codes tool, to inspect raw bytes use the hex dump tool, and for characters such as & and < in HTML see the HTML entities tool.
Patterns worth knowing
- Upper and lower case differ by one bit. A lowercase letter is its uppercase letter plus 32. In binary, only bit 5 (value 32) changes: A is 01000001 and a is 01100001. To change case in code, flip that bit.
- Digits map to their value. The code of a digit minus 48 is its numeric value: 7 is code 55, and 55 − 48 = 7. The low four bits of a digit code are the digit itself.
- Control codes sit 64 below the letters. Pressing Ctrl with a letter produces the control code with that letter's low five bits. Ctrl+G sends code 7 (BEL), Ctrl+I sends 9 (HT, tab), Ctrl+J sends 10 (LF) and Ctrl+[ sends 27 (ESC).
- The printable range is 32 to 126. Code 127 (DEL) is a control character.
Control characters, 0 to 31
These codes come from teleprinters and paper tape. A few remain in everyday use: tab (9), line feed (10), carriage return (13), escape (27) and null (0). Different systems end lines differently: Unix uses LF alone, Windows uses CR followed by LF, and classic Mac OS used CR alone.
| Dec | Hex | Oct | Binary | Char | Description |
|---|---|---|---|---|---|
| 0 | 00 | 000 | 00000000 | NUL | Null. Null character; ends strings in C |
| 1 | 01 | 001 | 00000001 | SOH | Start of Heading |
| 2 | 02 | 002 | 00000010 | STX | Start of Text |
| 3 | 03 | 003 | 00000011 | ETX | End of Text. Ctrl+C in many terminals |
| 4 | 04 | 004 | 00000100 | EOT | End of Transmission. Ctrl+D signals end of input on Unix |
| 5 | 05 | 005 | 00000101 | ENQ | Enquiry |
| 6 | 06 | 006 | 00000110 | ACK | Acknowledge. Positive acknowledgement |
| 7 | 07 | 007 | 00000111 | BEL | Bell. Rings the terminal bell or beeps |
| 8 | 08 | 010 | 00001000 | BS | Backspace. Moves back one position |
| 9 | 09 | 011 | 00001001 | HT | Horizontal Tab. The tab character, \t |
| 10 | 0A | 012 | 00001010 | LF | Line Feed. Newline on Unix, \n |
| 11 | 0B | 013 | 00001011 | VT | Vertical Tab |
| 12 | 0C | 014 | 00001100 | FF | Form Feed. Page break, \f |
| 13 | 0D | 015 | 00001101 | CR | Carriage Return. Return to line start, \r. Windows line ends use CR LF |
| 14 | 0E | 016 | 00001110 | SO | Shift Out |
| 15 | 0F | 017 | 00001111 | SI | Shift In |
| 16 | 10 | 020 | 00010000 | DLE | Data Link Escape |
| 17 | 11 | 021 | 00010001 | DC1 | Device Control 1. XON, resumes output (Ctrl+Q) |
| 18 | 12 | 022 | 00010010 | DC2 | Device Control 2 |
| 19 | 13 | 023 | 00010011 | DC3 | Device Control 3. XOFF, pauses output (Ctrl+S) |
| 20 | 14 | 024 | 00010100 | DC4 | Device Control 4 |
| 21 | 15 | 025 | 00010101 | NAK | Negative Acknowledge |
| 22 | 16 | 026 | 00010110 | SYN | Synchronous Idle |
| 23 | 17 | 027 | 00010111 | ETB | End of Transmission Block |
| 24 | 18 | 030 | 00011000 | CAN | Cancel |
| 25 | 19 | 031 | 00011001 | EM | End of Medium |
| 26 | 1A | 032 | 00011010 | SUB | Substitute. Ctrl+Z; end-of-file on old DOS text files |
| 27 | 1B | 033 | 00011011 | ESC | Escape. Starts terminal escape sequences, \e or \x1b |
| 28 | 1C | 034 | 00011100 | FS | File Separator |
| 29 | 1D | 035 | 00011101 | GS | Group Separator |
| 30 | 1E | 036 | 00011110 | RS | Record Separator |
| 31 | 1F | 037 | 00011111 | US | Unit Separator |
Space, punctuation and digits, 32 to 63
| Dec | Hex | Oct | Binary | Char | Description |
|---|---|---|---|---|---|
| 32 | 20 | 040 | 00100000 | SP | Space |
| 33 | 21 | 041 | 00100001 | ! | Exclamation mark |
| 34 | 22 | 042 | 00100010 | " | Double quote |
| 35 | 23 | 043 | 00100011 | # | Number sign (hash) |
| 36 | 24 | 044 | 00100100 | $ | Dollar sign |
| 37 | 25 | 045 | 00100101 | % | Percent sign |
| 38 | 26 | 046 | 00100110 | & | Ampersand |
| 39 | 27 | 047 | 00100111 | ' | Apostrophe (single quote) |
| 40 | 28 | 050 | 00101000 | ( | Left parenthesis |
| 41 | 29 | 051 | 00101001 | ) | Right parenthesis |
| 42 | 2A | 052 | 00101010 | * | Asterisk |
| 43 | 2B | 053 | 00101011 | + | Plus sign |
| 44 | 2C | 054 | 00101100 | , | Comma |
| 45 | 2D | 055 | 00101101 | - | Hyphen-minus |
| 46 | 2E | 056 | 00101110 | . | Full stop (period) |
| 47 | 2F | 057 | 00101111 | / | Slash |
| 48 | 30 | 060 | 00110000 | 0 | Digit 0 |
| 49 | 31 | 061 | 00110001 | 1 | Digit 1 |
| 50 | 32 | 062 | 00110010 | 2 | Digit 2 |
| 51 | 33 | 063 | 00110011 | 3 | Digit 3 |
| 52 | 34 | 064 | 00110100 | 4 | Digit 4 |
| 53 | 35 | 065 | 00110101 | 5 | Digit 5 |
| 54 | 36 | 066 | 00110110 | 6 | Digit 6 |
| 55 | 37 | 067 | 00110111 | 7 | Digit 7 |
| 56 | 38 | 070 | 00111000 | 8 | Digit 8 |
| 57 | 39 | 071 | 00111001 | 9 | Digit 9 |
| 58 | 3A | 072 | 00111010 | : | Colon |
| 59 | 3B | 073 | 00111011 | ; | Semicolon |
| 60 | 3C | 074 | 00111100 | < | Less-than sign |
| 61 | 3D | 075 | 00111101 | = | Equals sign |
| 62 | 3E | 076 | 00111110 | > | Greater-than sign |
| 63 | 3F | 077 | 00111111 | ? | Question mark |
Uppercase letters and symbols, 64 to 95
| Dec | Hex | Oct | Binary | Char | Description |
|---|---|---|---|---|---|
| 64 | 40 | 100 | 01000000 | @ | At sign |
| 65 | 41 | 101 | 01000001 | A | Uppercase letter A |
| 66 | 42 | 102 | 01000010 | B | Uppercase letter B |
| 67 | 43 | 103 | 01000011 | C | Uppercase letter C |
| 68 | 44 | 104 | 01000100 | D | Uppercase letter D |
| 69 | 45 | 105 | 01000101 | E | Uppercase letter E |
| 70 | 46 | 106 | 01000110 | F | Uppercase letter F |
| 71 | 47 | 107 | 01000111 | G | Uppercase letter G |
| 72 | 48 | 110 | 01001000 | H | Uppercase letter H |
| 73 | 49 | 111 | 01001001 | I | Uppercase letter I |
| 74 | 4A | 112 | 01001010 | J | Uppercase letter J |
| 75 | 4B | 113 | 01001011 | K | Uppercase letter K |
| 76 | 4C | 114 | 01001100 | L | Uppercase letter L |
| 77 | 4D | 115 | 01001101 | M | Uppercase letter M |
| 78 | 4E | 116 | 01001110 | N | Uppercase letter N |
| 79 | 4F | 117 | 01001111 | O | Uppercase letter O |
| 80 | 50 | 120 | 01010000 | P | Uppercase letter P |
| 81 | 51 | 121 | 01010001 | Q | Uppercase letter Q |
| 82 | 52 | 122 | 01010010 | R | Uppercase letter R |
| 83 | 53 | 123 | 01010011 | S | Uppercase letter S |
| 84 | 54 | 124 | 01010100 | T | Uppercase letter T |
| 85 | 55 | 125 | 01010101 | U | Uppercase letter U |
| 86 | 56 | 126 | 01010110 | V | Uppercase letter V |
| 87 | 57 | 127 | 01010111 | W | Uppercase letter W |
| 88 | 58 | 130 | 01011000 | X | Uppercase letter X |
| 89 | 59 | 131 | 01011001 | Y | Uppercase letter Y |
| 90 | 5A | 132 | 01011010 | Z | Uppercase letter Z |
| 91 | 5B | 133 | 01011011 | [ | Left square bracket |
| 92 | 5C | 134 | 01011100 | \ | Backslash |
| 93 | 5D | 135 | 01011101 | ] | Right square bracket |
| 94 | 5E | 136 | 01011110 | ^ | Caret |
| 95 | 5F | 137 | 01011111 | _ | Underscore |
Lowercase letters and symbols, 96 to 127
| Dec | Hex | Oct | Binary | Char | Description |
|---|---|---|---|---|---|
| 96 | 60 | 140 | 01100000 | ` | Grave accent (backtick) |
| 97 | 61 | 141 | 01100001 | a | Lowercase letter a |
| 98 | 62 | 142 | 01100010 | b | Lowercase letter b |
| 99 | 63 | 143 | 01100011 | c | Lowercase letter c |
| 100 | 64 | 144 | 01100100 | d | Lowercase letter d |
| 101 | 65 | 145 | 01100101 | e | Lowercase letter e |
| 102 | 66 | 146 | 01100110 | f | Lowercase letter f |
| 103 | 67 | 147 | 01100111 | g | Lowercase letter g |
| 104 | 68 | 150 | 01101000 | h | Lowercase letter h |
| 105 | 69 | 151 | 01101001 | i | Lowercase letter i |
| 106 | 6A | 152 | 01101010 | j | Lowercase letter j |
| 107 | 6B | 153 | 01101011 | k | Lowercase letter k |
| 108 | 6C | 154 | 01101100 | l | Lowercase letter l |
| 109 | 6D | 155 | 01101101 | m | Lowercase letter m |
| 110 | 6E | 156 | 01101110 | n | Lowercase letter n |
| 111 | 6F | 157 | 01101111 | o | Lowercase letter o |
| 112 | 70 | 160 | 01110000 | p | Lowercase letter p |
| 113 | 71 | 161 | 01110001 | q | Lowercase letter q |
| 114 | 72 | 162 | 01110010 | r | Lowercase letter r |
| 115 | 73 | 163 | 01110011 | s | Lowercase letter s |
| 116 | 74 | 164 | 01110100 | t | Lowercase letter t |
| 117 | 75 | 165 | 01110101 | u | Lowercase letter u |
| 118 | 76 | 166 | 01110110 | v | Lowercase letter v |
| 119 | 77 | 167 | 01110111 | w | Lowercase letter w |
| 120 | 78 | 170 | 01111000 | x | Lowercase letter x |
| 121 | 79 | 171 | 01111001 | y | Lowercase letter y |
| 122 | 7A | 172 | 01111010 | z | Lowercase letter z |
| 123 | 7B | 173 | 01111011 | { | Left curly brace |
| 124 | 7C | 174 | 01111100 | | | Vertical bar |
| 125 | 7D | 175 | 01111101 | } | Right curly brace |
| 126 | 7E | 176 | 01111110 | ~ | Tilde |
| 127 | 7F | 177 | 01111111 | DEL | Delete. Originally erased a punched-tape character |
Extended ASCII is not ASCII
You may see references to "extended ASCII" with codes 128 to 255. There is no single standard. ISO 8859-1 (Latin-1), Windows-1252 and many other 8-bit code pages each use that upper half differently, which is why text sometimes shows garbled characters when it is read with the wrong encoding. Unicode and UTF-8 solved this: characters beyond ASCII are encoded as multi-byte sequences whose bytes are all 128 or above, so they never collide with ASCII.
Common mistakes
- Treating ASCII and Unicode as the same. ASCII is a 128-character subset of Unicode. Accented letters, symbols and emoji are not in it.
- Confusing the character 0 with code 0. The digit "0" is code 48. Code 0 is the null character.
- Assuming a newline is the same everywhere. LF, CR and CR LF are all used. Files copied between systems may need conversion.
- Using the wrong offset for case. The difference between a letter's cases is 32, not 26.
- Forgetting hex notation. Code 65 is 0x41, not 41. Write the prefix, or the base, so that readers do not misread it.
Sources
- RFC 20: ASCII format for network interchange
- IANA: Character Sets registry (lists ANSI_X3.4-1968 and its aliases, including US-ASCII)
- Unicode Consortium: C0 Controls and Basic Latin chart