ASCII Table
Developer Tools · Added
All 128 ASCII characters with their decimal, hexadecimal, octal and binary values — and, for the thirty-three control codes, what they were originally for and which escape sequence writes them. Search by character, by name, by number in any base, or by what a code does: typing "tab", "0x09" or "9" all find the same row. The table stops at 127 on purpose, because that is where ASCII stops.
128 of 128 characters
Control codes (0–31, 127)
| Char | Dec | Hex | Oct | Binary | Name |
|---|---|---|---|---|---|
| NUL | 0 | 00 | 000 | 00000000 | NUL^@Null. Terminates a string in C, and pads elsewhere. |
| SOH | 1 | 01 | 001 | 00000001 | SOH^AStart of heading. |
| STX | 2 | 02 | 002 | 00000010 | STX^BStart of text. |
| ETX | 3 | 03 | 003 | 00000011 | ETX^CEnd of text. What Ctrl+C sends to interrupt a program. |
| EOT | 4 | 04 | 004 | 00000100 | EOT^DEnd of transmission. Ctrl+D, which closes standard input. |
| ENQ | 5 | 05 | 005 | 00000101 | ENQ^EEnquiry — asks the far end to identify itself. |
| ACK | 6 | 06 | 006 | 00000110 | ACK^FAcknowledge. |
| BEL | 7 | 07 | 007 | 00000111 | BEL\a^GBell. Still rings the terminal, or flashes it. |
| BS | 8 | 08 | 010 | 00001000 | BS\b^HBackspace — moves the cursor back one column. |
| HT | 9 | 09 | 011 | 00001001 | HT\t^IHorizontal tab. |
| LF | 10 | 0A | 012 | 00001010 | LF\n^JLine feed. The newline on Unix and in every network protocol. |
| VT | 11 | 0B | 013 | 00001011 | VT\v^KVertical tab. |
| FF | 12 | 0C | 014 | 00001100 | FF\f^LForm feed — ejects a page on a printer. |
| CR | 13 | 0D | 015 | 00001101 | CR\r^MCarriage return. Paired with LF for Windows line endings. |
| SO | 14 | 0E | 016 | 00001110 | SO^NShift out — switches to an alternate character set. |
| SI | 15 | 0F | 017 | 00001111 | SI^OShift in — switches back. |
| DLE | 16 | 10 | 020 | 00010000 | DLE^PData link escape. |
| DC1 | 17 | 11 | 021 | 00010001 | DC1^QDevice control 1, also XON — resumes a paused transmission. Ctrl+Q. |
| DC2 | 18 | 12 | 022 | 00010010 | DC2^RDevice control 2. |
| DC3 | 19 | 13 | 023 | 00010011 | DC3^SDevice control 3, also XOFF — pauses transmission. Ctrl+S. |
| DC4 | 20 | 14 | 024 | 00010100 | DC4^TDevice control 4. |
| NAK | 21 | 15 | 025 | 00010101 | NAK^UNegative acknowledge. |
| SYN | 22 | 16 | 026 | 00010110 | SYN^VSynchronous idle — keeps a link in step when nothing is being sent. |
| ETB | 23 | 17 | 027 | 00010111 | ETB^WEnd of transmission block. |
| CAN | 24 | 18 | 030 | 00011000 | CAN^XCancel. |
| EM | 25 | 19 | 031 | 00011001 | EM^YEnd of medium. |
| SUB | 26 | 1A | 032 | 00011010 | SUB^ZSubstitute. Used as end-of-file in DOS text files. |
| ESC | 27 | 1B | 033 | 00011011 | ESC\e^[Escape. Introduces the ANSI sequences that colour and move a terminal cursor. |
| FS | 28 | 1C | 034 | 00011100 | FS^\File separator. |
| GS | 29 | 1D | 035 | 00011101 | GS^]Group separator. |
| RS | 30 | 1E | 036 | 00011110 | RS^^Record separator. |
| US | 31 | 1F | 037 | 00011111 | US^_Unit separator. |
| DEL | 127 | 7F | 177 | 01111111 | DEL^?Delete. On punched tape this punched every hole, obliterating whatever was there. |
Space
| Char | Dec | Hex | Oct | Binary | Name |
|---|---|---|---|---|---|
| SP | 32 | 20 | 040 | 00100000 | SpaceSpace. Printable, but the only one with no visible mark. |
Punctuation and symbols
| Char | Dec | Hex | Oct | Binary | Name |
|---|---|---|---|---|---|
| ! | 33 | 21 | 041 | 00100001 | Exclamation markExclamation mark. Safe in a URL path, reserved in some shells. |
| " | 34 | 22 | 042 | 00100010 | Quotation markDouble quote. Escaped as " in HTML and \" in most languages. |
| # | 35 | 23 | 043 | 00100011 | Number signNumber sign. Starts the fragment in a URL, so it must be encoded as %23 elsewhere. |
| $ | 36 | 24 | 044 | 00100100 | Dollar signDollar sign. Introduces variable expansion in shells and template literals. |
| % | 37 | 25 | 045 | 00100101 | Percent signPercent sign. Introduces a percent-encoding in a URL, so a literal one is %25. |
| & | 38 | 26 | 046 | 00100110 | AmpersandAmpersand. Separates query parameters, and is & in HTML. |
| ' | 39 | 27 | 047 | 00100111 | ApostropheApostrophe. Escaped as ' in HTML attributes. |
| ( | 40 | 28 | 050 | 00101000 | Left parenthesis |
| ) | 41 | 29 | 051 | 00101001 | Right parenthesis |
| * | 42 | 2A | 052 | 00101010 | AsteriskAsterisk. The wildcard in globs and in most search syntaxes. |
| + | 43 | 2B | 053 | 00101011 | Plus signPlus. Means a space in a query string, so a literal plus is %2B. |
| , | 44 | 2C | 054 | 00101100 | Comma |
| - | 45 | 2D | 055 | 00101101 | Hyphen-minus |
| . | 46 | 2E | 056 | 00101110 | Full stop |
| / | 47 | 2F | 057 | 00101111 | SolidusSolidus. The path separator in URLs and on Unix. |
| : | 58 | 3A | 072 | 00111010 | Colon |
| ; | 59 | 3B | 073 | 00111011 | Semicolon |
| < | 60 | 3C | 074 | 00111100 | Less-than signLess-than. Must be < in HTML or it starts a tag. |
| = | 61 | 3D | 075 | 00111101 | Equals sign |
| > | 62 | 3E | 076 | 00111110 | Greater-than signGreater-than. Escaped as > for symmetry, though it is only strictly required inside a tag. |
| ? | 63 | 3F | 077 | 00111111 | Question markQuestion mark. Starts the query string in a URL. |
| @ | 64 | 40 | 100 | 01000000 | Commercial atCommercial at. Separates user from host in an email address. |
| [ | 91 | 5B | 133 | 01011011 | Left square bracket |
| \ | 92 | 5C | 134 | 01011100 | Reverse solidusReverse solidus. The escape character in almost every language, and the path separator on Windows. |
| ] | 93 | 5D | 135 | 01011101 | Right square bracket |
| ^ | 94 | 5E | 136 | 01011110 | Circumflex accentCircumflex. Anchors the start of a line in a regular expression. |
| _ | 95 | 5F | 137 | 01011111 | Low line |
| ` | 96 | 60 | 140 | 01100000 | Grave accentGrave accent. Opens a template literal in JavaScript and a command substitution in shells. |
| { | 123 | 7B | 173 | 01111011 | Left curly bracketLeft brace. Opens a block, an object, or an interpolation. |
| | | 124 | 7C | 174 | 01111100 | Vertical lineVertical line. The pipe in shells, and alternation in a regular expression. |
| } | 125 | 7D | 175 | 01111101 | Right curly bracket |
| ~ | 126 | 7E | 176 | 01111110 | TildeTilde. Home directory in a shell; unreserved in a URL since RFC 3986. |
Digits (48–57)
| Char | Dec | Hex | Oct | Binary | Name |
|---|---|---|---|---|---|
| 0 | 48 | 30 | 060 | 00110000 | Digit 0 |
| 1 | 49 | 31 | 061 | 00110001 | Digit 1 |
| 2 | 50 | 32 | 062 | 00110010 | Digit 2 |
| 3 | 51 | 33 | 063 | 00110011 | Digit 3 |
| 4 | 52 | 34 | 064 | 00110100 | Digit 4 |
| 5 | 53 | 35 | 065 | 00110101 | Digit 5 |
| 6 | 54 | 36 | 066 | 00110110 | Digit 6 |
| 7 | 55 | 37 | 067 | 00110111 | Digit 7 |
| 8 | 56 | 38 | 070 | 00111000 | Digit 8 |
| 9 | 57 | 39 | 071 | 00111001 | Digit 9 |
Uppercase letters (65–90)
| Char | Dec | Hex | Oct | Binary | Name |
|---|---|---|---|---|---|
| A | 65 | 41 | 101 | 01000001 | Latin capital letter A |
| B | 66 | 42 | 102 | 01000010 | Latin capital letter B |
| C | 67 | 43 | 103 | 01000011 | Latin capital letter C |
| D | 68 | 44 | 104 | 01000100 | Latin capital letter D |
| E | 69 | 45 | 105 | 01000101 | Latin capital letter E |
| F | 70 | 46 | 106 | 01000110 | Latin capital letter F |
| G | 71 | 47 | 107 | 01000111 | Latin capital letter G |
| H | 72 | 48 | 110 | 01001000 | Latin capital letter H |
| I | 73 | 49 | 111 | 01001001 | Latin capital letter I |
| J | 74 | 4A | 112 | 01001010 | Latin capital letter J |
| K | 75 | 4B | 113 | 01001011 | Latin capital letter K |
| L | 76 | 4C | 114 | 01001100 | Latin capital letter L |
| M | 77 | 4D | 115 | 01001101 | Latin capital letter M |
| N | 78 | 4E | 116 | 01001110 | Latin capital letter N |
| O | 79 | 4F | 117 | 01001111 | Latin capital letter O |
| P | 80 | 50 | 120 | 01010000 | Latin capital letter P |
| Q | 81 | 51 | 121 | 01010001 | Latin capital letter Q |
| R | 82 | 52 | 122 | 01010010 | Latin capital letter R |
| S | 83 | 53 | 123 | 01010011 | Latin capital letter S |
| T | 84 | 54 | 124 | 01010100 | Latin capital letter T |
| U | 85 | 55 | 125 | 01010101 | Latin capital letter U |
| V | 86 | 56 | 126 | 01010110 | Latin capital letter V |
| W | 87 | 57 | 127 | 01010111 | Latin capital letter W |
| X | 88 | 58 | 130 | 01011000 | Latin capital letter X |
| Y | 89 | 59 | 131 | 01011001 | Latin capital letter Y |
| Z | 90 | 5A | 132 | 01011010 | Latin capital letter Z |
Lowercase letters (97–122)
| Char | Dec | Hex | Oct | Binary | Name |
|---|---|---|---|---|---|
| a | 97 | 61 | 141 | 01100001 | Latin small letter A |
| b | 98 | 62 | 142 | 01100010 | Latin small letter B |
| c | 99 | 63 | 143 | 01100011 | Latin small letter C |
| d | 100 | 64 | 144 | 01100100 | Latin small letter D |
| e | 101 | 65 | 145 | 01100101 | Latin small letter E |
| f | 102 | 66 | 146 | 01100110 | Latin small letter F |
| g | 103 | 67 | 147 | 01100111 | Latin small letter G |
| h | 104 | 68 | 150 | 01101000 | Latin small letter H |
| i | 105 | 69 | 151 | 01101001 | Latin small letter I |
| j | 106 | 6A | 152 | 01101010 | Latin small letter J |
| k | 107 | 6B | 153 | 01101011 | Latin small letter K |
| l | 108 | 6C | 154 | 01101100 | Latin small letter L |
| m | 109 | 6D | 155 | 01101101 | Latin small letter M |
| n | 110 | 6E | 156 | 01101110 | Latin small letter N |
| o | 111 | 6F | 157 | 01101111 | Latin small letter O |
| p | 112 | 70 | 160 | 01110000 | Latin small letter P |
| q | 113 | 71 | 161 | 01110001 | Latin small letter Q |
| r | 114 | 72 | 162 | 01110010 | Latin small letter R |
| s | 115 | 73 | 163 | 01110011 | Latin small letter S |
| t | 116 | 74 | 164 | 01110100 | Latin small letter T |
| u | 117 | 75 | 165 | 01110101 | Latin small letter U |
| v | 118 | 76 | 166 | 01110110 | Latin small letter V |
| w | 119 | 77 | 167 | 01110111 | Latin small letter W |
| x | 120 | 78 | 170 | 01111000 | Latin small letter X |
| y | 121 | 79 | 171 | 01111001 | Latin small letter Y |
| z | 122 | 7A | 172 | 01111010 | Latin small letter Z |
ASCII is seven bits, so it ends at 127. Anything from 128 to 255 belongs to some other encoding — Latin-1, Windows-1252, or a continuation byte in a UTF-8 sequence — and treating those as “extended ASCII” is where mojibake comes from, because there is no single agreed set. The first 128 UTF-8 code units are identical to these by design, which is why plain ASCII text is valid UTF-8 without conversion.
How to use the ascii table
- 1Type in the search box to filter: a character finds itself, a name such as "escape" finds that code, and a number finds it in decimal or hex.
- 2Use the filter to show only printable characters or only control codes.
- 3Read across for the decimal, hex, octal and binary value of any character.
- 4Control codes show their escape sequence where one exists, and the Ctrl combination that produces them on a terminal.
- 5Copy the whole filtered table as tab-separated values if you need it elsewhere.
Examples
Finding a character's code
- Input
- A
- Result
- 65 decimal, 0x41, 0o101, 01000001
The uppercase letters start at 65 and the lowercase at 97, exactly 32 apart — which is one bit.
Looking up a control code
- Input
- tab
- Result
- 9 — Horizontal tab, escape sequence \t, Ctrl+I
Every control code from 1 to 26 corresponds to Ctrl plus a letter, in alphabetical order.
Going the other way
- Input
- 0x0A
- Result
- Line feed — the newline on Unix and in every network protocol
Windows uses 0x0D followed by 0x0A, which is why text files moved between the two grow or lose characters.
About the ascii table
A code designed around the hardware of 1963
ASCII was standardised in 1963 for teleprinters, and its structure reflects that. The control codes at the start are commands to a machine rather than characters on a page: ring the bell, feed the paper, return the carriage, stop transmitting. The printable characters follow, arranged so that useful operations were cheap in hardware — digits in a contiguous block starting at 0x30, letters contiguous and case-separated by one bit, and the whole set fitting into seven bits so the eighth could be used for parity on a noisy line.
Seven bits was not an accident either. Punched paper tape and early serial links were error-prone, and reserving the eighth bit for a parity check caught single-bit errors in transmission. When links became reliable enough that parity was not worth the bandwidth, that eighth bit became available — and every country immediately used it for its own accented characters, which is how the mutually incompatible eight-bit encodings came about.
DEL at 127 is the clearest fossil in the set. On paper tape, deleting a character meant punching out every hole in that position, which produces all seven bits set — 127. It could not be undone, and it could not be mistaken for anything else, which is why the delete code is at the top of the table rather than next to the other control codes at the bottom.
Where ASCII assumptions still cause problems
The most common is assuming one byte equals one character. It is true in ASCII and false in UTF-8 for anything outside the first 128 code points, so code that counts bytes to count characters, or slices a string at a byte offset, will eventually cut a multi-byte sequence in half and produce a replacement character. This is why every modern language distinguishes byte length from character length, and why the distinction matters most in exactly the places people forget it: truncating a display name, validating a field length, or splitting a file into fixed-size chunks.
The second is case conversion. The one-bit trick works perfectly for A to Z and not at all for anything else. Turkish has a dotted and a dotless i that case-convert differently from English, German ß uppercases to two characters, and Greek sigma has a different lowercase form at the end of a word. Any code doing case-insensitive comparison with a bitmask is quietly wrong outside ASCII, which is why locale-aware case folding exists.
The third is validation. Rejecting input containing bytes above 127 was once a reasonable sanity check and is now a bug — it rejects most names in the world. The useful modern check is whether the input is well-formed UTF-8 and free of control characters, which is a different question entirely and one this table is genuinely useful for answering.
Frequently asked questions
Why does the table stop at 127?
How does ASCII relate to Unicode and UTF-8?
What is the difference between CR and LF?
Are the control codes still used?
Why does the case of a letter differ by exactly 32?
Related tools
Text to Binary Converter
Converters
Convert text to binary, octal, decimal or hex and back, as UTF-8 bytes or code points.
Binary Calculator
Developer Tools
Arithmetic and bitwise operations on 8 to 64-bit integers, in any base.
HTML Entity Encoder & Decoder
Developer Tools
Escape HTML characters to entities and decode them back, in named, decimal or hex form.