ASCII Table

All 128 ASCII codes with their decimal, hexadecimal, binary and octal values, the printable character or control-code name, and answers to the lookups people search for most.

Quick ASCII lookups

ASCII is a 7-bit code, so it has exactly 128 codes, 0 to 127. Symbols such as ♥ and © are not ASCII at all: they come from Unicode and from 8-bit code pages such as Windows-1252 and code page 437.

Common ASCII lookups with decimal, hex and binary values
LookupDecimalHexBinaryCharacterNote
ascii 0 (the digit zero)4830001100000The character 0 is code 48 (0x30). Digits 0–9 are codes 48–57.
ascii 0 (the NUL character)00000000000NULCode 0 is NUL, the all-zeros control character, used as a string terminator in C.
ascii a976101100001aLowercase a is 97 (0x61); uppercase A is 65 (0x41). Case differs by exactly 32.
ascii A654101000001AUppercase letters A–Z are 65–90.
ascii space322000100000(space)Space is 32 (0x20), the first printable code.
ascii enter130D00001101CREnter is traditionally CR, carriage return (13). Unix text ends lines with LF (10); Windows uses CR LF (13, 10).
ascii tab90900001001HTHorizontal tab is 9 (0x09).
ascii escape271B00011011ESCEscape is 27 (0x1B); it begins terminal escape sequences.
ascii delete1277F01111111DELDEL is 127 (0x7F), all seven bits set.
ascii heart———♥Not ASCII. Unicode U+2665 Black Heart Suit; HTML ♥; code page 437 byte 3 (Alt+3 on Windows).
ascii copyright———©Not ASCII. Unicode U+00A9 Copyright Sign; Windows-1252 and Latin-1 byte 169 (Alt+0169); HTML ©.

Sources: RFC Editor (IETF): RFC 20: ASCII format for network interchange; Unicode Consortium: Unicode Character Database: UnicodeData.txt

ASCII control characters (0–31 and 127)

Codes 0 to 31 and 127 are control characters: they were designed to control devices and data links rather than print. A few are still in daily use: tab (9), line feed (10), carriage return (13) and escape (27).

ASCII control codes with decimal, hex, binary, octal, abbreviation and name
DecimalHexBinaryOctalAbbreviationName
00000000000000NULNull
10100000001001SOHStart of Heading
20200000010002STXStart of Text
30300000011003ETXEnd of Text
40400000100004EOTEnd of Transmission
50500000101005ENQEnquiry
60600000110006ACKAcknowledge
70700000111007BELBell
80800001000010BSBackspace
90900001001011HTHorizontal Tabulation (Tab)
100A00001010012LFLine Feed
110B00001011013VTVertical Tabulation
120C00001100014FFForm Feed
130D00001101015CRCarriage Return
140E00001110016SOShift Out
150F00001111017SIShift In
161000010000020DLEData Link Escape
171100010001021DC1Device Control 1
181200010010022DC2Device Control 2
191300010011023DC3Device Control 3
201400010100024DC4Device Control 4
211500010101025NAKNegative Acknowledge
221600010110026SYNSynchronous Idle
231700010111027ETBEnd of Transmission Block
241800011000030CANCancel
251900011001031EMEnd of Medium
261A00011010032SUBSubstitute
271B00011011033ESCEscape
281C00011100034FSFile Separator
291D00011101035GSGroup Separator
301E00011110036RSRecord Separator
311F00011111037USUnit Separator
1277F01111111177DELDelete

Sources: RFC Editor (IETF): RFC 20: ASCII format for network interchange

ASCII printable characters (32–126)

Codes 32 to 126 are the 95 printable characters: space, punctuation, digits 0–9 (48–57), uppercase A–Z (65–90) and lowercase a–z (97–122). Setting bit 5 (adding 32) turns an uppercase letter into its lowercase form. Binary values are shown as 8-bit bytes with a leading 0.

ASCII printable characters with decimal, hex, binary, octal and Unicode name
DecimalHexBinaryOctalCharacterName
322000100000040(space)Space
332100100001041!Exclamation Mark
342200100010042"Quotation Mark
352300100011043#Number Sign
362400100100044$Dollar Sign
372500100101045%Percent Sign
382600100110046&Ampersand
392700100111047'Apostrophe
402800101000050(Left Parenthesis
412900101001051)Right Parenthesis
422A00101010052*Asterisk
432B00101011053+Plus Sign
442C00101100054,Comma
452D00101101055-Hyphen-Minus
462E00101110056.Full Stop
472F00101111057/Solidus
4830001100000600Digit Zero
4931001100010611Digit One
5032001100100622Digit Two
5133001100110633Digit Three
5234001101000644Digit Four
5335001101010655Digit Five
5436001101100666Digit Six
5537001101110677Digit Seven
5638001110000708Digit Eight
5739001110010719Digit Nine
583A00111010072:Colon
593B00111011073;Semicolon
603C00111100074<Less-Than Sign
613D00111101075=Equals Sign
623E00111110076>Greater-Than Sign
633F00111111077?Question Mark
644001000000100@Commercial At
654101000001101ALatin Capital Letter A
664201000010102BLatin Capital Letter B
674301000011103CLatin Capital Letter C
684401000100104DLatin Capital Letter D
694501000101105ELatin Capital Letter E
704601000110106FLatin Capital Letter F
714701000111107GLatin Capital Letter G
724801001000110HLatin Capital Letter H
734901001001111ILatin Capital Letter I
744A01001010112JLatin Capital Letter J
754B01001011113KLatin Capital Letter K
764C01001100114LLatin Capital Letter L
774D01001101115MLatin Capital Letter M
784E01001110116NLatin Capital Letter N
794F01001111117OLatin Capital Letter O
805001010000120PLatin Capital Letter P
815101010001121QLatin Capital Letter Q
825201010010122RLatin Capital Letter R
835301010011123SLatin Capital Letter S
845401010100124TLatin Capital Letter T
855501010101125ULatin Capital Letter U
865601010110126VLatin Capital Letter V
875701010111127WLatin Capital Letter W
885801011000130XLatin Capital Letter X
895901011001131YLatin Capital Letter Y
905A01011010132ZLatin Capital Letter Z
915B01011011133[Left Square Bracket
925C01011100134\Reverse Solidus
935D01011101135]Right Square Bracket
945E01011110136^Circumflex Accent
955F01011111137_Low Line
966001100000140`Grave Accent
976101100001141aLatin Small Letter A
986201100010142bLatin Small Letter B
996301100011143cLatin Small Letter C
1006401100100144dLatin Small Letter D
1016501100101145eLatin Small Letter E
1026601100110146fLatin Small Letter F
1036701100111147gLatin Small Letter G
1046801101000150hLatin Small Letter H
1056901101001151iLatin Small Letter I
1066A01101010152jLatin Small Letter J
1076B01101011153kLatin Small Letter K
1086C01101100154lLatin Small Letter L
1096D01101101155mLatin Small Letter M
1106E01101110156nLatin Small Letter N
1116F01101111157oLatin Small Letter O
1127001110000160pLatin Small Letter P
1137101110001161qLatin Small Letter Q
1147201110010162rLatin Small Letter R
1157301110011163sLatin Small Letter S
1167401110100164tLatin Small Letter T
1177501110101165uLatin Small Letter U
1187601110110166vLatin Small Letter V
1197701110111167wLatin Small Letter W
1207801111000170xLatin Small Letter X
1217901111001171yLatin Small Letter Y
1227A01111010172zLatin Small Letter Z
1237B01111011173{Left Curly Bracket
1247C01111100174|Vertical Line
1257D01111101175}Right Curly Bracket
1267E01111110176~Tilde

Sources: RFC Editor (IETF): RFC 20: ASCII format for network interchange; Unicode Consortium: Unicode Character Database: UnicodeData.txt

References

Frequently asked questions

What is the ASCII code for Enter?

Enter is carriage return, CR, code 13 (0x0D). Many systems store a line break as line feed, LF, code 10 (0x0A), and Windows text files use the pair CR LF.

Is there an ASCII code for a heart or the copyright sign?

No. ASCII stops at 127. The heart ♥ is Unicode U+2665 and the copyright sign © is U+00A9, which is byte 169 in Windows-1252 and ISO 8859-1.

Why is ASCII 7-bit?

The 1960s standard defined 128 codes, enough for English letters, digits, punctuation and device controls. The eighth bit of a byte was left for parity or later extensions, which is where code pages such as Windows-1252 put their extra characters.