ASCII Characters
Font:
What Are ASCII Characters
ASCII characters is a character set of 128 characters, each with a name and an integer ID (aka Unicode Codepoint).
- The character set includes printable characters and control characters.
- Printable Characters includes digits 0 to 9, letters A to Z uppercase and lowercase, punctuations. There are 95 printable characters.
- Control Characters are used to represent tab, start text, null, escape, bell (audio alert), end of line, end of file, end of transmission, abort, etc. Control Characters have ID 0 to 31, and 127. There are 33 control characters.
- ASCII character set is identical to Unicode characters with ID from from 0 to 127 inclusive, and each char also have the same ID.
- ASCII is abbreviation for American Standard Code for Information Interchange, created in 1960s.
- The ASCII characters can be represented by 7 binary digits. So its sometimes called 7 bits ASCII.
Printable ASCII Characters
Here's the printable ASCII characters, in the order of their ID (aka codepoint):
!"#$%&'()*+,-./ 0123456789 :;<=>?@ ABCDEFGHIJKLMNOPQRSTUVWXYZ [\]^_` abcdefghijklmnopqrstuvwxyz {|}~
Representation of Control Characters
Control Characters have various notations.
- By their integer ID (codepoint) in decimal. (For example, Carriage return is 13.)
- By codepoint in hexadecimal. (For example, Carriage return is 0D.)
- By standardized abbrev. (For example, Carriage return is CR.)
- By Unicode glyph. (For example, Carriage return is โ.) [see Unicode: Symbols for ASCII Control Characters โ]
- By caret notation. (For example, Carriage return is ^M.) (Caret notation is heavily used in emacs. [see Emacs: Newline Convention CR LF])
- In programing languages, some have C escape syntax in string. (For example, Carriage return is \r.)
ASCII Table
Here's the complete ASCII table.
Decimal | Hex | Abbr | Unicode Symbol | Caret Notation | C Escape Syntax | Description |
---|---|---|---|---|---|---|
0 | 00 | NUL | โ | ^@ | \0 | Null character |
1 | 01 | SOH | โ | ^A | Start of Header | |
2 | 02 | STX | โ | ^B | Start of Text | |
3 | 03 | ETX | โ | ^C | End of Text | |
4 | 04 | EOT | โ | ^D | End of Transmission | |
5 | 05 | ENQ | โ | ^E | Enquiry | |
6 | 06 | ACK | โ | ^F | Acknowledgment | |
7 | 07 | BEL | โ | ^G | \a | Bell |
8 | 08 | BS | โ | ^H | \b | Backspace |
9 | 09 | HT | โ | ^I | \t | Horizontal Tab |
10 | 0A | LF | โ | ^J | \n | Line feed |
11 | 0B | VT | โ | ^K | \v | Vertical Tab |
12 | 0C | FF | โ | ^L | \f | Form feed |
13 | 0D | CR | โ | ^M | \r | Carriage return |
14 | 0E | SO | โ | ^N | Shift Out | |
15 | 0F | SI | โ | ^O | Shift In | |
16 | 10 | DLE | โ | ^P | Data Link Escape | |
17 | 11 | DC1 | โ | ^Q | Device Control 1 (oft. XON) | |
18 | 12 | DC2 | โ | ^R | Device Control 2 | |
19 | 13 | DC3 | โ | ^S | Device Control 3 (oft. XOFF) | |
20 | 14 | DC4 | โ | ^T | Device Control 4 | |
21 | 15 | NAK | โ | ^U | Negative Acknowledgment | |
22 | 16 | SYN | โ | ^V | Synchronous Idle | |
23 | 17 | ETB | โ | ^W | End of Trans. Block | |
24 | 18 | CAN | โ | ^X | Cancel | |
25 | 19 | EM | โ | ^Y | End of Medium | |
26 | 1A | SUB | โ | ^Z | Substitute | |
27 | 1B | ESC | โ | ^[ | \e | Escape |
28 | 1C | FS | โ | ^\ | File Separator | |
29 | 1D | GS | โ | ^] | Group Separator | |
30 | 1E | RS | โ | ^^ | Record Separator | |
31 | 1F | US | โ | ^_ | Unit Separator | |
Decimal | Hex | Abbr | Unicode Symbol | Caret Notation | C Escape Syntax | Description |
127 | 7F | DEL | โก | ^? | Delete |
Decimal | Hex | Unicode Symbol |
---|---|---|
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 | / |
Decimal | Hex | Unicode Symbol |
---|---|---|
48 | 30 | 0 |
49 | 31 | 1 |
50 | 32 | 2 |
51 | 33 | 3 |
52 | 34 | 4 |
53 | 35 | 5 |
54 | 36 | 6 |
55 | 37 | 7 |
56 | 38 | 8 |
57 | 39 | 9 |
58 | 3A | : |
59 | 3B | ; |
60 | 3C | < |
61 | 3D | = |
62 | 3E | > |
63 | 3F | ? |
64 | 40 | @ |
Decimal | Hex | Unicode Symbol |
---|---|---|
65 | 41 | A |
66 | 42 | B |
67 | 43 | C |
68 | 44 | D |
69 | 45 | E |
70 | 46 | F |
71 | 47 | G |
72 | 48 | H |
73 | 49 | I |
74 | 4A | J |
75 | 4B | K |
76 | 4C | L |
77 | 4D | M |
78 | 4E | N |
79 | 4F | O |
80 | 50 | P |
81 | 51 | Q |
82 | 52 | R |
83 | 53 | S |
84 | 54 | T |
85 | 55 | U |
86 | 56 | V |
87 | 57 | W |
88 | 58 | X |
89 | 59 | Y |
90 | 5A | Z |
91 | 5B | [ |
92 | 5C | \ |
93 | 5D | ] |
94 | 5E | ^ |
95 | 5F | _ |
96 | 60 | ` |
Decimal | Hex | Unicode Symbol |
---|---|---|
97 | 61 | a |
98 | 62 | b |
99 | 63 | c |
100 | 64 | d |
101 | 65 | e |
102 | 66 | f |
103 | 67 | g |
104 | 68 | h |
105 | 69 | i |
106 | 6A | j |
107 | 6B | k |
108 | 6C | l |
109 | 6D | m |
110 | 6E | n |
111 | 6F | o |
112 | 70 | p |
113 | 71 | q |
114 | 72 | r |
115 | 73 | s |
116 | 74 | t |
117 | 75 | u |
118 | 76 | v |
119 | 77 | w |
120 | 78 | x |
121 | 79 | y |
122 | 7A | z |
Decimal | Hex | Unicode Symbol |
---|---|---|
123 | 7B | { |
124 | 7C | | |
125 | 7D | } |
126 | 7E | ~ |