ASCII table

ASCII table and notes about it.

1 min readSwitch Case

Full table#

ASCII control characters
000x00NUL(Null character)
010x01SOH(Start of Header)
020x02STX(Start of Text)
030x03ETX(End of Text)
040x04EOT(End of Trans.)
050x05ENQ(Enquiry)
060x06ACK(Acknowledgement)
070x07BEL(Bell)
080x08BS(Backspace)
090x09HT(Horizontal Tab)
100x0ALF(Line feed)
110x0BVT(Vertical Tab)
120x0CFF(Form feed)
130x0DCR(Carriage return)
140x0ESO(Shift Out)
150x0FSI(Shift In)
160x10DLE(Data link escape)
170x11DC1(Device control 1)
180x12DC2(Device control 2)
190x13DC3(Device control 3)
200x14DC4(Device control 4)
210x15NAK(Negative acknowl.)
220x16SYN(Synchronous idle)
230x17ETB(End of trans. block)
240x18CAN(Cancel)
250x19EM(End of medium)
260x1ASUB(Substitute)
270x1BESC(Escape)
280x1CFS(File separator)
290x1DGS(Group separator)
300x1ERS(Record separator)
310x1FUS(Unit separator)
1270x7FDEL(Delete)
ASCII printable characters
320x20
330x21!
340x22"
350x23#
360x24$
370x25%
380x26&
390x27'
400x28(
410x29)
420x2A*
430x2B+
440x2C,
450x2D-
460x2E.
470x2F/
480x300
490x311
500x322
510x333
520x344
530x355
540x366
550x377
560x388
570x399
580x3A:
590x3B;
600x3C<
610x3D=
620x3E>
630x3F?
640x40@
650x41A
660x42B
670x43C
680x44D
690x45E
700x46F
710x47G
720x48H
730x49I
740x4AJ
750x4BK
760x4CL
770x4DM
780x4EN
790x4FO
800x50P
810x51Q
820x52R
830x53S
840x54T
850x55U
860x56V
870x57W
880x58X
890x59Y
900x5AZ
910x5B[
920x5C\
930x5D]
940x5E^
950x5F_
960x60`
970x61a
980x62b
990x63c
1000x64d
1010x65e
1020x66f
1030x67g
1040x68h
1050x69i
1060x6Aj
1070x6Bk
1080x6Cl
1090x6Dm
1100x6En
1110x6Fo
1120x70p
1130x71q
1140x72r
1150x73s
1160x74t
1170x75u
1180x76v
1190x77w
1200x78x
1210x79y
1220x7Az
1230x7B{
1240x7C|
1250x7D}
1260x7E~
   
Extended ASCII characters
1280x80Ç
1290x81ü
1300x82é
1310x83â
1320x84ä
1330x85à
1340x86å
1350x87ç
1360x88ê
1370x89ë
1380x8Aè
1390x8Bï
1400x8Cî
1410x8Dì
1420x8EÄ
1430x8FÅ
1440x90É
1450x91æ
1460x92Æ
1470x93ô
1480x94ö
1490x95ò
1500x96û
1510x97ù
1520x98ÿ
1530x99Ö
1540x9AÜ
1550x9B¢
1560x9C£
1570x9D¥
1580x9E
1590x9Fƒ
1600xA0á
1610xA1í
1620xA2ó
1630xA3ú
1640xA4ñ
1650xA5Ñ
1660xA6ª
1670xA7º
1680xA8¿
1690xA9
1700xAA¬
1710xAB½
1720xAC¼
1730xAD¡
1740xAE«
1750xAF»
1760xB0
1770xB1
1780xB2
1790xB3
1800xB4
1810xB5
1820xB6
1830xB7
1840xB8
1850xB9
1860xBA
1870xBB
1880xBC
1890xBD
1900xBE
1910xBF
1920xC0
1930xC1
1940xC2
1950xC3
1960xC4
1970xC5
1980xC6
1990xC7
2000xC8
2010xC9
2020xCA
2030xCB
2040xCC
2050xCD
2060xCE
2070xCF
2080xD0
2090xD1
2100xD2
2110xD3
2120xD4
2130xD5
2140xD6
2150xD7
2160xD8
2170xD9
2180xDA
2190xDB
2200xDC
2210xDD
2220xDE
2230xDF
2240xE0α
2250xE1ß
2260xE2Γ
2270xE3π
2280xE4Σ
2290xE5σ
2300xE6µ
2310xE7τ
2320xE8Φ
2330xE9Θ
2340xEAΩ
2350xEBδ
2360xEC
2370xEDφ
2380xEEε
2390xEF
2400xF0
2410xF1±
2420xF2
2430xF3
2440xF4
2450xF5
2460xF6÷
2470xF7
2480xF8°
2490xF9
2500xFA·
2510xFB
2520xFC
2530xFD²
2540xFE
2550xFFnbsp

Control-code reference#

A few of the control characters in the 0-31 range come up often in everyday programming:

CodeAbbrNameCommon use
0NULNullC-string terminator
8BSBackspace\b in C strings
9HTHorizontal tab\t
10LFLine feed\n, the Unix line ending
12FFForm feed\f (page break in printers)
13CRCarriage return\r, half of the Windows \r\n line ending
27ESCEscapeFirst byte of ANSI escape sequences (e.g. \033[31m for red)
127DELDeleteSent by the Delete key on most terminals

Quick patterns worth remembering#

A few relationships in the table that come up constantly in code:

  • '0' is 48 (0x30), so c - '0' converts an ASCII digit to its numeric value
  • All letters differ by exactly 0x20 between upper and lower case — this is why tolower / toupper can be a single bitwise operation
  • Digits and uppercase letters are contiguousc >= '0' && c <= '9', c >= 'A' && c <= 'Z', c >= 'a' && c <= 'z' are single-range checks
  • '\n' is 10, '\r' is 13 — line feed comes before carriage return

▸ stay subscribed

Liked this?

Drop your email and you'll get the next post when it's published. No tracking, one-click unsubscribe.