Skip to content

Add to your Home Screen

  1. Tap the Share button in Safari's toolbar.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add. The generator opens full-screen and works offline.

ASCII Table

The ASCII table lists all 128 ASCII codes, numbered 0 to 127, with their decimal, hexadecimal, octal and binary values, character names and HTML codes. Tap a printable character to copy it, and read the control codes' escape sequences beside it.

Printable characters (32 to 126)

Tap a character to copy it. HTML shows the named entity where one exists; the numeric form &#NN; always works.

DecHexOctBinaryCharNameHTML
32200400100000Space 
33210410100001Exclamation Mark!
34220420100010Quotation Mark"
35230430100011Number Sign#
36240440100100Dollar Sign$
37250450100101Percent Sign%
38260460100110Ampersand&
39270470100111Apostrophe'
40280500101000Left Parenthesis(
41290510101001Right Parenthesis)
422A0520101010Asterisk*
432B0530101011Plus Sign+
442C0540101100Comma,
452D0550101101Hyphen-Minus-
462E0560101110Full Stop.
472F0570101111Solidus/
48300600110000Digit Zero0
49310610110001Digit One1
50320620110010Digit Two2
51330630110011Digit Three3
52340640110100Digit Four4
53350650110101Digit Five5
54360660110110Digit Six6
55370670110111Digit Seven7
56380700111000Digit Eight8
57390710111001Digit Nine9
583A0720111010Colon:
593B0730111011Semicolon;
603C0740111100Less-Than Sign<
613D0750111101Equals Sign=
623E0760111110Greater-Than Sign>
633F0770111111Question Mark?
64401001000000Commercial At@
65411011000001Latin Capital Letter AA
66421021000010Latin Capital Letter BB
67431031000011Latin Capital Letter CC
68441041000100Latin Capital Letter DD
69451051000101Latin Capital Letter EE
70461061000110Latin Capital Letter FF
71471071000111Latin Capital Letter GG
72481101001000Latin Capital Letter HH
73491111001001Latin Capital Letter II
744A1121001010Latin Capital Letter JJ
754B1131001011Latin Capital Letter KK
764C1141001100Latin Capital Letter LL
774D1151001101Latin Capital Letter MM
784E1161001110Latin Capital Letter NN
794F1171001111Latin Capital Letter OO
80501201010000Latin Capital Letter PP
81511211010001Latin Capital Letter QQ
82521221010010Latin Capital Letter RR
83531231010011Latin Capital Letter SS
84541241010100Latin Capital Letter TT
85551251010101Latin Capital Letter UU
86561261010110Latin Capital Letter VV
87571271010111Latin Capital Letter WW
88581301011000Latin Capital Letter XX
89591311011001Latin Capital Letter YY
905A1321011010Latin Capital Letter ZZ
915B1331011011Left Square Bracket[
925C1341011100Reverse Solidus\
935D1351011101Right Square Bracket]
945E1361011110Circumflex Accent^
955F1371011111Low Line_
96601401100000Grave Accent`
97611411100001Latin Small Letter Aa
98621421100010Latin Small Letter Bb
99631431100011Latin Small Letter Cc
100641441100100Latin Small Letter Dd
101651451100101Latin Small Letter Ee
102661461100110Latin Small Letter Ff
103671471100111Latin Small Letter Gg
104681501101000Latin Small Letter Hh
105691511101001Latin Small Letter Ii
1066A1521101010Latin Small Letter Jj
1076B1531101011Latin Small Letter Kk
1086C1541101100Latin Small Letter Ll
1096D1551101101Latin Small Letter Mm
1106E1561101110Latin Small Letter Nn
1116F1571101111Latin Small Letter Oo
112701601110000Latin Small Letter Pp
113711611110001Latin Small Letter Qq
114721621110010Latin Small Letter Rr
115731631110011Latin Small Letter Ss
116741641110100Latin Small Letter Tt
117751651110101Latin Small Letter Uu
118761661110110Latin Small Letter Vv
119771671110111Latin Small Letter Ww
120781701111000Latin Small Letter Xx
121791711111001Latin Small Letter Yy
1227A1721111010Latin Small Letter Zz
1237B1731111011Left Curly Bracket{
1247C1741111100Vertical Line|
1257D1751111101Right Curly Bracket}
1267E1761111110Tilde~

Control characters (0 to 31 and 127)

These codes don't draw anything. They were designed to control teleprinters and terminals; a few, such as tab, line feed and carriage return, are still used in every text file.

DecHexOctBinaryAbbr.NameEscapeCaret
0000000000000NULNull\0^@
1010010000001SOHStart of Heading^A
2020020000010STXStart of Text^B
3030030000011ETXEnd of Text^C
4040040000100EOTEnd of Transmission^D
5050050000101ENQEnquiry^E
6060060000110ACKAcknowledge^F
7070070000111BELBell\a^G
8080100001000BSBackspace\b^H
9090110001001HTHorizontal Tab\t^I
100A0120001010LFLine Feed\n^J
110B0130001011VTVertical Tab\v^K
120C0140001100FFForm Feed\f^L
130D0150001101CRCarriage Return\r^M
140E0160001110SOShift Out^N
150F0170001111SIShift In^O
16100200010000DLEData Link Escape^P
17110210010001DC1Device Control 1 (XON)^Q
18120220010010DC2Device Control 2^R
19130230010011DC3Device Control 3 (XOFF)^S
20140240010100DC4Device Control 4^T
21150250010101NAKNegative Acknowledge^U
22160260010110SYNSynchronous Idle^V
23170270010111ETBEnd of Transmission Block^W
24180300011000CANCancel^X
25190310011001EMEnd of Medium^Y
261A0320011010SUBSubstitute^Z
271B0330011011ESCEscape\e^[
281C0340011100FSFile Separator^\
291D0350011101GSGroup Separator^]
301E0360011110RSRecord Separator^^
311F0370011111USUnit Separator^_
1277F1771111111DELDelete^?

By Maya Chen, lettering designer and type educator · Checked by Jordan Hale · · How we review content

Key facts

  • ASCII has 128 characters, numbered 0 to 127, which fit in 7 bits: 95 printable (codes 32 to 126) and 33 control codes (0 to 31 and 127).
  • ASCII was first published by the American Standards Association in 1963 as X3.4-1963, and revised in 1967 and 1986 (ANSI X3.4-1986).
  • Capital letters sit at codes 65 to 90 and small letters at 97 to 122, exactly 32 higher, so changing case flips a single bit.
  • Digits 0 to 9 are codes 48 to 57, so subtracting 48 gives the digit's value.
  • Code 3 is what Ctrl+C sends, shown as ^C in terminals, because Ctrl plus the letter 64 higher gives the control code.
  • The first 128 Unicode code points (U+0000 to U+007F) are exactly ASCII, so ASCII text is also valid UTF-8.

Which part of the table do I need?

Jump to the printable characters (codes 32 to 126) to copy a symbol or look up a letter, and to the control characters (0 to 31 and 127) for Ctrl combinations and line endings.

How do I read the ASCII table?

Each row is one code. Dec is the number in decimal, Hex in hexadecimal (base 16, as in 0x41 or \x41), Oct in octal (base 8, still used in some Unix tools) and Binary as the 7 bits ASCII uses. The HTML column shows the named entity where HTML has one, such as & for &, otherwise the numeric form A, which works for any character.

For control characters, Escape is the backslash sequence used in C, JavaScript, Python and many other languages, and Caret is how terminals show them: ^C is code 3, which is what Ctrl+C sends.

Which patterns in the table are worth knowing?

Range What Trick
48–57 Digits 0–9 Subtract 48 to get the digit’s value
65–90 Capital letters Add 32 for the lowercase letter
97–122 Small letters Subtract 32 for the capital
0–31, 127 Control codes Ctrl plus the letter 64 higher, so Ctrl+G is 7, the bell

How does ASCII relate to ASCII art and other codes?

Every piece of ASCII art, with its galleries of pieces to copy, in the strict sense uses only the 95 printable characters in the first table, which is why it works in any terminal and any plain text file. Lines and boxes beyond -, | and + come from Unicode’s box drawing characters. Windows Alt codes are a different system, based on old code pages rather than ASCII alone; the alt codes page searches them by symbol and shows how to type them on a numpad or a Mac.

Sources: ASCII was first published by the American Standards Association in 1963 as X3.4-1963 and revised in 1967 and 1986 (ANSI X3.4-1986). Character names in the ASCII table come from the Unicode Character Database, which uses ASCII’s 128 characters for its first 128 code points.

Frequently asked questions

Basics

How many characters are in ASCII?
128, numbered 0 to 127, which fit in 7 bits. 95 are printable (the space, letters, digits and punctuation, codes 32 to 126) and 33 are control codes (0 to 31 and 127), which draw nothing and were made to control teleprinters and terminals.
What is extended ASCII?
Not one thing. "Extended ASCII" is a loose name for any 8-bit character set whose first 128 codes match ASCII, such as code page 437, Windows-1252 or ISO 8859-1. Codes 128 to 255 differ in each, so the same byte can show as é in one program and Θ in another. UTF-8 keeps ASCII's 128 codes as single bytes.
What is the difference between ASCII and Unicode?
ASCII has 128 characters for English. Unicode covers the writing systems of the world plus symbols and emoji, well over 100,000 characters. The first 128 Unicode code points (U+0000 to U+007F) are exactly ASCII, so ASCII text is also valid Unicode and valid UTF-8.
What is the ASCII code for a space?
A space is code 32, or 20 in hexadecimal, and it is the first printable character in the table. Codes 0 to 31 come before it and are control characters that draw nothing. The table shows the space as a symbol so that you can still tap it to copy.
What do the control characters do?
They were designed to control teleprinters and terminals, so they draw nothing. A few, such as tab, line feed and carriage return, are still in everyday use. Ctrl plus a letter sends them from a terminal: Ctrl+G is code 7, the bell, and Ctrl+C is code 3.
When was ASCII published?
The American Standards Association first published ASCII in 1963 as X3.4-1963. It was revised in 1967 and 1986, the latter as ANSI X3.4-1986. The character names in this table come from the Unicode Character Database, which uses ASCII's 128 characters for its first 128 code points.

Where it works

How do I type an ASCII character that is not on my keyboard?
Tap it in the printable table to copy it, then paste. Windows Alt codes are a separate system, based on old code pages rather than ASCII alone, so use the alt codes page if you want to type a code on a numpad. Control characters are typed with Ctrl and a letter.
Is ASCII art made from this table?
Strict ASCII art uses only the 95 printable characters in the first table, which is why it works in any terminal and any plain text file. Lines and boxes beyond the hyphen, vertical bar and plus sign come from Unicode's box drawing characters. Our ASCII art galleries have pieces to copy.

How it works

How do I find the ASCII code for a character?
Find the character in the printable table and read the Dec column for its decimal code, or Hex for the base-16 value. The capital A is 65, which is 41 in hex and 1000001 in binary. For control characters such as Tab or Escape, use the control table, where the Escape and Caret columns show how they are written.
What is the HTML code for an ASCII character?
Where HTML has a named entity, the HTML column shows it, such as & for the ampersand. Every other character has the numeric form A, where 65 is the decimal code, and it works for any character. The numeric form is the one to rely on when you are unsure whether a name exists.

Tips & limits

Why is A 65?
ASCII put the capital letters at 65 to 90 (binary 100 0001 to 101 1010) and the small letters at 97 to 122, exactly 32 higher. The difference is a single bit, so converting case meant flipping one bit, which was cheap for the hardware of the 1960s.
What are LF and CR?
Line Feed (10, \n) moves to the next line; Carriage Return (13, \r) moves back to the start of the line, both from typewriters and teleprinters. Unix and macOS end lines with LF, Windows with CR followed by LF, which is why text files sometimes show extra or missing line breaks when moved between systems.
What does ^C mean in the table?
It is caret notation, the way terminals display control characters. The caret stands for the Ctrl key and the letter is the key 64 codes higher, so ^C is code 3, which is what Ctrl+C sends. The Caret column lists the notation for every control code, including 127, which shows as ^?.