CompSci.rocks

ASCII Table

Looking for a quick ASCII table to look up a character code? We've got you covered with the first 127 ASCII values in decimal, hex, binary, and octal.

ASCII is an acronym for American Standard Code for Information Interchange. Yeah, that doesn't really tell us much about what an ASCII code is, or why we should care about an ASCII table.

For that, we need to remember that computers only understand numbers. And only binary numbers at that. When you press the A key on your keyboard, we need a way for your computer to know what key was pressed. And since it doesn't understand letters, we have to use numbers.

If you scroll down on the ASCII table below and find the capital letter A you'll see that it has an ASCII value of 65, which is 0100 0001 in binary. That number is sent from your keyboard to your computer and the computer interprets it as an A. The same thing happens in data files. It's the number that's ultimately needed, not the character.

And if you'd like a little more information on ASCII, head on over to Wikipedia.

ASCII Table

Here you'll find a list of the first 127 ASCII codes that your computer knows how to work with. We're no longer limited to just 127, but when people talk about ASCII tables, this is usually the list they're talking about.

You can probably skip over the first 31. They're system codes that tell the computer how to do things, but don't typically show up on screen. There are a few interesting ones in there though. For example, pressing the enter key on your keyboard sends the code 13.

Visible characters start at 32 with space. Okay, so I guess space really isn't a visible character.

If you're using this ASCII table for an intro to programming course you probably really only have to memorize 3 or 4 different numbers. The first one is space, which is code 32. Then you'll want to remember lower case a (97), capital A (65) and zero (48). From there you can figure out the other letters and numbers. Since the letters and number are sequential you can work out the rest. For example, a lower case d is 100 – 3 characters after lower case a.

CHARACTER DECIMAL BINARY OCTAL HEX
(null)0000
(start of heading)1111
(start of text)21022
(end of text)31133
(end of transmission)410044
(enquiry)510155
(acknowledge)611066
(bell)711177
(backspace)81000108
(horizontal tab)91001119
(new line)10101012A
(vertical tab)11101113B
(new page)12110014C
(carriage return)13110115D
(shift out)14111016E
(shift in)15111117F
(data link escape)16100002010
(device control 1)17100012111
(device control 2)18100102212
(device control 3)19100112313
(device control 4)20101002414
(negative acknowledge)21101012515
(synchronous idle)22101102616
(end of trans block)23101112717
(cancel)24110003018
(end of medium)25110013119
(substitute)2611010321A
(escape)2711011331B
(file separator)2811100341C
(group separator)2911101351D
(record separator)3011110361E
(unit separator)3111111371F
(SPACE)321000004020
!331000014121
"341000104222
#351000114323
$361001004424
%371001014525
&381001104626
'391001114727
(401010005028
)411010015129
*42101010522A
+43101011532B
,44101100542C
-45101101552D
.46101110562E
/47101111572F
0481100006030
1491100016131
2501100106232
3511100116333
4521101006434
5531101016535
6541101106636
7551101116737
8561110007038
9571110017139
:58111010723A
;59111011733B
<60111100743C
=61111101753D
>62111110763E
?63111111773F
`64100000010040
A65100000110141
B66100001010242
C67100001110343
D68100010010444
E69100010110545
F70100011010646
G71100011110747
H72100100011048
I73100100111149
J7410010101124A
K7510010111134B
L7610011001144C
M7710011011154D
N7810011101164E
O7910011111174F
P80101000012050
Q81101000112151
R82101001012252
S83101001112353
T84101010012454
U85101010112555
V86101011012656
W87101011112757
X88101100013058
Y89101100113159
Z9010110101325A
[9110110111335B
\9210111001345C
]9310111011355D
^9410111101365E
_9510111111375F
`96110000014060
a97110000114161
b98110001014262
c99110001114363
d100110010014464
e101110010114565
f102110011014666
g103110011114767
h104110100015068
i105110100115169
j10611010101526A
k10711010111536B
l10811011001546C
m10911011011556D
n11011011101566E
o11111011111576F
p112111000016070
q113111000116171
r114111001016272
s115111001116373
t116111010016474
u117111010116575
v118111011016676
w119111011116777
x120111100017078
y121111100117179
z12211110101727A
{12311110111737B
|12411111001747C
}12511111011757D
~12611111101767E
(delete)12711111111777F