ASCII table
All 128 ASCII codes in one place: decimal, hexadecimal and octal values alongside the character each code represents. Control characters (0-31 and 127) have names instead of glyphs — they still matter, because they hide in logs, protocols and line endings.
How to read this table
- Dec is the value everyone quotes; Hex (0x…) is what byte dumps and debuggers show; Oct appears in file permissions and escape sequences such as
\101for "A". - Codes 0-31 and 127 are control characters: no visible glyph, but real effects — LF (10) and CR (13) are the famous Windows vs Unix line-ending pair.
- Codes 32-126 are the printable characters: space, punctuation, digits and letters.
To convert a value yourself, type it into the number base converter — for example hex 0x4A to decimal gives 74, which this table shows is "J".
Control characters (0-31, 127)
| Dec | Hex | Oct | Name | Meaning |
|---|---|---|---|---|
| 0 | 0x00 | 000 | NUL | Null character - all zero bits; strings end here in C |
| 1 | 0x01 | 001 | SOH | Start of Heading |
| 2 | 0x02 | 002 | STX | Start of Text |
| 3 | 0x03 | 003 | ETX | End of Text |
| 4 | 0x04 | 004 | EOT | End of Transmission |
| 5 | 0x05 | 005 | ENQ | Enquiry |
| 6 | 0x06 | 006 | ACK | Acknowledge |
| 7 | 0x07 | 007 | BEL | Bell - rings the terminal alert |
| 8 | 0x08 | 010 | BS | Backspace |
| 9 | 0x09 | 011 | HT | Horizontal Tab |
| 10 | 0x0A | 012 | LF | Line Feed - the newline character on Unix |
| 11 | 0x0B | 013 | VT | Vertical Tab |
| 12 | 0x0C | 014 | FF | Form Feed - new page on printers |
| 13 | 0x0D | 015 | CR | Carriage Return - Windows line endings are CR + LF (13, 10) |
| 14 | 0x0E | 016 | SO | Shift Out |
| 15 | 0x0F | 017 | SI | Shift In |
| 16 | 0x10 | 020 | DLE | Data Link Escape |
| 17 | 0x11 | 021 | DC1 | Device Control 1 - XON, resumes terminal output |
| 18 | 0x12 | 022 | DC2 | Device Control 2 |
| 19 | 0x13 | 023 | DC3 | Device Control 3 - XOFF, pauses terminal output |
| 20 | 0x14 | 024 | DC4 | Device Control 4 |
| 21 | 0x15 | 025 | NAK | Negative Acknowledge |
| 22 | 0x16 | 026 | SYN | Synchronous Idle |
| 23 | 0x17 | 027 | ETB | End of Transmission Block |
| 24 | 0x18 | 030 | CAN | Cancel |
| 25 | 0x19 | 031 | EM | End of Medium |
| 26 | 0x1A | 032 | SUB | Substitute |
| 27 | 0x1B | 033 | ESC | Escape - starts terminal escape sequences |
| 28 | 0x1C | 034 | FS | File Separator |
| 29 | 0x1D | 035 | GS | Group Separator |
| 30 | 0x1E | 036 | RS | Record Separator |
| 31 | 0x1F | 037 | US | Unit Separator |
| 127 | 0x7F | 177 | DEL | Delete |
Printable characters (32-126)
| Dec | Hex | Oct | Char |
|---|---|---|---|
| 32 | 0x20 | 040 | |
| 33 | 0x21 | 041 | ! |
| 34 | 0x22 | 042 | " |
| 35 | 0x23 | 043 | # |
| 36 | 0x24 | 044 | $ |
| 37 | 0x25 | 045 | % |
| 38 | 0x26 | 046 | & |
| 39 | 0x27 | 047 | ' |
| 40 | 0x28 | 050 | ( |
| 41 | 0x29 | 051 | ) |
| 42 | 0x2A | 052 | * |
| 43 | 0x2B | 053 | + |
| 44 | 0x2C | 054 | , |
| 45 | 0x2D | 055 | - |
| 46 | 0x2E | 056 | . |
| 47 | 0x2F | 057 | / |
| 48 | 0x30 | 060 | 0 |
| 49 | 0x31 | 061 | 1 |
| 50 | 0x32 | 062 | 2 |
| 51 | 0x33 | 063 | 3 |
| 52 | 0x34 | 064 | 4 |
| 53 | 0x35 | 065 | 5 |
| 54 | 0x36 | 066 | 6 |
| 55 | 0x37 | 067 | 7 |
| 56 | 0x38 | 070 | 8 |
| 57 | 0x39 | 071 | 9 |
| 58 | 0x3A | 072 | : |
| 59 | 0x3B | 073 | ; |
| 60 | 0x3C | 074 | < |
| 61 | 0x3D | 075 | = |
| 62 | 0x3E | 076 | > |
| 63 | 0x3F | 077 | ? |
| 64 | 0x40 | 100 | @ |
| 65 | 0x41 | 101 | A |
| 66 | 0x42 | 102 | B |
| 67 | 0x43 | 103 | C |
| 68 | 0x44 | 104 | D |
| 69 | 0x45 | 105 | E |
| 70 | 0x46 | 106 | F |
| 71 | 0x47 | 107 | G |
| 72 | 0x48 | 110 | H |
| 73 | 0x49 | 111 | I |
| 74 | 0x4A | 112 | J |
| 75 | 0x4B | 113 | K |
| 76 | 0x4C | 114 | L |
| 77 | 0x4D | 115 | M |
| 78 | 0x4E | 116 | N |
| 79 | 0x4F | 117 | O |
| 80 | 0x50 | 120 | P |
| 81 | 0x51 | 121 | Q |
| 82 | 0x52 | 122 | R |
| 83 | 0x53 | 123 | S |
| 84 | 0x54 | 124 | T |
| 85 | 0x55 | 125 | U |
| 86 | 0x56 | 126 | V |
| 87 | 0x57 | 127 | W |
| 88 | 0x58 | 130 | X |
| 89 | 0x59 | 131 | Y |
| 90 | 0x5A | 132 | Z |
| 91 | 0x5B | 133 | [ |
| 92 | 0x5C | 134 | \ |
| 93 | 0x5D | 135 | ] |
| 94 | 0x5E | 136 | ^ |
| 95 | 0x5F | 137 | _ |
| 96 | 0x60 | 140 | ` |
| 97 | 0x61 | 141 | a |
| 98 | 0x62 | 142 | b |
| 99 | 0x63 | 143 | c |
| 100 | 0x64 | 144 | d |
| 101 | 0x65 | 145 | e |
| 102 | 0x66 | 146 | f |
| 103 | 0x67 | 147 | g |
| 104 | 0x68 | 150 | h |
| 105 | 0x69 | 151 | i |
| 106 | 0x6A | 152 | j |
| 107 | 0x6B | 153 | k |
| 108 | 0x6C | 154 | l |
| 109 | 0x6D | 155 | m |
| 110 | 0x6E | 156 | n |
| 111 | 0x6F | 157 | o |
| 112 | 0x70 | 160 | p |
| 113 | 0x71 | 161 | q |
| 114 | 0x72 | 162 | r |
| 115 | 0x73 | 163 | s |
| 116 | 0x74 | 164 | t |
| 117 | 0x75 | 165 | u |
| 118 | 0x76 | 166 | v |
| 119 | 0x77 | 167 | w |
| 120 | 0x78 | 170 | x |
| 121 | 0x79 | 171 | y |
| 122 | 0x7A | 172 | z |
| 123 | 0x7B | 173 | { |
| 124 | 0x7C | 174 | | |
| 125 | 0x7D | 175 | } |
| 126 | 0x7E | 176 | ~ |
FAQ
What is the difference between ASCII and Unicode?
ASCII is a 7-bit code from the 1960s covering 128 characters — enough for English text, nothing else. Unicode assigns numbers to over 150,000 characters from every writing system, and the first 128 Unicode code points are exactly ASCII. That is why UTF-8 encodes ASCII text byte-for-byte identically, and why a "plain text" file that suddenly shows mojibake is usually an encoding mismatch, not corruption.
Why do codes 128-255 vary?
ASCII stops at 127. What filled 128-255 was vendor-specific ("extended ASCII"): Latin-1, Windows-1252, code pages for Cyrillic or Greek — different tables sharing the same numbers. That ambiguity is precisely why UTF-8 replaced them.
Why does my file show both CR and LF?
Windows ends lines with CR + LF (codes 13, 10); Unix and macOS use LF (10) alone; classic Mac OS used CR alone. Opening a Windows file in a Unix editor shows the stray 13s; opening a Unix file in old Notepad shows one long line. Most modern editors handle both automatically.