FactorPad
Build a Better Process

ASCII Table - A Reference to Decimal and Hex Codes

What are ASCII characters? And why should we care?
  1. Background - Learn about ASCII, the first alphabet for computers.
  2. Three codes - See how decimal, hexadecimal and HTML-specific characters are coded.
  3. Control Characters - Review the first 33 codes, used to control hardware.
  4. Printable Characters - Look up the remaining 95 characters in the ASCII table.
  5. Beyond ASCII - Discuss this in context with thousands of other characters.
face pic by Paul Alan Davis, CFA
Updated: February 20, 2021
A friendly place to start as a programmer, ASCII is a computer's first 128-character alphabet.

Outline Back Tip Next

/ factorpad.com / tech / ascii-table.html


An ad-free and cookie-free website.


An Easy to Use ASCII Code Table

Beginner

ASCII codes were developed in the 1960s as a set of 128-characters used for computers to communicate with each other. Originally, this was done in the English language and keyboards at the time had about 83 keys. The remaining characters were used to control hardware. An example is the ASCII character BEL which instructs the computer to beep, or ring a bell.

Later, additional character sets were added to include symbols, like ©, £, ¥, and letters from the languages around the globe, as in à, á, and ã. To maintain compatibility, the original 128 characters still have the same decimal codes today.

Here you will find the ASCII table broken in two. First, are the 33 control characters. Second, are characters you see on keyboards, in print and on computer screens.

About Decimal and Hexadecimal ASCII Codes in HTML

In HTML, there are three common ways to enter codes.

  1. Decimal - ASCII Characters using the decimal, or base-10 numerical system.
  2. Hexadecimal - ASCII Characters using the hexadecimal or base-16 system.
  3. HTML-specific - Several ASCII Characters can be entered using HTML-specific characters, sometimes called an HTML entity.

ASCII Table

The two tables below cover the first 128 ASCII characters.

ASCII Control Characters

The ASCII Control Characters were orginally used to control hardware, so most the characters are not used when writing HTML pages.

Some control characters, like \n (line feed), \t (horizontal tab), and others noted below are used throughout programming, even today.

Decimal Hex Meaning ASCII Character
0 0000 Null
\0
NUL
1 0001 Start of heading SOH
2 0002 Start of text STX
3 0003 End of text ETX
4 0004 End of transmission EOT
5 0005 Enquiry ENQ
6 0006 Acknowledgement ACK
7 0007 Bell
\a
BEL
8 0008 Backspace
\b
BS
9 0009 Horizontal tab
\t
HT
10 000A Line feed
\n
LF
11 000B Vertical tab
\v
VT
12 000C Form feed
\f
FF
13 000D Carriage return
\r
CR
14 000E Shift out SO
15 000F Shift in SI
16 0010 Data link escape DLE
17 0011 Device control 1 DC1
18 0012 Device control 2 DC2
19 0013 Device control 3 DC3
20 0014 Device control 4 DC4
21 0015 Negative acknowledgement NAK
22 0016 Synchronous idle SYN
23 0017 End of transmission block ETB
24 0018 Cancel CAN
25 0019 End of medium EM
26 001A Substitute SUB
27 001B Escape
\e
ESC
28 001C File separator FS
29 001D Group separator GS
30 001E Record separator RS
31 001F Unit separator US
127 007F Delete DEL

ASCII Printable Characters

The next 95 characters are called printable characters.

Below is an example of how you would code the ampersand character & in an HTML document.

Decimal
Hex
HTML ASCII Character
32 0020   space
33 0021   !
34 0022 " "
35 0023   #
36 0024   $
37 0025   %
38 0026 & &
39 0027   '
40 0028   (
41 0029   )
42 002A   *
43 002B   +
44 002C   ,
45 002D   -
46 002E   .
47 002F   /
48 0030   0
49 0031   1
50 0032   2
51 0033   3
52 0034   4
53 0035   5
54 0036   6
55 0037   7
56 0038   8
57 0039   9
58 003A   :
59 003B   ;
60 003C &lt; <
61 003D   =
62 003E &gt; >
63 003F   ?
64 0040   @
65 0041   A
66 0042   B
67 0043   C
68 0044   D
69 0045   E
70 0046   F
71 0047   G
72 0048   H
73 0049   I
74 004A   J
75 004B   K
76 004C   L
77 004D   M
78 004E   N
79 004F   O
80 0050   P
81 0051   Q
82 0052   R
83 0053   S
84 0054   T
85 0055   U
86 0056   V
87 0057   W
88 0058   X
89 0059   Y
90 005A   Z
91 005B   [
92 005C   \
93 005D   ]
94 005E   ^
95 005F   _
96 0060   `
97 0061   a
98 0062   b
99 0063   c
100 0064   d
101 0065   e
102 0066   f
103 0067   g
104 0068   h
105 0069   i
106 006A   j
107 006B   k
108 006C   l
109 006D   m
110 006E   n
111 006F   o
112 0070   p
113 0071   q
114 0072   r
115 0073   s
116 0074   t
117 0075   u
118 0076   v
119 0077   w
120 0078   x
121 0079   y
122 007A   z
123 007B   {
124 007C   |
125 007D   }
126 007E   ~

Related Content


What's Next?

Don't forget to check out our YouTube Channel and see what you can learn there. Also, we send new content notices to @factorpad on Twitter.

Outline Back Tip Next

/ factorpad.com / tech / ascii-table.html


ascii cheat sheet
ascii table
ascii code
hex to ascii
ascii values
tabla ascii
ascii chart
html symbols
table ascii
html special characters
ascii symbols
html character codes
html control characters
html printable characters

A newly-updated free resource. Connect and refer a friend today.