ASCII table — all 128 codes in decimal, hex, octal and binary
The complete ASCII table: 33 control codes named and explained, 95 printable characters, and every code shown four ways at once. Type a character to get its codes, or type a number in any base to get the character back. It also settles the question that brings most people here — there is no such thing as “extended ASCII”, and the table further down shows three encodings disagreeing about the same byte. Nothing is uploaded or saved.
- Nothing is uploaded or saved
- Works offline
One box, both directions. Paste a character, or type a number as 65, 0x41, \x41, U+0041, 0o101 or 0b1000001.
Matched by the character “A” — LATIN CAPITAL LETTER A
Hex 41. The capitals occupy 65–90 with no gaps, and the lowercase run starts exactly 32 higher — so changing case is a single bit, which is why old code did it with an OR of 0x20.
| Dec | Hex | Oct | Binary | Char | Name | Description |
|---|---|---|---|---|---|---|
| 0 | 00 | 000 | 00000000 | ␀ | NUL · Null | [Ctrl+@ \0]All bits zero. On paper tape it punched no holes at all, which made it usable as filler and let it be over-punched into any other code later. Today it ends a string in C, and it is the byte that most often breaks a filename or a database field.still used |
| 1 | 01 | 001 | 00000001 | ␁ | SOH · Start of Heading | [Ctrl+A]Marked the start of a message’s addressing header, before the text itself began. |
| 2 | 02 | 002 | 00000010 | ␂ | STX · Start of Text | [Ctrl+B]Ended the heading and began the message body. |
| 3 | 03 | 003 | 00000011 | ␃ | ETX · End of Text | [Ctrl+C]Closed the message body. It survives as Ctrl+C, which Unix terminals repurposed into the interrupt key. |
| 4 | 04 | 004 | 00000100 | ␄ | EOT · End of Transmission | [Ctrl+D]Told the receiver the sender had finished and the line was free. It survives as Ctrl+D, which signals end of input on Unix. |
| 5 | 05 | 005 | 00000101 | ␅ | ENQ · Enquiry | [Ctrl+E]Asked the far end “who are you?” and expected an identification in reply. |
| 6 | 06 | 006 | 00000110 | ␆ | ACK · Acknowledge | [Ctrl+F]Positive reply: the last block arrived intact, send the next one. |
| 7 | 07 | 007 | 00000111 | ␇ | BEL · Bell | [Ctrl+G \a]Rang a physical bell on the teleprinter to get a human’s attention. Terminals still beep on it, and \a is still the escape for it in C.still used |
| 8 | 08 | 010 | 00001000 | ␈ | BS · Backspace | [Ctrl+H \b]Moved the carriage back one position so the next character struck over the last. That is how you produced a bold or an accented letter on paper.still used |
| 9 | 09 | 011 | 00001001 | ␉ | HT · Horizontal Tab | [Ctrl+I \t]Advanced to the next tab stop. Still everywhere: \t in every language, and the column separator in TSV files.still used |
| 10 | 0A | 012 | 00001010 | ␊ | LF · Line Feed | [Ctrl+J \n]Advanced the paper by one line without moving the carriage sideways. Unix, macOS and effectively every file format designed since use it alone as the newline.still used |
| 11 | 0B | 013 | 00001011 | ␋ | VT · Vertical Tab | [Ctrl+K \v]Advanced to the next vertical tab stop, for pre-printed forms. Almost nothing reaches for it now. |
| 12 | 0C | 014 | 00001100 | ␌ | FF · Form Feed | [Ctrl+L \f]Ejected the page and started a new one. Printers still honour it, and Ctrl+L clears a terminal screen for exactly that reason.still used |
| 13 | 0D | 015 | 00001101 | ␍ | CR · Carriage Return | [Ctrl+M \r]Returned the print head to column 1 without advancing the paper. Windows still writes CR LF as a pair, and HTTP, SMTP and the other line-based internet protocols require the pair.still used |
| 14 | 0E | 016 | 00001110 | ␎ | SO · Shift Out | [Ctrl+N]Switched the device to an alternate character set, which stayed in effect until SI switched it back. |
| 15 | 0F | 017 | 00001111 | ␏ | SI · Shift In | [Ctrl+O]Switched back to the standard character set. |
| 16 | 10 | 020 | 00010000 | ␐ | DLE · Data Link Escape | [Ctrl+P]Made the character following it count as a control code again, inside a stream that was otherwise being carried as raw data. |
| 17 | 11 | 021 | 00010001 | ␑ | DC1 · Device Control 1 | [Ctrl+Q]Left to the device by the standard, but by near-universal convention it became XON: resume sending. Ctrl+Q is what unfreezes a terminal.still used |
| 18 | 12 | 022 | 00010010 | ␒ | DC2 · Device Control 2 | [Ctrl+R]Device-specific with no agreed meaning — terminals and printers each assigned it differently. |
| 19 | 13 | 023 | 00010011 | ␓ | DC3 · Device Control 3 | [Ctrl+S]By the same convention, XOFF: stop sending. Ctrl+S is why a terminal sometimes appears to freeze for no reason at all.still used |
| 20 | 14 | 024 | 00010100 | ␔ | DC4 · Device Control 4 | [Ctrl+T]Device-specific, often used as a general stop, but with no single agreed meaning across devices. |
| 21 | 15 | 025 | 00010101 | ␕ | NAK · Negative Acknowledge | [Ctrl+U]The negative counterpart of ACK: the last block was damaged, send it again. |
| 22 | 16 | 026 | 00010110 | ␖ | SYN · Synchronous Idle | [Ctrl+V]Sent to fill a synchronous line that had no data on it, so the two ends stayed in step. |
| 23 | 17 | 027 | 00010111 | ␗ | ETB · End of Transmission Block | [Ctrl+W]Ended one block of a message that had been split for transmission, where ETX ended the whole message. |
| 24 | 18 | 030 | 00011000 | ␘ | CAN · Cancel | [Ctrl+X]Told the receiver that the data preceding it was in error and should be discarded. |
| 25 | 19 | 031 | 00011001 | ␙ | EM · End of Medium | [Ctrl+Y]Marked the physical end of the tape, card or roll of paper — which is not the same thing as the end of the data. |
| 26 | 1A | 032 | 00011010 | ␚ | SUB · Substitute | [Ctrl+Z]Stood in for a character that arrived damaged. CP/M and then DOS used Ctrl+Z to mark the end of a text file, which is why it still ends console input on Windows.still used |
| 27 | 1B | 033 | 00011011 | ␛ | ESC · Escape | [Ctrl+[]Introduced a sequence meaning something other than itself. Every ANSI terminal sequence starts with this byte, so the colour in your terminal begins at code 27. Shells and GNU C accept \e for it, but that is an extension — standard C and JavaScript have no shorthand, so you write \x1b or \u001b.still used |
| 28 | 1C | 034 | 00011100 | ␜ | FS · File Separator | [Ctrl+\]The coarsest of four nested separators — file, group, record, unit — meant for structuring data without inventing a delimiter that might appear in the data itself. |
| 29 | 1D | 035 | 00011101 | ␝ | GS · Group Separator | [Ctrl+]]One level in from FS. Still genuinely used: GS1 barcodes separate their application-identifier fields with it.still used |
| 30 | 1E | 036 | 00011110 | ␞ | RS · Record Separator | [Ctrl+^]One level in from GS. JSON Text Sequences (RFC 7464) put it before each record, which is how a stream of JSON documents stays unambiguous.still used |
| 31 | 1F | 037 | 00011111 | ␟ | US · Unit Separator | [Ctrl+_]The finest of the four, sitting between individual fields of one record. |
| 32 | 20 | 040 | 00100000 | ␠ | SPACE | A real character with a code, not the absence of one. It becomes %20 in a URL path and, in form-encoded query strings only, a “+”. |
| 33 | 21 | 041 | 00100001 | ! | EXCLAMATION MARK | |
| 34 | 22 | 042 | 00100010 | " | QUOTATION MARK | ["]The straight typewriter quote. The curly “ ” pair your word processor substitutes is not ASCII and is a frequent cause of code that will not parse. |
| 35 | 23 | 043 | 00100011 | # | NUMBER SIGN | Hash, pound or octothorpe depending on who you ask. It starts the fragment in a URL, and everything after it is never sent to the server. |
| 36 | 24 | 044 | 00100100 | $ | DOLLAR SIGN | |
| 37 | 25 | 045 | 00100101 | % | PERCENT SIGN | Begins a percent-escape in a URL, so a literal one has to be written %25. |
| 38 | 26 | 046 | 00100110 | & | AMPERSAND | [&] |
| 39 | 27 | 047 | 00100111 | ' | APOSTROPHE | [']The straight single quote, doing duty as an apostrophe and as a string delimiter. ' is defined in XML and HTML5 but not in HTML 4, which is why ' is the safer escape. |
| 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 | One character doing the work of a hyphen, a minus sign and a dash. The typographic en dash, em dash and true minus all live outside ASCII. |
| 46 | 2E | 056 | 00101110 | . | FULL STOP | Period, dot, point. |
| 47 | 2F | 057 | 00101111 | / | SOLIDUS | The forward slash. |
| 48 | 30 | 060 | 00110000 | 0 | DIGIT ZERO | The digits run 48–57, so the numeric value of a digit character is its code minus 48. |
| 49 | 31 | 061 | 00110001 | 1 | DIGIT ONE | |
| 50 | 32 | 062 | 00110010 | 2 | DIGIT TWO | |
| 51 | 33 | 063 | 00110011 | 3 | DIGIT THREE | |
| 52 | 34 | 064 | 00110100 | 4 | DIGIT FOUR | |
| 53 | 35 | 065 | 00110101 | 5 | DIGIT FIVE | |
| 54 | 36 | 066 | 00110110 | 6 | DIGIT SIX | |
| 55 | 37 | 067 | 00110111 | 7 | DIGIT SEVEN | |
| 56 | 38 | 070 | 00111000 | 8 | DIGIT EIGHT | |
| 57 | 39 | 071 | 00111001 | 9 | DIGIT NINE | |
| 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 | |
| 64 | 40 | 100 | 01000000 | @ | COMMERCIAL AT | |
| 65 | 41 | 101 | 01000001 | A | LATIN CAPITAL LETTER A | Hex 41. The capitals occupy 65–90 with no gaps, and the lowercase run starts exactly 32 higher — so changing case is a single bit, which is why old code did it with an OR of 0x20. |
| 66 | 42 | 102 | 01000010 | B | LATIN CAPITAL LETTER B | |
| 67 | 43 | 103 | 01000011 | C | LATIN CAPITAL LETTER C | |
| 68 | 44 | 104 | 01000100 | D | LATIN CAPITAL LETTER D | |
| 69 | 45 | 105 | 01000101 | E | LATIN CAPITAL LETTER E | |
| 70 | 46 | 106 | 01000110 | F | LATIN CAPITAL LETTER F | |
| 71 | 47 | 107 | 01000111 | G | LATIN CAPITAL LETTER G | |
| 72 | 48 | 110 | 01001000 | H | LATIN CAPITAL LETTER H | |
| 73 | 49 | 111 | 01001001 | I | LATIN CAPITAL LETTER I | |
| 74 | 4A | 112 | 01001010 | J | LATIN CAPITAL LETTER J | |
| 75 | 4B | 113 | 01001011 | K | LATIN CAPITAL LETTER K | |
| 76 | 4C | 114 | 01001100 | L | LATIN CAPITAL LETTER L | |
| 77 | 4D | 115 | 01001101 | M | LATIN CAPITAL LETTER M | |
| 78 | 4E | 116 | 01001110 | N | LATIN CAPITAL LETTER N | |
| 79 | 4F | 117 | 01001111 | O | LATIN CAPITAL LETTER O | |
| 80 | 50 | 120 | 01010000 | P | LATIN CAPITAL LETTER P | |
| 81 | 51 | 121 | 01010001 | Q | LATIN CAPITAL LETTER Q | |
| 82 | 52 | 122 | 01010010 | R | LATIN CAPITAL LETTER R | |
| 83 | 53 | 123 | 01010011 | S | LATIN CAPITAL LETTER S | |
| 84 | 54 | 124 | 01010100 | T | LATIN CAPITAL LETTER T | |
| 85 | 55 | 125 | 01010101 | U | LATIN CAPITAL LETTER U | |
| 86 | 56 | 126 | 01010110 | V | LATIN CAPITAL LETTER V | |
| 87 | 57 | 127 | 01010111 | W | LATIN CAPITAL LETTER W | |
| 88 | 58 | 130 | 01011000 | X | LATIN CAPITAL LETTER X | |
| 89 | 59 | 131 | 01011001 | Y | LATIN CAPITAL LETTER Y | |
| 90 | 5A | 132 | 01011010 | Z | LATIN CAPITAL LETTER Z | |
| 91 | 5B | 133 | 01011011 | [ | LEFT SQUARE BRACKET | |
| 92 | 5C | 134 | 01011100 | \ | REVERSE SOLIDUS | The backslash. It is the escape character in almost every language and in regular expressions, which is why writing one in a string means typing two. |
| 93 | 5D | 135 | 01011101 | ] | RIGHT SQUARE BRACKET | |
| 94 | 5E | 136 | 01011110 | ^ | CIRCUMFLEX ACCENT | The caret. |
| 95 | 5F | 137 | 01011111 | _ | LOW LINE | The underscore. |
| 96 | 60 | 140 | 01100000 | ` | GRAVE ACCENT | The backtick. |
| 97 | 61 | 141 | 01100001 | a | LATIN SMALL LETTER A | Hex 61 — exactly 32 more than “A” at 41. Every letter keeps that offset, so an uppercase run and a lowercase run differ in one bit and nothing else. |
| 98 | 62 | 142 | 01100010 | b | LATIN SMALL LETTER B | |
| 99 | 63 | 143 | 01100011 | c | LATIN SMALL LETTER C | |
| 100 | 64 | 144 | 01100100 | d | LATIN SMALL LETTER D | |
| 101 | 65 | 145 | 01100101 | e | LATIN SMALL LETTER E | |
| 102 | 66 | 146 | 01100110 | f | LATIN SMALL LETTER F | |
| 103 | 67 | 147 | 01100111 | g | LATIN SMALL LETTER G | |
| 104 | 68 | 150 | 01101000 | h | LATIN SMALL LETTER H | |
| 105 | 69 | 151 | 01101001 | i | LATIN SMALL LETTER I | |
| 106 | 6A | 152 | 01101010 | j | LATIN SMALL LETTER J | |
| 107 | 6B | 153 | 01101011 | k | LATIN SMALL LETTER K | |
| 108 | 6C | 154 | 01101100 | l | LATIN SMALL LETTER L | |
| 109 | 6D | 155 | 01101101 | m | LATIN SMALL LETTER M | |
| 110 | 6E | 156 | 01101110 | n | LATIN SMALL LETTER N | |
| 111 | 6F | 157 | 01101111 | o | LATIN SMALL LETTER O | |
| 112 | 70 | 160 | 01110000 | p | LATIN SMALL LETTER P | |
| 113 | 71 | 161 | 01110001 | q | LATIN SMALL LETTER Q | |
| 114 | 72 | 162 | 01110010 | r | LATIN SMALL LETTER R | |
| 115 | 73 | 163 | 01110011 | s | LATIN SMALL LETTER S | |
| 116 | 74 | 164 | 01110100 | t | LATIN SMALL LETTER T | |
| 117 | 75 | 165 | 01110101 | u | LATIN SMALL LETTER U | |
| 118 | 76 | 166 | 01110110 | v | LATIN SMALL LETTER V | |
| 119 | 77 | 167 | 01110111 | w | LATIN SMALL LETTER W | |
| 120 | 78 | 170 | 01111000 | x | LATIN SMALL LETTER X | |
| 121 | 79 | 171 | 01111001 | y | LATIN SMALL LETTER Y | |
| 122 | 7A | 172 | 01111010 | z | LATIN SMALL LETTER Z | |
| 123 | 7B | 173 | 01111011 | { | LEFT CURLY BRACKET | |
| 124 | 7C | 174 | 01111100 | | | VERTICAL LINE | The pipe. |
| 125 | 7D | 175 | 01111101 | } | RIGHT CURLY BRACKET | |
| 126 | 7E | 176 | 01111110 | ~ | TILDE | |
| 127 | 7F | 177 | 01111111 | ␡ | DEL · Delete | All seven bits set, so on paper tape it punched every hole in the column. That made it the one code you could over-punch any other character into, which is a physical delete you cannot undo. It sits at the end of the table rather than with the other controls because of that encoding, not by accident.still used |
Control codes have no printable form, so the Char column shows a Unicode Control Picture — ␀, ␊, ␡ — which is a depiction of the code and not the code itself. Copying it will not give you the byte; use the escape shown in the description.
ASCII is a 7-bit code and ends at 127. Everything above that belongs to some other encoding, and those encodings disagree with each other. Below are fourteen byte values shown in three of the most common — ISO 8859-1 (Latin-1), Windows-1252, and IBM CP437, the original PC set. Same byte, three different characters. This is why “extended ASCII” names nothing you can act on, and why a file opened under the wrong assumption shows ’ where an apostrophe belongs.
| Dec | Hex | ISO 8859-1 | Windows-1252 | CP437 |
|---|---|---|---|---|
| 128 | 80 | unassigned (C1) | € | Ç |
| 133 | 85 | unassigned (C1 NEL) | … | à |
| 145 | 91 | unassigned (C1) | ‘ | æ |
| 146 | 92 | unassigned (C1) | ’ | Æ |
| 147 | 93 | unassigned (C1) | “ | ô |
| 148 | 94 | unassigned (C1) | ” | ö |
| 150 | 96 | unassigned (C1) | – | û |
| 151 | 97 | unassigned (C1) | — | ù |
| 153 | 99 | unassigned (C1) | ™ | Ö |
| 160 | A0 | no-break space | no-break space | á |
| 176 | B0 | ° | ° | ░ |
| 192 | C0 | À | À | └ |
| 233 | E9 | é | é | Θ |
| 255 | FF | ÿ | ÿ | no-break space |
Only a sample, deliberately. Printing one of these encodings in full and labelling it “extended ASCII” would repeat the exact mistake this section exists to correct. If you need a complete high-range table, the encoding’s own specification is the source to use, and you have to know which encoding you have before you open it.
How it works
- 1
Look something up in either direction
The box at the top takes whichever thing you already have. Paste a character and it returns the decimal, hexadecimal, octal and binary values, the official name, the escape sequence and the HTML entity where one exists. Type 65, 0x41, \x41, U+0041, 0o101 or 0b1000001 and it returns “A”. There is no direction switch, because there is nothing ambiguous to switch between.
- 2
Read the control codes as what they were
Codes 0 to 31 and 127 are not characters, and describing them as “unprintable” explains nothing. They were commands to a teleprinter: BEL rang a real bell, CR returned the print head to column 1, LF wound the paper up one line, and BS moved back one position so the next letter struck over the last. Every one carries a line on the job it was built for and whether it still has one.
- 3
Filter when you know part of the answer
The filter matches the character, the name, the abbreviation and every numeric form, so “0x4” narrows to one run of the table and “separator” finds the four data separators in one go. It also has a control-codes-only view, which is the half of ASCII most tables print without explaining.
- 4
Check the arithmetic yourself
The table is built to be verified rather than trusted. The digits run 48 to 57, so a digit’s value is its code minus 48. Capitals run 65 to 90 and lowercase 97 to 122 — exactly 32 apart, which is one bit, which is why case conversion used to be a single OR with 0x20. None of that needs a source; you can read it off the rows.
- 5
Then read the correction at the bottom
Above 127 the table stops and the comparison starts. Byte 128 is undefined in Latin-1, a euro sign in Windows-1252 and a Ç in CP437, and that is not an edge case — it is the reason a file opened with the wrong assumption shows ’ where an apostrophe should be.
Frequently asked questions
Why does ASCII stop at 127 instead of 255?
Because it is a 7-bit code, and 2^7 is 128. It was designed in the early 1960s for teleprinters and paper tape, where the eighth bit of a byte was often a parity bit used to detect a transmission error rather than to carry data. That is the whole answer: there was no eighth bit to spend. Every character above 127 that you have ever seen came from something built on top of ASCII afterwards, not from ASCII.
What is “extended ASCII”, then?
A phrase with no single meaning, which is why it causes so much trouble. Once the eighth bit became available, dozens of incompatible schemes filled 128–255 with different characters. ISO 8859-1 (Latin-1) put Western European accents there and left 128–159 unassigned. Windows-1252 filled that same gap with curly quotes, dashes and the euro sign. IBM’s CP437, the original PC character set, used the range for box-drawing characters and Greek letters instead. Byte 233 is “é” in the first two and “Θ” in CP437. Saying a file is “extended ASCII” tells you nothing about which of those it is — the comparison table on this page shows fourteen bytes where they disagree.
Why is DEL at 127, away from the other control codes?
Because of paper tape. 127 is 1111111 in binary — every bit set — so punching it made a hole in every position of the column. That meant any character already on the tape could be turned into DEL by punching the remaining holes, which is how you deleted something you could not un-punch. NUL sits at the other end for the mirror-image reason: all bits zero punched nothing at all, so it worked as blank leader tape and as filler.
Which control characters still matter today?
About a dozen. LF (10) is the newline on Unix and macOS and in every modern file format; CR (13) still pairs with it on Windows and is required by HTTP, SMTP and the other line-based protocols. HT (9) is the tab and the separator in TSV files. NUL (0) ends a C string. ESC (27) begins every ANSI terminal sequence, which is where terminal colour comes from. BEL (7) still beeps. Ctrl+C, Ctrl+D and Ctrl+Z are ETX, EOT and SUB. RS (30) is used by JSON Text Sequences and GS (29) by GS1 barcodes. The rest — SYN, ETB, DC2, EM — belong to synchronous links and paper tape and are effectively archaeology.
Is ASCII the same as UTF-8?
For the first 128 code points, byte for byte, yes — and that was deliberate. UTF-8 encodes anything below 128 as a single byte with the same value ASCII gives it, so every ASCII file is already a valid UTF-8 file. Above 127 they part company completely: UTF-8 uses two to four bytes per character, all with the high bit set. This is why ASCII text needs no conversion and why a Latin-1 file does — Latin-1’s “é” is one byte, 233, while UTF-8’s is two bytes, 195 and 169. Reading the second as the first is what produces “é”.
Why do the control codes show a symbol instead of a character?
Because they have no printable form, and putting something in that column would be an invention. What is shown is a Unicode Control Picture — ␀ for NUL, ␊ for LF, ␡ for DEL — from the U+2400 block, which exists precisely so a table can depict a control code without pretending it is one. It is a picture of the character, not the character, and copying it will not give you the byte.
How do I type a character when I only have its code?
It depends on where you are typing. In JavaScript, String.fromCharCode(65) or the escape \u0041 inside a string. In HTML, A in decimal or A in hex — and for five characters you should use the named entity instead: & < > " and '. In a Unix shell, printf '\101' takes octal. On Linux many applications accept Ctrl+Shift+U followed by the hex code point. The lookup box above prints the escape for the character you are looking at, so you can copy the right form rather than remember it.
Does anything I type here get sent anywhere?
No. The whole table is part of the JavaScript this page already loaded, so the lookup is a map read in your browser and nothing else. There is no request, and nothing is written to localStorage, so the page works with the network off and closing the tab leaves nothing behind.
Where do hex, octal and binary come from if only decimal is stored?
They are formatted from the decimal value at display time, and that is deliberate. All four columns are the same integer written in four bases, so a conversion cannot disagree with the row it sits in — whereas typing 512 numbers by hand would add 384 chances to make a typo that no reader could catch. What is written out by hand is everything a machine cannot derive: the names, the abbreviations, the Ctrl keys, and what each control code was built to do.