Skip to content

ASCII Table

All 128 ASCII characters with their codes in every base.

About ASCII table

ASCII (the American Standard Code for Information Interchange) assigns numbers 0 to 127 to the English letters, digits, punctuation and a set of control characters, using 7 bits. Codes 0 to 31 and 127 are control characters, originally commands for teleprinters, of which tab (9), line feed (10) and carriage return (13) are still everywhere. Codes 32 to 126 are printable, starting with the space.

UTF-8, the encoding of nearly every web page, is backward compatible with ASCII: the first 128 code points are encoded as the same single bytes, so ASCII text is valid UTF-8. A few patterns are worth knowing: digits 0-9 are 48-57 (0x30-0x39), uppercase letters are 65-90 and lowercase 97-122, exactly 32 apart, so flipping bit 5 (0x20) switches case. Codes 128-255 are not ASCII: their meaning depends on the encoding, such as Latin-1 or Windows-1252.

128 entries

Control characters (0-31)

DecHexOctBinaryCharDescription
0000000000000NULNull
1010010000001SOHStart of heading
2020020000010STXStart of text
3030030000011ETXEnd of text (Ctrl+C)
4040040000100EOTEnd of transmission (Ctrl+D)
5050050000101ENQEnquiry
6060060000110ACKAcknowledge
7070070000111BELBell (\a)
8080100001000BSBackspace (\b)
9090110001001HTHorizontal tab (\t)
100A0120001010LFLine feed, newline (\n)
110B0130001011VTVertical tab (\v)
120C0140001100FFForm feed (\f)
130D0150001101CRCarriage return (\r)
140E0160001110SOShift out
150F0170001111SIShift in
16100200010000DLEData link escape
17110210010001DC1Device control 1 (XON)
18120220010010DC2Device control 2
19130230010011DC3Device control 3 (XOFF)
20140240010100DC4Device control 4
21150250010101NAKNegative acknowledge
22160260010110SYNSynchronous idle
23170270010111ETBEnd of transmission block
24180300011000CANCancel
25190310011001EMEnd of medium
261A0320011010SUBSubstitute (Ctrl+Z)
271B0330011011ESCEscape (\e, \x1b)
281C0340011100FSFile separator
291D0350011101GSGroup separator
301E0360011110RSRecord separator
311F0370011111USUnit separator

Printable characters (32-126) and DEL (127)

DecHexOctBinaryCharDescription
32200400100000SPSpace
33210410100001!Exclamation mark
34220420100010"Double quote
35230430100011#Number sign, hash
36240440100100$Dollar sign
37250450100101%Percent sign
38260460100110&Ampersand
39270470100111'Apostrophe, single quote
40280500101000(Left parenthesis
41290510101001)Right parenthesis
422A0520101010*Asterisk
432B0530101011+Plus sign
442C0540101100,Comma
452D0550101101-Hyphen-minus
462E0560101110.Period, full stop
472F0570101111/Slash
483006001100000Digit 0
493106101100011Digit 1
503206201100102Digit 2
513306301100113Digit 3
523406401101004Digit 4
533506501101015Digit 5
543606601101106Digit 6
553706701101117Digit 7
563807001110008Digit 8
573907101110019Digit 9
583A0720111010:Colon
593B0730111011;Semicolon
603C0740111100<Less-than sign
613D0750111101=Equals sign
623E0760111110>Greater-than sign
633F0770111111?Question mark
64401001000000@At sign
65411011000001AUppercase A
66421021000010BUppercase B
67431031000011CUppercase C
68441041000100DUppercase D
69451051000101EUppercase E
70461061000110FUppercase F
71471071000111GUppercase G
72481101001000HUppercase H
73491111001001IUppercase I
744A1121001010JUppercase J
754B1131001011KUppercase K
764C1141001100LUppercase L
774D1151001101MUppercase M
784E1161001110NUppercase N
794F1171001111OUppercase O
80501201010000PUppercase P
81511211010001QUppercase Q
82521221010010RUppercase R
83531231010011SUppercase S
84541241010100TUppercase T
85551251010101UUppercase U
86561261010110VUppercase V
87571271010111WUppercase W
88581301011000XUppercase X
89591311011001YUppercase Y
905A1321011010ZUppercase Z
915B1331011011[Left square bracket
925C1341011100\Backslash
935D1351011101]Right square bracket
945E1361011110^Caret, circumflex
955F1371011111_Underscore
96601401100000`Grave accent, backtick
97611411100001aLowercase a
98621421100010bLowercase b
99631431100011cLowercase c
100641441100100dLowercase d
101651451100101eLowercase e
102661461100110fLowercase f
103671471100111gLowercase g
104681501101000hLowercase h
105691511101001iLowercase i
1066A1521101010jLowercase j
1076B1531101011kLowercase k
1086C1541101100lLowercase l
1096D1551101101mLowercase m
1106E1561101110nLowercase n
1116F1571101111oLowercase o
112701601110000pLowercase p
113711611110001qLowercase q
114721621110010rLowercase r
115731631110011sLowercase s
116741641110100tLowercase t
117751651110101uLowercase u
118761661110110vLowercase v
119771671110111wLowercase w
120781701111000xLowercase x
121791711111001yLowercase y
1227A1721111010zLowercase z
1237B1731111011{Left curly brace
1247C1741111100|Vertical bar, pipe
1257D1751111101}Right curly brace
1267E1761111110~Tilde
1277F1771111111DELDelete

Good to know

Line endings

Unix, Linux and macOS end lines with LF (10, \n). Windows uses CR followed by LF (13 10, \r\n). Classic Mac OS used CR alone. Mixed line endings are a common cause of noisy diffs and failing scripts.

More references