Skip to content
ASCII Table

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
Look up a character or a code

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

Decimal
65
Hex
0x41
Octal
0101
Binary
01000001
Character
A
JS escape
A
HTML
A
CSS / URL
\41 · %41
Keyboard
—

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.

The full table — 128 codes
128 of 128 shown
DecHexOctBinaryCharNameDescription
00000000000000␀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
10100100000001␁SOH · Start of Heading[Ctrl+A]Marked the start of a message’s addressing header, before the text itself began.
20200200000010␂STX · Start of Text[Ctrl+B]Ended the heading and began the message body.
30300300000011␃ETX · End of Text[Ctrl+C]Closed the message body. It survives as Ctrl+C, which Unix terminals repurposed into the interrupt key.
40400400000100␄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.
50500500000101␅ENQ · Enquiry[Ctrl+E]Asked the far end “who are you?” and expected an identification in reply.
60600600000110␆ACK · Acknowledge[Ctrl+F]Positive reply: the last block arrived intact, send the next one.
70700700000111␇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
80801000001000␈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
90901100001001␉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
100A01200001010␊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
110B01300001011␋VT · Vertical Tab[Ctrl+K \v]Advanced to the next vertical tab stop, for pre-printed forms. Almost nothing reaches for it now.
120C01400001100␌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
130D01500001101␍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
140E01600001110␎SO · Shift Out[Ctrl+N]Switched the device to an alternate character set, which stayed in effect until SI switched it back.
150F01700001111␏SI · Shift In[Ctrl+O]Switched back to the standard character set.
161002000010000␐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.
171102100010001␑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
181202200010010␒DC2 · Device Control 2[Ctrl+R]Device-specific with no agreed meaning — terminals and printers each assigned it differently.
191302300010011␓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
201402400010100␔DC4 · Device Control 4[Ctrl+T]Device-specific, often used as a general stop, but with no single agreed meaning across devices.
211502500010101␕NAK · Negative Acknowledge[Ctrl+U]The negative counterpart of ACK: the last block was damaged, send it again.
221602600010110␖SYN · Synchronous Idle[Ctrl+V]Sent to fill a synchronous line that had no data on it, so the two ends stayed in step.
231702700010111␗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.
241803000011000␘CAN · Cancel[Ctrl+X]Told the receiver that the data preceding it was in error and should be discarded.
251903100011001␙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.
261A03200011010␚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
271B03300011011␛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
281C03400011100␜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.
291D03500011101␝GS · Group Separator[Ctrl+]]One level in from FS. Still genuinely used: GS1 barcodes separate their application-identifier fields with it.still used
301E03600011110␞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
311F03700011111␟US · Unit Separator[Ctrl+_]The finest of the four, sitting between individual fields of one record.
322004000100000␠SPACEA 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 “+”.
332104100100001!EXCLAMATION MARK
342204200100010"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.
352304300100011#NUMBER SIGNHash, 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.
362404400100100$DOLLAR SIGN
372504500100101%PERCENT SIGNBegins a percent-escape in a URL, so a literal one has to be written %25.
382604600100110&AMPERSAND[&]
392704700100111'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.
402805000101000(LEFT PARENTHESIS
412905100101001)RIGHT PARENTHESIS
422A05200101010*ASTERISK
432B05300101011+PLUS SIGN
442C05400101100,COMMA
452D05500101101-HYPHEN-MINUSOne 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.
462E05600101110.FULL STOPPeriod, dot, point.
472F05700101111/SOLIDUSThe forward slash.
4830060001100000DIGIT ZEROThe digits run 48–57, so the numeric value of a digit character is its code minus 48.
4931061001100011DIGIT ONE
5032062001100102DIGIT TWO
5133063001100113DIGIT THREE
5234064001101004DIGIT FOUR
5335065001101015DIGIT FIVE
5436066001101106DIGIT SIX
5537067001101117DIGIT SEVEN
5638070001110008DIGIT EIGHT
5739071001110019DIGIT NINE
583A07200111010:COLON
593B07300111011;SEMICOLON
603C07400111100<LESS-THAN SIGN[&lt;]
613D07500111101=EQUALS SIGN
623E07600111110>GREATER-THAN SIGN[&gt;]
633F07700111111?QUESTION MARK
644010001000000@COMMERCIAL AT
654110101000001ALATIN CAPITAL LETTER AHex 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.
664210201000010BLATIN CAPITAL LETTER B
674310301000011CLATIN CAPITAL LETTER C
684410401000100DLATIN CAPITAL LETTER D
694510501000101ELATIN CAPITAL LETTER E
704610601000110FLATIN CAPITAL LETTER F
714710701000111GLATIN CAPITAL LETTER G
724811001001000HLATIN CAPITAL LETTER H
734911101001001ILATIN CAPITAL LETTER I
744A11201001010JLATIN CAPITAL LETTER J
754B11301001011KLATIN CAPITAL LETTER K
764C11401001100LLATIN CAPITAL LETTER L
774D11501001101MLATIN CAPITAL LETTER M
784E11601001110NLATIN CAPITAL LETTER N
794F11701001111OLATIN CAPITAL LETTER O
805012001010000PLATIN CAPITAL LETTER P
815112101010001QLATIN CAPITAL LETTER Q
825212201010010RLATIN CAPITAL LETTER R
835312301010011SLATIN CAPITAL LETTER S
845412401010100TLATIN CAPITAL LETTER T
855512501010101ULATIN CAPITAL LETTER U
865612601010110VLATIN CAPITAL LETTER V
875712701010111WLATIN CAPITAL LETTER W
885813001011000XLATIN CAPITAL LETTER X
895913101011001YLATIN CAPITAL LETTER Y
905A13201011010ZLATIN CAPITAL LETTER Z
915B13301011011[LEFT SQUARE BRACKET
925C13401011100\REVERSE SOLIDUSThe 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.
935D13501011101]RIGHT SQUARE BRACKET
945E13601011110^CIRCUMFLEX ACCENTThe caret.
955F13701011111_LOW LINEThe underscore.
966014001100000`GRAVE ACCENTThe backtick.
976114101100001aLATIN SMALL LETTER AHex 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.
986214201100010bLATIN SMALL LETTER B
996314301100011cLATIN SMALL LETTER C
1006414401100100dLATIN SMALL LETTER D
1016514501100101eLATIN SMALL LETTER E
1026614601100110fLATIN SMALL LETTER F
1036714701100111gLATIN SMALL LETTER G
1046815001101000hLATIN SMALL LETTER H
1056915101101001iLATIN SMALL LETTER I
1066A15201101010jLATIN SMALL LETTER J
1076B15301101011kLATIN SMALL LETTER K
1086C15401101100lLATIN SMALL LETTER L
1096D15501101101mLATIN SMALL LETTER M
1106E15601101110nLATIN SMALL LETTER N
1116F15701101111oLATIN SMALL LETTER O
1127016001110000pLATIN SMALL LETTER P
1137116101110001qLATIN SMALL LETTER Q
1147216201110010rLATIN SMALL LETTER R
1157316301110011sLATIN SMALL LETTER S
1167416401110100tLATIN SMALL LETTER T
1177516501110101uLATIN SMALL LETTER U
1187616601110110vLATIN SMALL LETTER V
1197716701110111wLATIN SMALL LETTER W
1207817001111000xLATIN SMALL LETTER X
1217917101111001yLATIN SMALL LETTER Y
1227A17201111010zLATIN SMALL LETTER Z
1237B17301111011{LEFT CURLY BRACKET
1247C17401111100|VERTICAL LINEThe pipe.
1257D17501111101}RIGHT CURLY BRACKET
1267E17601111110~TILDE
1277F17701111111␡DEL · DeleteAll 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.

Above 127 — there is no “extended ASCII”

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.

DecHexISO 8859-1Windows-1252CP437
12880unassigned (C1)ۂ
13385unassigned (C1 NEL)…à
14591unassigned (C1)‘æ
14692unassigned (C1)’Æ
14793unassigned (C1)“ô
14894unassigned (C1)”ö
15096unassigned (C1)–û
15197unassigned (C1)—ù
15399unassigned (C1)™Ö
160A0no-break spaceno-break spaceá
176B0°°░
192C0ÀÀ└
233E9ééΘ
255FFÿÿ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. 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. 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. 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. 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. 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, &#65; in decimal or &#x41; in hex — and for five characters you should use the named entity instead: &amp; &lt; &gt; &quot; and &#39;. 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.