Nav

ASCII table

Edit me

This page was adapted from here.

ASCII stands for American Standard Code for Information Interchange. Below is the ASCII character table, including descriptions of the first 32 characters. ASCII was originally designed for use with teletypes, and so the descriptions are somewhat obscure and their use is frequently not as intended.

Java actually uses Unicode, which includes ASCII and other characters from languages around the world.

In C/C++, the char datatype is used to store an ASCII character. If we write char c = ‘5’, then c stores the value 53. If we write ‘5’-‘0’ it evaluates to 53-48, or the int 5. If we write char c = ‘B’+32; then c stores ‘b’.

ASCII table

Hex Dec Char
00 0 NUL (null)
01 1 SOH (start of heading)
02 2 STX (start of text)
03 3 ETX (end of text)
04 4 EOT (end of transmission)
05 5 ENQ (enquiry)
06 6 ACK (acknowledge)
07 7 BEL (bell)
08 8 BS (backspace)
09 9 TAB (horizontal tab)
0a 10 LF (NL line feed, new line)
0b 11 VT (vertical tab)
0c 12 FF (NP form feed, new page)
0d 13 CR (carriage return)
0e 14 SO (shift out)
0f 15 SI (shift in)
10 16 DLE (data link escape)
11 17 DC1 (device control 1)
12 18 DC2 (device control 2)
13 19 DC3 (device control 3)
14 20 DC4 (device control 4)
15 21 NAK (negative acknowledge)
16 22 SYN (synchronous idle)
17 23 ETB (end of trans. block)
18 24 CAN (cancel)
19 25 EM (end of medium)
1a 26 SUB (substitute)
1b 27 ESC (escape)
1c 28 FS (file separator)
1d 29 GS (group separator)
1e 30 RS (record separator)
1f 31 US (unit separator)
Hex Dec Char
20 32 SPACE
21 33 !
22 34
23 35 #
24 36 $
25 37 %
26 38 &
27 39
28 40 (
29 41 )
2a 42 *
2b 43 +
2c 44 ,
2d 45 -
2e 46 .
2f 47 /
30 48 0
31 49 1
32 50 2
33 51 3
34 52 4
35 53 5
36 54 6
37 55 7
38 56 8
39 57 9
3a 58 :
3b 59 ;
3c 60 <
3d 61 =
3e 62 >
3f 63 ?
Hex Dec Char
40 64 @
41 65 A
42 66 B
43 67 C
44 68 D
45 69 E
46 70 F
47 71 G
48 72 H
49 73 I
4a 74 J
4b 75 K
4c 76 L
4d 77 M
4e 78 N
4f 79 O
50 80 P
51 81 Q
52 82 R
53 83 S
54 84 T
55 85 U
56 86 V
57 87 W
58 88 X
59 89 Y
5a 90 Z
5b 91 [
5c 92 \
5d 93 ]
5e 94 ^
5f 95 _
Hex Dec Char  
60 96 `  
61 97 a  
62 98 b  
63 99 c  
64 100 d  
65 101 e  
66 102 f  
67 103 g  
68 104 h  
69 105 i  
6a 106 j  
6b 107 k  
6c 108 l  
6d 109 m  
6e 110 n  
6f 111 o  
70 112 p  
71 113 q  
72 114 r  
73 115 s  
74 116 t  
75 117 u  
76 118 v  
77 119 w  
78 120 x  
79 121 y  
7a 122 z  
7b 123 {  
7c 124    
7d 125 }  
7e 126 ~  
7f 127 DEL