ASCII table

All 128 ASCII characters with their decimal, hex, octal, binary and HTML codes. Search by character or by any code (A, 65, 0x41 or 01000001 all find the same row), click a row to copy the character, and tick the box to add codes 128 to 255. The buttons under the search box narrow the table to control codes, digits, uppercase, lowercase, punctuation or the extended set, and Print or save as PDF gives a clean copy of whatever is showing.

128 characters

DecHexOctBinaryCharacterHTML code
00000000000000NUL Null�
10100100000001SOH Start of heading
20200200000010STX Start of text
30300300000011ETX End of text
40400400000100EOT End of transmission
50500500000101ENQ Enquiry
60600600000110ACK Acknowledge
70700700000111BEL Bell
80801000001000BS Backspace
90901100001001TAB Horizontal tab	
100A01200001010LF Line feed (new line)

110B01300001011VT Vertical tab
120C01400001100FF Form feed
130D01500001101CR Carriage return
140E01600001110SO Shift out
150F01700001111SI Shift in
161002000010000DLE Data link escape
171102100010001DC1 Device control 1
181202200010010DC2 Device control 2
191302300010011DC3 Device control 3
201402400010100DC4 Device control 4
211502500010101NAK Negative acknowledge
221602600010110SYN Synchronous idle
231702700010111ETB End of block
241803000011000CAN Cancel
251903100011001EM End of medium
261A03200011010SUB Substitute
271B03300011011ESC Escape
281C03400011100FS File separator
291D03500011101GS Group separator
301E03600011110RS Record separator
311F03700011111US Unit separator
322004000100000space 
332104100100001!!
342204200100010""
352304300100011##
362404400100100$$
372504500100101%%
382604600100110&&
392704700100111''
402805000101000((
412905100101001))
422A05200101010**
432B05300101011++
442C05400101100,,
452D05500101101--
462E05600101110..
472F05700101111//
48300600011000000
49310610011000111
50320620011001022
51330630011001133
52340640011010044
53350650011010155
54360660011011066
55370670011011177
56380700011100088
57390710011100199
583A07200111010::
593B07300111011;&#59;
603C07400111100<&#60;
613D07500111101=&#61;
623E07600111110>&#62;
633F07700111111?&#63;
644010001000000@&#64;
654110101000001A&#65;
664210201000010B&#66;
674310301000011C&#67;
684410401000100D&#68;
694510501000101E&#69;
704610601000110F&#70;
714710701000111G&#71;
724811001001000H&#72;
734911101001001I&#73;
744A11201001010J&#74;
754B11301001011K&#75;
764C11401001100L&#76;
774D11501001101M&#77;
784E11601001110N&#78;
794F11701001111O&#79;
805012001010000P&#80;
815112101010001Q&#81;
825212201010010R&#82;
835312301010011S&#83;
845412401010100T&#84;
855512501010101U&#85;
865612601010110V&#86;
875712701010111W&#87;
885813001011000X&#88;
895913101011001Y&#89;
905A13201011010Z&#90;
915B13301011011[&#91;
925C13401011100\&#92;
935D13501011101]&#93;
945E13601011110^&#94;
955F13701011111_&#95;
966014001100000`&#96;
976114101100001a&#97;
986214201100010b&#98;
996314301100011c&#99;
1006414401100100d&#100;
1016514501100101e&#101;
1026614601100110f&#102;
1036714701100111g&#103;
1046815001101000h&#104;
1056915101101001i&#105;
1066A15201101010j&#106;
1076B15301101011k&#107;
1086C15401101100l&#108;
1096D15501101101m&#109;
1106E15601101110n&#110;
1116F15701101111o&#111;
1127016001110000p&#112;
1137116101110001q&#113;
1147216201110010r&#114;
1157316301110011s&#115;
1167416401110100t&#116;
1177516501110101u&#117;
1187616601110110v&#118;
1197716701110111w&#119;
1207817001111000x&#120;
1217917101111001y&#121;
1227A17201111010z&#122;
1237B17301111011{&#123;
1247C17401111100|&#124;
1257D17501111101}&#125;
1267E17601111110~&#126;
1277F17701111111DEL Delete&#127;
Click a row to copy its character.
Reviewed byKhushboo Gupta
Last updated · How we test

Runs in your browser. Nothing you type is uploaded.

What is ASCII?

ASCII, the American Standard Code for Information Interchange, is a 7-bit character code first published in 1963. It gives each of 128 characters a number from 0 to 127: the English letters, the digits, common punctuation, the space and 33 control codes. When a computer stores the letter A, it stores the number 65.

Nearly every modern text format still starts from ASCII. UTF-8, the encoding used by almost every web page, keeps codes 0 to 127 exactly as ASCII defines them, which is why plain English text is the same in both.

ASCII chart

The whole set on one page, eight characters to a row. Each box gives the decimal code and, in red, the hex code.

ASCII chart of all 128 characters from 0 (NUL) to 127 (DEL), each with its decimal and hex code. Digits sit at 48 to 57, capital letters at 65 to 90 and small letters at 97 to 122.

How the ASCII table is laid out

DecimalHexWhat is there
0 to 3100 to 1FControl codes such as tab (9), line feed (10) and carriage return (13)
3220Space
33 to 4721 to 2FPunctuation and symbols: ! " # $ % & ' ( ) * + , - . /
48 to 5730 to 39Digits 0 to 9
58 to 643A to 40: ; < = > ? @
65 to 9041 to 5ACapital letters A to Z
91 to 965B to 60[ \ ] ^ _ `
97 to 12261 to 7ASmall letters a to z
123 to 1267B to 7E{ | } ~
1277FDEL (delete)

That gives 95 printable characters (32 to 126, counting the space) and 33 control characters (0 to 31 plus 127). The printable set is what people usually mean by "ASCII characters": everything you can type on a US keyboard without special keys.

Patterns that make ASCII easy to work with

A capital letter and its small version are always 32 apart. A is 65 and a is 97. In binary that is a single bit, so changing case is a one-bit flip.

The letters A (65, 01000001) and a (97, 01100001) shown in binary. They differ only in the bit worth 32, which is how ASCII separates upper and lower case.

The digit characters start at 48, so the character 7 is code 55. Subtracting 48 from a digit's code gives its value, which is the classic way to turn the text "7" into the number 7. In hex the pattern is even clearer: digits are 30 to 39, so the second hex digit is the number itself. Letters work the same way from their starting point: A is 65, so the nth letter of the alphabet is 64 + n.

Control characters you still meet

Most of codes 0 to 31 were meant for teleprinters and are rarely used now. A handful still matter, and programmers usually write them as escape sequences.

CodeNameEscapeWhere you see it
0NUL, null\0Marks the end of a string in C
7BEL, bell\aMakes a terminal beep
8BS, backspace\bMoves the cursor back one place
9TAB, horizontal tab\tIndents text and separates columns in TSV files
10LF, line feed\nEnds a line on Linux and macOS
13CR, carriage return\rWindows ends lines with CR then LF
27ESC, escape\x1bStarts the color codes used in terminals
127DEL, delete\x7fSent by the Backspace key in many terminals

The difference in line endings is why a text file made on Windows can show stray ^M characters when opened on Linux: each line still has the CR before its LF.

Extended ASCII: 128 to 255

Codes 128 to 255 are not part of ASCII. Different systems filled them in different ways, which is why the same byte can show as é on one computer and as a box or a Greek letter on another. The checkbox above the table adds the Windows-1252 set, the most common on Western Windows PCs and the one browsers use for pages labeled ISO-8859-1, as the WHATWG Encoding Standard specifies. It puts € at 128 and é at 233. Old DOS programs used code page 437 instead, with box-drawing characters in the same range.

Anything outside 0 to 127, such as é, €, ✓ or an emoji, is a non-ASCII character. Modern text stores those with UTF-8, where they take two to four bytes each. The hex to text converter shows how those bytes decode under different encodings.

Typing a character by its code

In HTML, write &#, the decimal code and a semicolon: &#64; shows @ and &#169; shows ©. On Windows, hold Alt and type the code on the number pad; Alt+64 gives @, and Alt+0233 gives é from the Windows-1252 set. In most programming languages, \x41 inside a string is the character with hex code 41, which is A.

ASCII values in C, C++, Python and JavaScript

In C and C++ a char already holds its ASCII code, so (int)'A' is 65 and 'a' - 'A' is 32. A loop such as for (int i = 32; i < 127; i++) printf("%d %c\n", i, i); prints the printable part of the table. In Python, ord('A') returns 65 and chr(65) returns 'A'. In JavaScript, 'A'.charCodeAt(0) returns 65 and String.fromCharCode(65) returns "A".

Converting text with ASCII codes

To turn whole words into codes rather than looking them up one at a time, use the text to binary converter, which can also output decimal and hex. The text to ASCII converter gives the decimal codes on their own, the way they appear in this table. To go from codes back to words, paste binary into the binary translator or hex into hex to text. Decimal codes such as 72 105 go into ASCII to text. The original 1969 network specification, RFC 20, still lists every code with its meaning.

Frequently asked questions

Can I download the ASCII table as a PDF?

Yes. Press Print or save as PDF above the table and choose Save as PDF in the print dialog. Only the rows on screen are printed, so pick a filter first if you want just the letters or just the control codes, and tick the 128 to 255 box first for the full extended table.

What is the ASCII code for A?

Capital A is 65 in decimal, 41 in hex and 01000001 in binary. Small a is 97.

What is the ASCII code for @?

64, or 40 in hex. It sits just before A, which is 65.

What is the ASCII code for an apostrophe?

The straight apostrophe ' is 39, or 27 in hex. The curly ’ that word processors insert is not ASCII; it is Unicode U+2019.

Is there an ASCII code for a check mark?

No. ✓ is not in the 128 ASCII characters. It is Unicode U+2713, which you can write in HTML as &#10003;.

How many ASCII characters are there?

128: 33 control codes (0 to 31 and 127) and 95 printable characters, counting the space.

What is ASCII 32?

The space character.

Why does ASCII use 7 bits and not 8?

Seven bits were enough for English letters, digits, punctuation and control codes, and the eighth bit was often used for error checking when data was sent over lines. Computers later stored each character in a full 8-bit byte, which left room for the extended sets.

Is ASCII the same as Unicode?

Unicode includes ASCII as its first 128 code points, with the same numbers. Unicode then goes on to cover well over 100,000 more characters.

Scroll to Top