ASCII table

Every ASCII code in decimal, hexadecimal, octal and binary, with HTML entities and character names — plus a converter for turning text into codes and back.

Text and ASCII converter

Control characters 0–31, 127

Non-printing codes inherited from teleprinters. Most are obsolete; tab, line feed, carriage return, null and escape are still in daily use.

DecHexOctBinaryCharHTMLName
00000000000000NUL \0�Null
10100100000001SOHStart of Heading
20200200000010STXStart of Text
30300300000011ETXEnd of Text
40400400000100EOTEnd of Transmission
50500500000101ENQEnquiry
60600600000110ACKAcknowledge
70700700000111BEL \aBell
80801000001000BS \bBackspace
90901100001001HT \t	Horizontal Tab
100A01200001010LF \n
Line Feed
110B01300001011VT \vVertical Tab
120C01400001100FF \fForm Feed
130D01500001101CR \r
Carriage Return
140E01600001110SOShift Out
150F01700001111SIShift In
161002000010000DLEData Link Escape
171102100010001DC1Device Control 1 (XON)
181202200010010DC2Device Control 2
191302300010011DC3Device Control 3 (XOFF)
201402400010100DC4Device Control 4
211502500010101NAKNegative Acknowledge
221602600010110SYNSynchronous Idle
231702700010111ETBEnd of Transmission Block
241803000011000CANCancel
251903100011001EMEnd of Medium
261A03200011010SUBSubstitute
271B03300011011ESC \eEscape
281C03400011100FSFile Separator
291D03500011101GSGroup Separator
301E03600011110RSRecord Separator
311F03700011111USUnit Separator
1277F17701111111DELDelete

Printable ASCII 32–126

The 95 characters every system agrees on — space, punctuation, digits and the unaccented Latin alphabet.

DecHexOctBinaryCharHTMLName
322004000100000SP Space
332104100100001!!Exclamation mark
342204200100010"" "Double quote
352304300100011##Number sign / hash
362404400100100$$Dollar sign
372504500100101%%Percent sign
382604600100110&& &Ampersand
392704700100111''Apostrophe
402805000101000((Left parenthesis
412905100101001))Right parenthesis
422A05200101010**Asterisk
432B05300101011++Plus sign
442C05400101100,,Comma
452D05500101101--Hyphen-minus
462E05600101110..Full stop / period
472F05700101111//Slash
48300600011000000Digit 0
49310610011000111Digit 1
50320620011001022Digit 2
51330630011001133Digit 3
52340640011010044Digit 4
53350650011010155Digit 5
54360660011011066Digit 6
55370670011011177Digit 7
56380700011100088Digit 8
57390710011100199Digit 9
583A07200111010::Colon
593B07300111011;&#59;Semicolon
603C07400111100<&#60; &lt;Less-than sign
613D07500111101=&#61;Equals sign
623E07600111110>&#62; &gt;Greater-than sign
633F07700111111?&#63;Question mark
644010001000000@&#64;At sign
654110101000001A&#65;Uppercase A
664210201000010B&#66;Uppercase B
674310301000011C&#67;Uppercase C
684410401000100D&#68;Uppercase D
694510501000101E&#69;Uppercase E
704610601000110F&#70;Uppercase F
714710701000111G&#71;Uppercase G
724811001001000H&#72;Uppercase H
734911101001001I&#73;Uppercase I
744A11201001010J&#74;Uppercase J
754B11301001011K&#75;Uppercase K
764C11401001100L&#76;Uppercase L
774D11501001101M&#77;Uppercase M
784E11601001110N&#78;Uppercase N
794F11701001111O&#79;Uppercase O
805012001010000P&#80;Uppercase P
815112101010001Q&#81;Uppercase Q
825212201010010R&#82;Uppercase R
835312301010011S&#83;Uppercase S
845412401010100T&#84;Uppercase T
855512501010101U&#85;Uppercase U
865612601010110V&#86;Uppercase V
875712701010111W&#87;Uppercase W
885813001011000X&#88;Uppercase X
895913101011001Y&#89;Uppercase Y
905A13201011010Z&#90;Uppercase Z
915B13301011011[&#91;Left square bracket
925C13401011100\&#92;Backslash
935D13501011101]&#93;Right square bracket
945E13601011110^&#94;Caret
955F13701011111_&#95;Underscore
966014001100000`&#96;Grave accent
976114101100001a&#97;Lowercase a
986214201100010b&#98;Lowercase b
996314301100011c&#99;Lowercase c
1006414401100100d&#100;Lowercase d
1016514501100101e&#101;Lowercase e
1026614601100110f&#102;Lowercase f
1036714701100111g&#103;Lowercase g
1046815001101000h&#104;Lowercase h
1056915101101001i&#105;Lowercase i
1066A15201101010j&#106;Lowercase j
1076B15301101011k&#107;Lowercase k
1086C15401101100l&#108;Lowercase l
1096D15501101101m&#109;Lowercase m
1106E15601101110n&#110;Lowercase n
1116F15701101111o&#111;Lowercase o
1127016001110000p&#112;Lowercase p
1137116101110001q&#113;Lowercase q
1147216201110010r&#114;Lowercase r
1157316301110011s&#115;Lowercase s
1167416401110100t&#116;Lowercase t
1177516501110101u&#117;Lowercase u
1187616601110110v&#118;Lowercase v
1197716701110111w&#119;Lowercase w
1207817001111000x&#120;Lowercase x
1217917101111001y&#121;Lowercase y
1227A17201111010z&#122;Lowercase z
1237B17301111011{&#123;Left curly brace
1247C17401111100|&#124;Vertical bar
1257D17501111101}&#125;Right curly brace
1267E17601111110~&#126;Tilde

Extended ASCII 128–255

Not part of the ASCII standard. Shown here as Windows-1252, the most common mapping on the web; codes 160–255 match Latin-1 exactly, while 128–159 differ.

DecHexOctBinaryCharHTMLCode point
1288020010000000€&#128; &euro;U+20AC
1298120110000001—&#129;Unused in Windows-1252
1308220210000010‚&#130; &sbquo;U+201A
1318320310000011ƒ&#131; &fnof;U+0192
1328420410000100„&#132; &bdquo;U+201E
1338520510000101…&#133; &hellip;U+2026
1348620610000110†&#134; &dagger;U+2020
1358720710000111‡&#135; &Dagger;U+2021
1368821010001000ˆ&#136; &circ;U+02C6
1378921110001001‰&#137; &permil;U+2030
1388A21210001010Š&#138; &Scaron;U+0160
1398B21310001011‹&#139; &lsaquo;U+2039
1408C21410001100Œ&#140; &OElig;U+0152
1418D21510001101—&#141;Unused in Windows-1252
1428E21610001110Ž&#142; &Zcaron;U+017D
1438F21710001111—&#143;Unused in Windows-1252
1449022010010000—&#144;Unused in Windows-1252
1459122110010001‘&#145; &lsquo;U+2018
1469222210010010’&#146; &rsquo;U+2019
1479322310010011“&#147; &ldquo;U+201C
1489422410010100”&#148; &rdquo;U+201D
1499522510010101•&#149; &bull;U+2022
1509622610010110–&#150; &ndash;U+2013
1519722710010111—&#151; &mdash;U+2014
1529823010011000˜&#152; &tilde;U+02DC
1539923110011001™&#153; &trade;U+2122
1549A23210011010š&#154; &scaron;U+0161
1559B23310011011›&#155; &rsaquo;U+203A
1569C23410011100œ&#156; &oelig;U+0153
1579D23510011101—&#157;Unused in Windows-1252
1589E23610011110ž&#158; &zcaron;U+017E
1599F23710011111Ÿ&#159; &Yuml;U+0178
160A024010100000 &#160; &nbsp;U+00A0
161A124110100001¡&#161; &iexcl;U+00A1
162A224210100010¢&#162; &cent;U+00A2
163A324310100011£&#163; &pound;U+00A3
164A424410100100¤&#164; &curren;U+00A4
165A524510100101¥&#165; &yen;U+00A5
166A624610100110¦&#166; &brvbar;U+00A6
167A724710100111§&#167; &sect;U+00A7
168A825010101000¨&#168; &uml;U+00A8
169A925110101001©&#169; &copy;U+00A9
170AA25210101010ª&#170; &ordf;U+00AA
171AB25310101011«&#171; &laquo;U+00AB
172AC25410101100¬&#172; &not;U+00AC
173AD25510101101­&#173; &shy;U+00AD
174AE25610101110®&#174; &reg;U+00AE
175AF25710101111¯&#175; &macr;U+00AF
176B026010110000°&#176; &deg;U+00B0
177B126110110001±&#177; &plusmn;U+00B1
178B226210110010²&#178; &sup2;U+00B2
179B326310110011³&#179; &sup3;U+00B3
180B426410110100´&#180; &acute;U+00B4
181B526510110101µ&#181; &micro;U+00B5
182B626610110110&#182; &para;U+00B6
183B726710110111·&#183; &middot;U+00B7
184B827010111000¸&#184; &cedil;U+00B8
185B927110111001¹&#185; &sup1;U+00B9
186BA27210111010º&#186; &ordm;U+00BA
187BB27310111011»&#187; &raquo;U+00BB
188BC27410111100¼&#188; &frac14;U+00BC
189BD27510111101½&#189; &frac12;U+00BD
190BE27610111110¾&#190; &frac34;U+00BE
191BF27710111111¿&#191; &iquest;U+00BF
192C030011000000À&#192; &Agrave;U+00C0
193C130111000001Á&#193; &Aacute;U+00C1
194C230211000010Â&#194; &Acirc;U+00C2
195C330311000011Ã&#195; &Atilde;U+00C3
196C430411000100Ä&#196; &Auml;U+00C4
197C530511000101Å&#197; &Aring;U+00C5
198C630611000110Æ&#198; &AElig;U+00C6
199C730711000111Ç&#199; &Ccedil;U+00C7
200C831011001000È&#200; &Egrave;U+00C8
201C931111001001É&#201; &Eacute;U+00C9
202CA31211001010Ê&#202; &Ecirc;U+00CA
203CB31311001011Ë&#203; &Euml;U+00CB
204CC31411001100Ì&#204; &Igrave;U+00CC
205CD31511001101Í&#205; &Iacute;U+00CD
206CE31611001110Î&#206; &Icirc;U+00CE
207CF31711001111Ï&#207; &Iuml;U+00CF
208D032011010000Ð&#208; &ETH;U+00D0
209D132111010001Ñ&#209; &Ntilde;U+00D1
210D232211010010Ò&#210; &Ograve;U+00D2
211D332311010011Ó&#211; &Oacute;U+00D3
212D432411010100Ô&#212; &Ocirc;U+00D4
213D532511010101Õ&#213; &Otilde;U+00D5
214D632611010110Ö&#214; &Ouml;U+00D6
215D732711010111×&#215; &times;U+00D7
216D833011011000Ø&#216; &Oslash;U+00D8
217D933111011001Ù&#217; &Ugrave;U+00D9
218DA33211011010Ú&#218; &Uacute;U+00DA
219DB33311011011Û&#219; &Ucirc;U+00DB
220DC33411011100Ü&#220; &Uuml;U+00DC
221DD33511011101Ý&#221; &Yacute;U+00DD
222DE33611011110Þ&#222; &THORN;U+00DE
223DF33711011111ß&#223; &szlig;U+00DF
224E034011100000à&#224; &agrave;U+00E0
225E134111100001á&#225; &aacute;U+00E1
226E234211100010â&#226; &acirc;U+00E2
227E334311100011ã&#227; &atilde;U+00E3
228E434411100100ä&#228; &auml;U+00E4
229E534511100101å&#229; &aring;U+00E5
230E634611100110æ&#230; &aelig;U+00E6
231E734711100111ç&#231; &ccedil;U+00E7
232E835011101000è&#232; &egrave;U+00E8
233E935111101001é&#233; &eacute;U+00E9
234EA35211101010ê&#234; &ecirc;U+00EA
235EB35311101011ë&#235; &euml;U+00EB
236EC35411101100ì&#236; &igrave;U+00EC
237ED35511101101í&#237; &iacute;U+00ED
238EE35611101110î&#238; &icirc;U+00EE
239EF35711101111ï&#239; &iuml;U+00EF
240F036011110000ð&#240; &eth;U+00F0
241F136111110001ñ&#241; &ntilde;U+00F1
242F236211110010ò&#242; &ograve;U+00F2
243F336311110011ó&#243; &oacute;U+00F3
244F436411110100ô&#244; &ocirc;U+00F4
245F536511110101õ&#245; &otilde;U+00F5
246F636611110110ö&#246; &ouml;U+00F6
247F736711110111÷&#247; &divide;U+00F7
248F837011111000ø&#248; &oslash;U+00F8
249F937111111001ù&#249; &ugrave;U+00F9
250FA37211111010ú&#250; &uacute;U+00FA
251FB37311111011û&#251; &ucirc;U+00FB
252FC37411111100ü&#252; &uuml;U+00FC
253FD37511111101ý&#253; &yacute;U+00FD
254FE37611111110þ&#254; &thorn;U+00FE
255FF37711111111ÿ&#255; &yuml;U+00FF

How ASCII encodes text

ASCII assigns a number to each character, and that number is what a computer actually stores. The encoding uses seven bits, which gives 128 possible values, numbered 0 to 127. Thirty-three of those are control codes that instruct a device rather than print anything; the remaining ninety-five are the printable characters — space, punctuation, the ten digits and the unaccented Latin alphabet in both cases.

The layout is not arbitrary, and noticing the structure makes the table far easier to remember. Uppercase letters run from 65 to 90 and lowercase from 97 to 122, a gap of exactly 32 — one bit — so changing case means flipping bit 6 and nothing else. The digits occupy 48 to 57, which in hexadecimal is 0x30 to 0x39, so the last hex digit is the numeral: mask off the high bits of the character '7' and you get the number 7. Control codes sit first precisely so that everything printable begins at a clean boundary, with space at 32.

The history of ASCII

ASCII was published in 1963 by the American Standards Association as ASA X3.4, the work of the X3.2 subcommittee on which IBM's Bob Bemer was a leading figure — he is often called the father of ASCII and is credited with getting the escape character into the standard. A significant revision in 1967 produced the layout still in use, and the 1986 edition, ANSI X3.4-1986, is the version usually cited today.

The control codes make much more sense once you know the machinery they were written for. These were teleprinters: BEL at code 7 rang a physical bell to get the operator's attention, BS moved the print head back one position so a character could be struck over, and the separation of carriage return from line feed existed because they were two distinct mechanical actions — return the carriage to the left margin, then advance the paper by one line. That distinction is the direct ancestor of the line-ending disagreement between Windows, which still writes both, and Unix, which writes only the line feed.

ASCII was not universal at first. IBM's mainframes used EBCDIC, an entirely different and incompatible encoding, and moving data between the two worlds was a standing nuisance for decades. What settled the matter was Unicode: when UTF-8 was designed in 1992, Ken Thompson and Rob Pike made the first 128 code points identical to ASCII and encoded them as single bytes with the same values. Every ASCII file became a valid UTF-8 file overnight, and that backward compatibility is a large part of why UTF-8 now encodes almost the entire web.

Extended ASCII is not one thing

Once hardware settled on eight-bit bytes, the spare bit left room for another 128 characters above 127 — and everyone filled that space differently. IBM's code page 437 put box-drawing characters and Greek letters there for the original PC. ISO 8859-1, usually called Latin-1, used it for Western European accented letters. Microsoft's Windows-1252 is Latin-1 with the unused 128–159 range filled in with curly quotes, dashes, the euro sign and similar typographic characters.

The consequence is that a byte above 127 has no single meaning. The value 233 is é in Latin-1 and Windows-1252, but Θ in code page 437. This is the root cause of the classic mojibake you still meet today — the "’" that appears where an apostrophe should be is UTF-8 bytes being read as Windows-1252. The table above shows the Windows-1252 interpretation because it is the one most often encountered on the web, and gives the Unicode code point for each so there is no ambiguity about which character is meant.

Where ASCII codes are still worth knowing

Looking up a code is a routine step in several everyday jobs. Debugging data that will not parse usually means finding a stray control character or a non-ASCII byte where plain text was expected. Writing or reading regular expressions often means working in character ranges, and knowing that digits are 48–57 and uppercase 65–90 explains why [A-Za-z0-9] is written the way it is. Escaping characters for HTML, URLs or a shell depends on knowing precisely which character you have. And anyone working with serial devices, terminal escape sequences or fixed-width file formats meets the control codes directly.

Related conversions live in their own tools: binary to text converts whole messages between 8-bit binary and readable text, the base converter moves any number between binary, octal, decimal and hexadecimal, and HTML encoder / decoder converts characters to and from the entity codes shown in the table. For characters beyond ASCII, see special characters & symbols, and for the invisible ones that break parsing, the invisible character detector.

Frequently asked questions

What is the ASCII value of A?

Uppercase A is 65 in decimal — 41 in hexadecimal, 101 in octal and 01000001 in binary. Lowercase a is 97, exactly 32 higher, and that offset holds for every letter in the alphabet, so Z is 90 and z is 122. The gap is deliberate rather than coincidental: 32 is a single bit, so the only difference between an uppercase and a lowercase letter is bit 6, which allowed early hardware and software to change case by flipping one bit instead of performing a lookup.

How many characters are in the ASCII table?

Standard ASCII defines 128 characters, numbered 0 to 127, because the encoding is seven bits wide. Thirty-three of those are non-printing control characters — codes 0 to 31 plus 127, the delete code — and the remaining ninety-five are printable, a count that includes the space at 32. Tables advertising 256 characters are showing extended ASCII, where everything above 127 is outside the ASCII standard and depends entirely on which code page the system is using.

What is the difference between ASCII and Unicode?

Scope, mainly. ASCII covers 128 characters, which is sufficient for unaccented English and nothing else. Unicode covers over 150,000 characters spanning essentially every writing system in use, along with symbols and emoji. The two were deliberately made compatible: the first 128 Unicode code points are identical to ASCII, and UTF-8 encodes exactly those as single bytes with the same numeric values. The practical upshot is that any file containing only ASCII is already valid UTF-8 with no conversion whatsoever, which is a large part of why UTF-8 displaced every competing encoding.

What are ASCII control characters used for today?

A small number remain essential and the rest are museum pieces. Line feed (10) and carriage return (13) still terminate lines, with Unix and macOS using LF alone while Windows writes CR followed by LF — a split inherited directly from teleprinters, where returning the carriage and advancing the paper were two separate mechanical operations. Tab (9) is ubiquitous, null (0) terminates strings in C and related languages, and escape (27) introduces the ANSI sequences that colour and position text in a terminal. The device control codes, the separators and most of the rest were designed for teletypes, paper tape and magnetic tape, and are effectively dead outside legacy protocols.

What is extended ASCII?

Extended ASCII is a loose label for any scheme that uses the eighth bit of a byte to add 128 more characters above code 127. The essential thing to understand is that there is no single extended ASCII: ISO 8859-1 (Latin-1), Windows-1252 and IBM code page 437 all assign completely different characters to the same numbers. Byte 233 is é in Latin-1 but Θ in code page 437, which is precisely why text moved between systems used to arrive as nonsense. The table on this page shows Windows-1252, the mapping most often met on the web, and lists the Unicode code point alongside each character so there is no ambiguity.

How do I convert text to ASCII codes?

Use the converter at the top of this page. Type or paste your text on the left, choose decimal, hexadecimal, octal or binary, and the codes appear immediately with one value per character. The panel works in both directions, so pasting 72 101 108 108 111 into the right-hand box returns Hello. Values are separated by spaces, and the reverse direction also accepts commas or line breaks. Everything is calculated in your browser, so nothing is uploaded. Characters above 127 are reported as Unicode code points, with a note, since they are not strictly ASCII.

Why is the ASCII code for a space 32?

Because the first thirty-two slots were reserved for control functions, so space — the first genuinely printable character — took the next one available. The choice proved unusually convenient. In binary, 32 is 00100000, a single bit set, which is what makes the offset between uppercase and lowercase letters exactly one bit. It also places space immediately before the punctuation, digits and letters in numeric order, so a plain sort by character code puts spaces first, which is generally what you want.