StringMash.com

ASCII table

All 128 codes, in every base, with the names the standard gave them.

Conversion
3 characters
Updates as you type
Swap to turn codes back into text

Printable chart
0-127

The ASCII table

DecHexOctBinaryCharName
0000000000000NULNull
1010010000001SOHStart of Heading
2020020000010STXStart of Text
3030030000011ETXEnd of Text
4040040000100EOTEnd of Transmission
5050050000101ENQEnquiry
6060060000110ACKAcknowledge
7070070000111BELBell
8080100001000BSBackspace
9090110001001HTHorizontal Tabulation
100A0120001010LFLine Feed
110B0130001011VTVertical Tabulation
120C0140001100FFForm Feed
130D0150001101CRCarriage Return
140E0160001110SOShift Out
150F0170001111SIShift In
16100200010000DLEData Link Escape
17110210010001DC1Device Control 1
18120220010010DC2Device Control 2
19130230010011DC3Device Control 3
20140240010100DC4Device Control 4 (Stop)
21150250010101NAKNegative Acknowledge
22160260010110SYNSynchronous Idle
23170270010111ETBEnd of Transmission Block
24180300011000CANCancel
25190310011001EMEnd of Medium
261A0320011010SUBSubstitute
271B0330011011ESCEscape
281C0340011100FSFile Separator
291D0350011101GSGroup Separator
301E0360011110RSRecord Separator
311F0370011111USUnit Separator
32200400100000SPSpace
33210410100001!Exclamation mark
34220420100010"Quotation mark
35230430100011#Number sign
36240440100100$Dollar sign
37250450100101%Percent sign
38260460100110&Ampersand
39270470100111'Apostrophe
40280500101000(Left parenthesis
41290510101001)Right parenthesis
422A0520101010*Asterisk
432B0530101011+Plus sign
442C0540101100,Comma
452D0550101101-Hyphen-minus
462E0560101110.Full stop
472F0570101111/Solidus
483006001100000Digit zero
493106101100011Digit one
503206201100102Digit two
513306301100113Digit three
523406401101004Digit four
533506501101015Digit five
543606601101106Digit six
553706701101117Digit seven
563807001110008Digit eight
573907101110019Digit nine
583A0720111010:Colon
593B0730111011;Semicolon
603C0740111100<Less-than sign
613D0750111101=Equals sign
623E0760111110>Greater-than sign
633F0770111111?Question mark
64401001000000@Commercial at
65411011000001ACapital A
66421021000010BCapital B
67431031000011CCapital C
68441041000100DCapital D
69451051000101ECapital E
70461061000110FCapital F
71471071000111GCapital G
72481101001000HCapital H
73491111001001ICapital I
744A1121001010JCapital J
754B1131001011KCapital K
764C1141001100LCapital L
774D1151001101MCapital M
784E1161001110NCapital N
794F1171001111OCapital O
80501201010000PCapital P
81511211010001QCapital Q
82521221010010RCapital R
83531231010011SCapital S
84541241010100TCapital T
85551251010101UCapital U
86561261010110VCapital V
87571271010111WCapital W
88581301011000XCapital X
89591311011001YCapital Y
905A1321011010ZCapital Z
915B1331011011[Left square bracket
925C1341011100\Reverse solidus
935D1351011101]Right square bracket
945E1361011110^Circumflex accent
955F1371011111_Low line
96601401100000`Grave accent
97611411100001aSmall a
98621421100010bSmall b
99631431100011cSmall c
100641441100100dSmall d
101651451100101eSmall e
102661461100110fSmall f
103671471100111gSmall g
104681501101000hSmall h
105691511101001iSmall i
1066A1521101010jSmall j
1076B1531101011kSmall k
1086C1541101100lSmall l
1096D1551101101mSmall m
1106E1561101110nSmall n
1116F1571101111oSmall o
112701601110000pSmall p
113711611110001qSmall q
114721621110010rSmall r
115731631110011sSmall s
116741641110100tSmall t
117751651110101uSmall u
118761661110110vSmall v
119771671110111wSmall w
120781701111000xSmall x
121791711111001ySmall y
1227A1721111010zSmall z
1237B1731111011{Left curly bracket
1247C1741111100|Vertical line
1257D1751111101}Right curly bracket
1267E1761111110~Tilde
1277F1771111111DELDelete

Reading the table

Each row is one code. Dec is the number most programming languages print, Hex is how it appears in a hex dump or a URL escape like %41, and Oct is what older Unix tools and C escapes like \101 use. Binary is the seven bits themselves.

The first 32 codes and the last one are control characters. They move a printer or a cursor, or mark the edges of a message, and they print nothing. The names come from the 1968 standard, USAS X3.4-1968, which RFC 20 copied out for the ARPANET in 1969. 32 is the space, and 33 to 126 are the characters you can type.

To look up your own text, type it in the converter above. Base switches between decimal, hex and octal, and swap reads codes back into text.

Why DEL is 127

Most control characters sit at the start of the table, but DEL is alone at the end, and it's there because of paper tape. 127 is 1111111 in binary, all seven bits set. A set bit was a punched hole, and a hole can't be un-punched.

So a mistake was fixed by punching out every hole over it. Whatever character had been there, it was now 127, and the machine reading the tape knew to skip it. RFC 20 describes DEL as used to "erase" or "obliterate" unwanted characters in perforated tape, and adds that in the strict sense it isn't a control character at all.

The document that brought ASCII to the internet

RFC 20, "ASCII format for Network Interchange", is dated 16 October 1969 and signed Vint Cerf, then at UCLA. It proposed standard 7-bit ASCII inside an 8-bit byte whose top bit was always 0, and the table it attached was copied from the 1968 American standard.

It's two pages long, and it shows why a standard was needed. SRI, it notes, used a full stop as its end-of-line character, while UCLA used carriage return, code 13. The line-ending argument between systems is still going.

Related conversions

ASCII to text converts whole messages both ways with the same codes. The binary translator shows the bits for any text, and the Unicode converter covers everything beyond 127, where ASCII stops.

Questions

What is the ASCII code for A?

65 in decimal, 41 in hex, 101 in octal and 1000001 in binary. Lowercase a is 97, exactly 32 higher, and every lowercase letter is 32 above its capital.

How many characters are in ASCII?

128, numbered 0 to 127, because it uses seven bits. 33 are control codes and 95 are printable, counting the space.

What is the difference between ASCII and Unicode?

ASCII covers 128 characters, enough for English. Unicode covers over 150,000, and its first 128 are ASCII, code for code, so every ASCII file is also valid UTF-8.

What are ASCII codes 128 to 255?

Not ASCII. Codes above 127 belong to 8-bit extensions like ISO-8859-1 and Windows-1252, which disagree with each other, so text read with the wrong one comes out garbled.