Skip to main content
ponderloop

ASCII Table

ASCII has 128 codes, numbered 0 to 127: 33 control characters and 95 printable ones (the space and 94 visible characters). Type a character, a number or a name such as tab to see its decimal, hex, octal and binary value, its control name and its HTML reference. The example, A (decimal 65), is hex 41, octal 101 and binary 01000001, in the uppercase letters group. Everything runs in your browser and nothing you type is sent anywhere.

Updated Runs in your browser: nothing you enter is uploadedHow this tool works

Try A, 65, 0x41, ^C, \n or tab

Read as character: A is decimal 65.

A (decimal 65)

Decimal
65
Hexadecimal
0x41
Octal
101
Binary
01000001
Character
A
Name
Latin capital letter A
Group
Uppercase letters
Caret notation
none
C escape
none
HTML entity
none
HTML numeric reference
A or A

A printable uppercase letter character.

A valid character reference.

All 128 ASCII codes

Control characters show their abbreviation; SP is the space. Binary is shown as a byte.

Showing all 128 codes.

The 128 ASCII codes in decimal, hex, octal and binary with character, name, caret notation and HTML reference
DecHexOctBinaryCharNameCaretHTML
00000000000000NULNull^@� (not allowed)
10100100000001SOHStart of Heading^A (not allowed)
20200200000010STXStart of Text^B (not allowed)
30300300000011ETXEnd of Text^C (not allowed)
40400400000100EOTEnd of Transmission^D (not allowed)
50500500000101ENQEnquiry^E (not allowed)
60600600000110ACKAcknowledge^F (not allowed)
70700700000111BELBell^G (not allowed)
80801000001000BSBackspace^H (not allowed)
90901100001001HTHorizontal Tabulation^I	
100A01200001010LFLine Feed^J

110B01300001011VTVertical Tabulation^K (not allowed)
120C01400001100FFForm Feed^L
130D01500001101CRCarriage Return^M
140E01600001110SOShift Out^N (not allowed)
150F01700001111SIShift In^O (not allowed)
161002000010000DLEData Link Escape^P (not allowed)
171102100010001DC1Device Control 1^Q (not allowed)
181202200010010DC2Device Control 2^R (not allowed)
191302300010011DC3Device Control 3^S (not allowed)
201402400010100DC4Device Control 4^T (not allowed)
211502500010101NAKNegative Acknowledge^U (not allowed)
221602600010110SYNSynchronous Idle^V (not allowed)
231702700010111ETBEnd of Transmission Block^W (not allowed)
241803000011000CANCancel^X (not allowed)
251903100011001EMEnd of Medium^Y (not allowed)
261A03200011010SUBSubstitute^Z (not allowed)
271B03300011011ESCEscape^[ (not allowed)
281C03400011100FSFile Separator^\ (not allowed)
291D03500011101GSGroup Separator^] (not allowed)
301E03600011110RSRecord Separator^^ (not allowed)
311F03700011111USUnit Separator^_ (not allowed)
322004000100000SPSpace– 
332104100100001!Exclamation mark–!
342204200100010"Quotation mark–" or "
352304300100011#Number sign–#
362404400100100$Dollar sign–$
372504500100101%Percent sign–%
382604600100110&Ampersand–& or &
392704700100111'Apostrophe–' or '
402805000101000(Left parenthesis–(
412905100101001)Right parenthesis–)
422A05200101010*Asterisk–*
432B05300101011+Plus sign–+
442C05400101100,Comma–,
452D05500101101-Hyphen-minus–-
462E05600101110.Full stop–.
472F05700101111/Solidus (slash)–/
4830060001100000Digit 0–0
4931061001100011Digit 1–1
5032062001100102Digit 2–2
5133063001100113Digit 3–3
5234064001101004Digit 4–4
5335065001101015Digit 5–5
5436066001101106Digit 6–6
5537067001101117Digit 7–7
5638070001110008Digit 8–8
5739071001110019Digit 9–9
583A07200111010:Colon–:
593B07300111011;Semicolon–&#59;
603C07400111100<Less-than sign–&lt; or &#60;
613D07500111101=Equals sign–&#61;
623E07600111110>Greater-than sign–&gt; or &#62;
633F07700111111?Question mark–&#63;
644010001000000@Commercial at–&#64;
654110101000001ALatin capital letter A–&#65;
664210201000010BLatin capital letter B–&#66;
674310301000011CLatin capital letter C–&#67;
684410401000100DLatin capital letter D–&#68;
694510501000101ELatin capital letter E–&#69;
704610601000110FLatin capital letter F–&#70;
714710701000111GLatin capital letter G–&#71;
724811001001000HLatin capital letter H–&#72;
734911101001001ILatin capital letter I–&#73;
744A11201001010JLatin capital letter J–&#74;
754B11301001011KLatin capital letter K–&#75;
764C11401001100LLatin capital letter L–&#76;
774D11501001101MLatin capital letter M–&#77;
784E11601001110NLatin capital letter N–&#78;
794F11701001111OLatin capital letter O–&#79;
805012001010000PLatin capital letter P–&#80;
815112101010001QLatin capital letter Q–&#81;
825212201010010RLatin capital letter R–&#82;
835312301010011SLatin capital letter S–&#83;
845412401010100TLatin capital letter T–&#84;
855512501010101ULatin capital letter U–&#85;
865612601010110VLatin capital letter V–&#86;
875712701010111WLatin capital letter W–&#87;
885813001011000XLatin capital letter X–&#88;
895913101011001YLatin capital letter Y–&#89;
905A13201011010ZLatin capital letter Z–&#90;
915B13301011011[Left square bracket–&#91;
925C13401011100\Reverse solidus (backslash)–&#92;
935D13501011101]Right square bracket–&#93;
945E13601011110^Circumflex accent–&#94;
955F13701011111_Low line (underscore)–&#95;
966014001100000`Grave accent–&#96;
976114101100001aLatin small letter a–&#97;
986214201100010bLatin small letter b–&#98;
996314301100011cLatin small letter c–&#99;
1006414401100100dLatin small letter d–&#100;
1016514501100101eLatin small letter e–&#101;
1026614601100110fLatin small letter f–&#102;
1036714701100111gLatin small letter g–&#103;
1046815001101000hLatin small letter h–&#104;
1056915101101001iLatin small letter i–&#105;
1066A15201101010jLatin small letter j–&#106;
1076B15301101011kLatin small letter k–&#107;
1086C15401101100lLatin small letter l–&#108;
1096D15501101101mLatin small letter m–&#109;
1106E15601101110nLatin small letter n–&#110;
1116F15701101111oLatin small letter o–&#111;
1127016001110000pLatin small letter p–&#112;
1137116101110001qLatin small letter q–&#113;
1147216201110010rLatin small letter r–&#114;
1157316301110011sLatin small letter s–&#115;
1167416401110100tLatin small letter t–&#116;
1177516501110101uLatin small letter u–&#117;
1187616601110110vLatin small letter v–&#118;
1197716701110111wLatin small letter w–&#119;
1207817001111000xLatin small letter x–&#120;
1217917101111001yLatin small letter y–&#121;
1227A17201111010zLatin small letter z–&#122;
1237B17301111011{Left curly bracket–&#123;
1247C17401111100|Vertical line–&#124;
1257D17501111101}Right curly bracket–&#125;
1267E17601111110~Tilde–&#126;
1277F17701111111DELDelete^?&#127; (not allowed)

The five groups of ASCII

The 128 codes split into 5 groups. Punctuation is spread over four runs because the digits and letters sit between them.
GroupDecimalHexCodes
Control characters0-31, 12700-1F, 7F33
Digits48-5730-3910
Uppercase letters65-9041-5A26
Lowercase letters97-12261-7A26
Punctuation, symbols and space32-47, 58-64, 91-96, 123-12620-2F, 3A-40, 5B-60, 7B-7E33

Control characters and their names

The 33 control codes: 0 to 31 and 127 (DEL). Caret notation is the code plus 64, written after a ^ (Ctrl+letter on a terminal); DEL is ^?. Names follow RFC 20.
DecHexAbbr.NameCaretC escapeWhat it does
000NULNull^@\0Does nothing. C uses it to end a string.
101SOHStart of Heading^A–Marked the start of a message header in a transmission.
202STXStart of Text^B–Marked the end of the header and the start of the text.
303ETXEnd of Text^C–Marked the end of the text. A terminal sends it for Ctrl+C, which usually interrupts a program.
404EOTEnd of Transmission^D–Ends a transmission. A Unix terminal sends it for Ctrl+D to signal end of input.
505ENQEnquiry^E–Asked the remote station to identify itself.
606ACKAcknowledge^F–Positive reply in a transmission protocol.
707BELBell^G\aSounds the terminal bell or beep.
808BSBackspace^H\bMoves the cursor one position back.
909HTHorizontal Tabulation^I\tMoves to the next tab stop. This is the Tab key.
100ALFLine Feed^J\nMoves to the next line. It is the line ending on Unix, Linux and macOS.
110BVTVertical Tabulation^K\vMoves down to the next vertical tab stop.
120CFFForm Feed^L\fAdvances to the next page.
130DCRCarriage Return^M\rMoves to the start of the line. CR followed by LF is the Windows and internet-protocol line ending.
140ESOShift Out^N–Switches to an alternate character set.
150FSIShift In^O–Switches back to the standard character set.
1610DLEData Link Escape^P–Changes the meaning of the characters that follow it in a protocol.
1711DC1Device Control 1^Q–Also called XON: resume sending. Terminals send it for Ctrl+Q.
1812DC2Device Control 2^R–Device control, with no fixed meaning.
1913DC3Device Control 3^S–Also called XOFF: pause sending. Terminals send it for Ctrl+S.
2014DC4Device Control 4^T–Device control, with no fixed meaning.
2115NAKNegative Acknowledge^U–Negative reply in a transmission protocol.
2216SYNSynchronous Idle^V–Kept a synchronous line in step when no data was being sent.
2317ETBEnd of Transmission Block^W–Ended a block of data in a transmission.
2418CANCancel^X–Marks the preceding data as in error and to be discarded.
2519EMEnd of Medium^Y–Marked the physical end of a tape or other medium.
261ASUBSubstitute^Z–Stands in for a character found invalid. DOS and Windows consoles treat Ctrl+Z (SUB) as end of file.
271BESCEscape^[\eStarts a terminal escape sequence, such as an ANSI colour code. The \e escape is a GCC and shell extension, not standard C.
281CFSFile Separator^\–Separator between files in a data stream.
291DGSGroup Separator^]–Separator between groups.
301ERSRecord Separator^^–Separator between records.
311FUSUnit Separator^_–Separator between units (fields).
1277FDELDelete^?–Originally punched every hole in paper tape to erase a character. Most protocols ignore it.

ASCII characters with an HTML entity name

Every other ASCII character is written with a numeric reference, or just as itself. Only these five have a classic named entity (&apos; arrived with HTML 5 and XML).
CharacterEntityDecimal referenceHex reference
" (Quotation mark)&quot;&#34;&#x22;
& (Ampersand)&amp;&#38;&#x26;
' (Apostrophe)&apos;&#39;&#x27;
< (Less-than sign)&lt;&#60;&#x3C;
> (Greater-than sign)&gt;&#62;&#x3E;

How to find an ASCII code

  1. Type what you know. Enter a character such as A, a number such as 65, 0x41 or 0b1000001, a caret form such as ^C, an escape such as \n, or a name such as tab, esc or line feed.
  2. Read the result card. It shows the code in decimal, hex, octal and binary, the character or control name, its group, caret notation, C escape and HTML references.
  3. Pick another reading. A lone digit such as 5 is both the character 5 and the number 5, and a word can match several names. Use the buttons under the result to switch.
  4. Browse the table. Use the group filter and the text box above the table to narrow all 128 rows to controls, digits, letters or punctuation.

Frequently asked questions

How many characters are in the ASCII table?
128, with codes 0 to 127, which fit in 7 bits. 33 are control characters (0 to 31 and 127) and 95 are printable: the space, 10 digits, 26 uppercase letters, 26 lowercase letters and 32 punctuation marks and symbols.
What is extended ASCII?
There is no single extended ASCII. Bytes 128 to 255 were assigned by many different 8-bit code pages, such as ISO 8859-1 and Windows-1252, so the same byte shows a different character in each. This table covers standard ASCII only. Unicode keeps the first 128 code points identical to ASCII, and UTF-8 encodes each of them as the same single byte.
Why do uppercase and lowercase letters differ by 32?
Each lowercase letter is its uppercase letter plus 32: A is 65 (binary 01000001) and a is 97 (binary 01100001). Only one bit differs, the 0x20 bit, so software can change case by flipping it. Digits work in a similar way: 0 is 48 (hex 30), so a digit's value is its code minus 48.
What is caret notation, such as ^C or ^@?
Caret notation writes a control character as ^ followed by the character whose code is 64 higher: code 0 is ^@, code 1 is ^A, code 3 is ^C and code 27 is ^[. It matches holding Ctrl and pressing that key on a terminal, which clears the top bits of the key's code. DEL (127) is written ^? by convention.
What is the difference between LF, CR and CRLF?
LF (Line Feed, code 10, \n) moves down a line and CR (Carriage Return, code 13, \r) returns to the start of the line. Unix, Linux and macOS end lines with LF alone. Windows and many internet protocols, such as HTTP and SMTP headers, use CR followed by LF. Mixing them is a common cause of stray ^M characters in files.
Why is the space character in the punctuation group?
The space (code 32, hex 20) is the first printable code. RFC 20 treats it as a non-printing graphic rather than a control, because it advances the position like a character. This page lists it as SP in the punctuation group, and the control group holds only true controls.
Which control characters do people still use?
Mostly NUL (the end of a C string), HT (tab), LF and CR (line endings), ESC (terminal colour and cursor sequences), BEL (the terminal beep) and BS and DEL (deleting). ETX (Ctrl+C) and EOT (Ctrl+D) are still sent by Unix terminals. Most of the rest, such as SOH, STX and the separators, were made for teletype and tape protocols.
Can I write a control character in HTML?
Tab, line feed, form feed and carriage return are valid whitespace in HTML. The other control characters are parse errors even as numeric references such as &#7;, and &#0; is replaced by the replacement character U+FFFD. Do not put them in web pages; use them in text files, terminals and protocols instead.
Why does Unicode call HT “character tabulation”?
The Unicode chart for the C0 controls gives some codes newer ISO 6429 names: HT is also CHARACTER TABULATION and VT is LINE TABULATION. The RFC 20 names used here, Horizontal Tabulation and Vertical Tabulation, describe the same codes, and the lookup box accepts both.

How it works

The table has 128 rows built in code. The 34 abbreviations, names, C escapes and one-line purposes of the control characters and space are written by hand from RFC 20 and the Unicode C0 controls chart; every other column is computed from the code. Decimal, hex, octal and binary come from the number itself (binary is shown as a byte, with a leading zero, although ASCII is a 7-bit code). Caret notation is the code plus 64 for 0 to 31, and ^? for 127. The group comes from the code range. HTML references are &#N; and &#xH; for every code, with a named entity only for 5 characters (&quot;, &amp;, &apos;, &lt;, &gt;). The lookup reads one character as itself; a number as decimal, or as hex, octal or binary with a 0x, 0o or 0b prefix, U+, \x, an h suffix, &#N; or &#xH;; ^X as caret notation; C escapes such as \n; an entity such as &amp;; and any other text as a control name, abbreviation or alias (tab, newline, esc), listing every match when a word fits several. Numbers above 127 are reported as not ASCII. Nothing leaves your browser.

Sources

More: Encoding and number systemsAll developer toolsAll toolsHome & DIY calculators