ASCII Table & Character Lookup

Browse all 128 ASCII characters or search any code by character, decimal, hex, or name. Get HTML entities, C escapes, URL encoding, and JSON escapes in one click.

128 Characters HEX · OCT · BIN HTML & Escape Codes
Share this tool
Try: A 65 41 0x41 LF space tab

Looking up character...

Search above or click any cell in the table to look up a character.

Control characters (0–31, 127) Printable & symbols (32–126) Click any cell to look up details ↑
NUL
0
00
SOH
1
01
STX
2
02
ETX
3
03
EOT
4
04
ENQ
5
05
ACK
6
06
BEL
7
07
BS
8
08
HT
9
09
LF
10
0A
VT
11
0B
FF
12
0C
CR
13
0D
SO
14
0E
SI
15
0F
DLE
16
10
DC1
17
11
DC2
18
12
DC3
19
13
DC4
20
14
NAK
21
15
SYN
22
16
ETB
23
17
CAN
24
18
EM
25
19
SUB
26
1A
ESC
27
1B
FS
28
1C
GS
29
1D
RS
30
1E
US
31
1F
SP
32
20
!
33
21
"
34
22
#
35
23
$
36
24
%
37
25
&
38
26
'
39
27
(
40
28
)
41
29
*
42
2A
+
43
2B
,
44
2C
-
45
2D
.
46
2E
/
47
2F
0
48
30
1
49
31
2
50
32
3
51
33
4
52
34
5
53
35
6
54
36
7
55
37
8
56
38
9
57
39
:
58
3A
;
59
3B
<
60
3C
=
61
3D
>
62
3E
?
63
3F
@
64
40
A
65
41
B
66
42
C
67
43
D
68
44
E
69
45
F
70
46
G
71
47
H
72
48
I
73
49
J
74
4A
K
75
4B
L
76
4C
M
77
4D
N
78
4E
O
79
4F
P
80
50
Q
81
51
R
82
52
S
83
53
T
84
54
U
85
55
V
86
56
W
87
57
X
88
58
Y
89
59
Z
90
5A
[
91
5B
\
92
5C
]
93
5D
^
94
5E
_
95
5F
`
96
60
a
97
61
b
98
62
c
99
63
d
100
64
e
101
65
f
102
66
g
103
67
h
104
68
i
105
69
j
106
6A
k
107
6B
l
108
6C
m
109
6D
n
110
6E
o
111
6F
p
112
70
q
113
71
r
114
72
s
115
73
t
116
74
u
117
75
v
118
76
w
119
77
x
120
78
y
121
79
z
122
7A
{
123
7B
|
124
7C
}
125
7D
~
126
7E
DEL
127
7F

What Is ASCII?

ASCII (American Standard Code for Information Interchange) is a character encoding standard originally developed by Bell Labs and published as ANSI X3.4 in 1968. It defines 128 characters — encoded as 7-bit integers from 0 to 127 — covering the English alphabet, digits, punctuation, and 33 non-printable control characters.

Every modern text encoding descends from ASCII. UTF-8, the dominant encoding on the web, is fully backward-compatible: the first 128 code points of UTF-8 are byte-for-byte identical to ASCII. This means any pure-ASCII file is also a valid UTF-8 file.

Despite being over 50 years old, ASCII remains the foundation of virtually every programming language, network protocol, and file format in use today.

Control Characters (0–31, 127)

The first 32 characters and the last (DEL, 127) are non-printable control characters. They originated as signals for physical devices — teletype machines, printers, and modems — and many are still in active use today:

NameDecHexCommon use today
NUL000String terminator in C/C++
HT909Tab indentation, TSV files
LF100ALine ending on Unix/Linux/macOS
CR130DPart of Windows CRLF line endings
ESC271BANSI terminal escape sequences
SP3220Word separator (technically printable)
DEL1277FOriginally punched a hole over all tracks on paper tape

Printable Characters (32–126)

Characters 32–126 are printable. They fall into three groups:

Digits

48–57

Characters '0'–'9'. Note: the digit '0' is decimal 48, not 0. Subtract 48 from any digit code to get its numeric value.

Uppercase

65–90

Letters 'A'–'Z'. To convert to lowercase, add 32 (or OR with 0x20). 'A' = 65, 'Z' = 90.

Lowercase

97–122

Letters 'a'–'z'. To convert to uppercase, subtract 32 (or AND with 0xDF). 'a' = 97, 'z' = 122.

The remaining printable characters (33–47, 58–64, 91–96, 123–126) are punctuation and symbols. The layout was deliberately designed so that digits, uppercase, and lowercase form three consecutive blocks — making case conversion and digit detection trivially fast with bitmask arithmetic.

ASCII vs Unicode vs UTF-8

ASCII encodes 128 characters in 7 bits. It covers only English and basic punctuation.

Unicode is a standard that assigns code points to over 1.1 million characters covering every writing system. The first 128 Unicode code points (U+0000–U+007F) are identical to ASCII.

UTF-8 is a variable-width encoding for Unicode. Characters 0–127 use a single byte — identical to their ASCII representation. Characters above 127 use 2–4 bytes. This backward-compatibility means that any software reading a pure-ASCII file as UTF-8 will produce exactly the same result.

Extended ASCII (code pages 128–255) is an unofficial term for various single-byte extensions that assign characters to the 8th bit. These are not standardised — Windows-1252, ISO 8859-1, and IBM Code Page 437 all define different characters for the same byte values.

Common Escape Sequences

CharDecCURLHTMLJSON
NUL0\0%00&#0;\u0000
HT9\t%09&#9;\t
LF10\n%0A&#10;\n
CR13\r%0D&#13;\r
SP32(sp)%20&nbsp;(sp)
"34\"%22&quot;\"
&38&%26&amp;&
<60<%3C&lt;<
>62>%3E&gt;>
\92\\%5C&#92;\\

Frequently Asked Questions

What is the difference between ASCII and UTF-8?
ASCII is a 7-bit encoding covering only 128 characters (English letters, digits, and control codes). UTF-8 is a variable-width encoding for all Unicode characters. The first 128 UTF-8 code points are byte-for-byte identical to ASCII, so UTF-8 is a strict superset. A file containing only ASCII characters is automatically valid UTF-8.
Why do printable characters start at 32 (space)?
ASCII was designed for 7-bit teleprinter channels. The first 32 codes (0-31) were reserved for device control signals like line feed, carriage return, and bell. Character 32 (space) is technically printable — it advances the print head — but produces no visible ink.
What is a null terminator (ASCII 0)?
In C and C++, strings are represented as arrays of characters ending with a byte whose value is 0 (NUL). Functions like strlen() and printf() stop at this byte. NUL is invisible in most displays, but its presence or absence determines where a C string ends. This is distinct from the null pointer, which is a memory address.
How do I get a character's ASCII code in code?
JavaScript: 'A'.charCodeAt(0) returns 65. Python: ord('A') returns 65, chr(65) returns 'A'. Go: int(rune('A')) returns 65, string(rune(65)) returns 'A'. C: casting (int)'A' returns 65.
What are ASCII escape sequences used for?
Escape sequences represent characters that cannot be typed directly. \n (LF, 10) starts a new line in source code strings. \t (HT, 9) inserts a tab. \0 (NUL, 0) terminates a C string. URL encoding (%0A) encodes control characters for safe HTTP transmission. HTML entities (&amp;, &lt;) prevent characters from being interpreted as markup.
What comes after ASCII code 127?
Codes 128-255 are outside standard 7-bit ASCII. Various 8-bit encodings assign characters to this range — ISO 8859-1 places accented Latin characters there, Windows-1252 adds the Euro sign and curly quotes, and IBM CP437 has box-drawing characters. These are incompatible with each other. Modern software uses Unicode (via UTF-8) instead, which assigns unambiguous code points to over 1.1 million characters.

Further Reading

Related Tools