ASCII stands for American Standard Code for Information Interchange. It is a character encoding standard that assigns unique numbers to each character in the English language. ASCII numbers are used to represent text in computers, communication equipment, and other devices that use text.
Each ASCII character is assigned a unique number between 0 and 127. For example, the letter 'A' is assigned the number 65, the letter 'B' is assigned the number 66, and so on. The ASCII table includes characters such as letters, numbers, punctuation marks, and control characters.
ASCII numbers are used to represent text in many programming languages, including JavaScript. In JavaScript, you can use the charCodeAt() method to get the ASCII number of a character in a string.
In addition to ASCII, there are other character encoding standards, such as Unicode, that support a wider range of characters from different languages and scripts. However, ASCII remains an important standard for representing text in computers and communication systems.
Examples
The following table shows all 128 ASCII characters and their corresponding numbers:
Decimal | Binary | Hexadecimal | Octal | HTML | Character | Description |
---|---|---|---|---|---|---|
0 | 00000000 | 00 | 0 | � | NUL | Null |
1 | 00000001 | 01 | 1 |  | SOH | Start of Header |
2 | 00000010 | 02 | 2 |  | STX | Start of Text |
3 | 00000011 | 03 | 3 |  | ETX | End of Text |
4 | 00000100 | 04 | 4 |  | EOT | End of Transmission |
5 | 00000101 | 05 | 5 |  | ENQ | Enquiry |
6 | 00000110 | 06 | 6 |  | ACK | Acknowledge |
7 | 00000111 | 07 | 7 |  | BEL | Bell |
8 | 00001000 | 08 | 10 |  | BS | Backspace |
9 | 00001001 | 09 | 11 | 	 | HT | Horizontal Tab |
10 | 00001010 | 0A | 12 | | LF | Line Feed |
11 | 00001011 | 0B | 13 |  | VT | Vertical Tab |
12 | 00001100 | 0C | 14 |  | FF | Form Feed |
13 | 00001101 | 0D | 15 | | CR | Carriage Return |
14 | 00001110 | 0E | 16 |  | SO | Shift Out |
15 | 00001111 | 0F | 17 |  | SI | Shift In |
16 | 00010000 | 10 | 20 |  | DLE | Data Link Escape |
17 | 00010001 | 11 | 21 |  | DC1 | Device Control 1 |
18 | 00010010 | 12 | 22 |  | DC2 | Device Control 2 |
19 | 00010011 | 13 | 23 |  | DC3 | Device Control 3 |
20 | 00010100 | 14 | 24 |  | DC4 | Device Control 4 |
21 | 00010101 | 15 | 25 |  | NAK | Negative Acknowledge |
22 | 00010110 | 16 | 26 |  | SYN | Synchronize |
23 | 00010111 | 17 | 27 |  | ETB | End of Transmission Block |
24 | 00011000 | 18 | 30 |  | CAN | Cancel |
25 | 00011001 | 19 | 31 |  | EM | End of Medium |
26 | 00011010 | 1A | 32 |  | SUB | Substitute |
27 | 00011011 | 1B | 33 |  | ESC | Escape |
28 | 00011100 | 1C | 34 |  | FS | File Separator |
29 | 00011101 | 1D | 35 |  | GS | Group Separator |
30 | 00011110 | 1E | 36 |  | RS | Record Separator |
31 | 00011111 | 1F | 37 |  | US | Unit Separator |
32 | 00100000 | 20 | 40 |   | space | Space |
33 | 00100001 | 21 | 41 | ! | ! | Exclamation mark |
34 | 00100010 | 22 | 42 | " | " | Double quote |
35 | 00100011 | 23 | 43 | # | # | Number |
36 | 00100100 | 24 | 44 | $ | $ | Dollar sign |
37 | 00100101 | 25 | 45 | % | % | Percent |
38 | 00100110 | 26 | 46 | & | & | Ampersand |
39 | 00100111 | 27 | 47 | ' | ' | Single quote |
40 | 00101000 | 28 | 50 | ( | ( | Left parenthesis |
41 | 00101001 | 29 | 51 | ) | ) | Right parenthesis |
42 | 00101010 | 2A | 52 | * | * | Asterisk |
43 | 00101011 | 2B | 53 | + | + | Plus |
44 | 00101100 | 2C | 54 | , | , | Comma |
45 | 00101101 | 2D | 55 | - | - | Minus |
46 | 00101110 | 2E | 56 | . | . | Period |
47 | 00101111 | 2F | 57 | / | / | Slash |
48 | 00110000 | 30 | 60 | 0 | 0 | Zero |
49 | 00110001 | 31 | 61 | 1 | 1 | One |
50 | 00110010 | 32 | 62 | 2 | 2 | Two |
51 | 00110011 | 33 | 63 | 3 | 3 | Three |
52 | 00110100 | 34 | 64 | 4 | 4 | Four |
53 | 00110101 | 35 | 65 | 5 | 5 | Five |
54 | 00110110 | 36 | 66 | 6 | 6 | Six |
55 | 00110111 | 37 | 67 | 7 | 7 | Seven |
56 | 00111000 | 38 | 70 | 8 | 8 | Eight |
57 | 00111001 | 39 | 71 | 9 | 9 | Nine |
58 | 00111010 | 3A | 72 | : | : | Colon |
59 | 00111011 | 3B | 73 | ; | ; | Semicolon |
60 | 00111100 | 3C | 74 | < | < | Less than |
61 | 00111101 | 3D | 75 | = | = | Equality sign |
62 | 00111110 | 3E | 76 | > | > | Greater than |
63 | 00111111 | 3F | 77 | ? | ? | Question mark |
64 | 01000000 | 40 | 100 | @ | @ | At sign |
65 | 01000001 | 41 | 101 | A | A | Capital A |
66 | 01000010 | 42 | 102 | B | B | Capital B |
67 | 01000011 | 43 | 103 | C | C | Capital C |
68 | 01000100 | 44 | 104 | D | D | Capital D |
69 | 01000101 | 45 | 105 | E | E | Capital E |
70 | 01000110 | 46 | 106 | F | F | Capital F |
71 | 01000111 | 47 | 107 | G | G | Capital G |
72 | 01001000 | 48 | 110 | H | H | Capital H |
73 | 01001001 | 49 | 111 | I | I | Capital I |
74 | 01001010 | 4A | 112 | J | J | Capital J |
75 | 01001011 | 4B | 113 | K | K | Capital K |
76 | 01001100 | 4C | 114 | L | L | Capital L |
77 | 01001101 | 4D | 115 | M | M | Capital M |
78 | 01001110 | 4E | 116 | N | N | Capital N |
79 | 01001111 | 4F | 117 | O | O | Capital O |
80 | 01010000 | 50 | 120 | P | P | Capital P |
81 | 01010001 | 51 | 121 | Q | Q | Capital Q |
82 | 01010010 | 52 | 122 | R | R | Capital R |
83 | 01010011 | 53 | 123 | S | S | Capital S |
84 | 01010100 | 54 | 124 | T | T | Capital T |
85 | 01010101 | 55 | 125 | U | U | Capital U |
86 | 01010110 | 56 | 126 | V | V | Capital V |
87 | 01010111 | 57 | 127 | W | W | Capital W |
88 | 01011000 | 58 | 130 | X | X | Capital X |
89 | 01011001 | 59 | 131 | Y | Y | Capital Y |
90 | 01011010 | 5A | 132 | Z | Z | Capital Z |
91 | 01011011 | 5B | 133 | [ | [ | Left square bracket |
92 | 01011100 | 5C | 134 | \ | \ | Backslash |
93 | 01011101 | 5D | 135 | ] | ] | Right square bracket |
94 | 01011110 | 5E | 136 | ^ | ^ | Caret / circumflex |
95 | 01011111 | 5F | 137 | _ | _ | Underscore |
96 | 01100000 | 60 | 140 | ` | ` | Grave / accent |
97 | 01100001 | 61 | 141 | a | a | Small a |
98 | 01100010 | 62 | 142 | b | b | Small b |
99 | 01100011 | 63 | 143 | c | c | Small c |
100 | 01100100 | 64 | 144 | d | d | Small d |
101 | 01100101 | 65 | 145 | e | e | Small e |
102 | 01100110 | 66 | 146 | f | f | Small f |
103 | 01100111 | 67 | 147 | g | g | Small g |
104 | 01101000 | 68 | 150 | h | h | Small h |
105 | 01101001 | 69 | 151 | i | i | Small i |
106 | 01101010 | 6A | 152 | j | j | Small j |
107 | 01101011 | 6B | 153 | k | k | Small k |
108 | 01101100 | 6C | 154 | l | l | Small l |
109 | 01101101 | 6D | 155 | m | m | Small m |
110 | 01101110 | 6E | 156 | n | n | Small n |
111 | 01101111 | 6F | 157 | o | o | Small o |
112 | 01110000 | 70 | 160 | p | p | Small p |
113 | 01110001 | 71 | 161 | q | q | Small q |
114 | 01110010 | 72 | 162 | r | r | Small r |
115 | 01110011 | 73 | 163 | s | s | Small s |
116 | 01110100 | 74 | 164 | t | t | Small t |
117 | 01110101 | 75 | 165 | u | u | Small u |
118 | 01110110 | 76 | 166 | v | v | Small v |
119 | 01110111 | 77 | 167 | w | w | Small w |
120 | 01111000 | 78 | 170 | x | x | Small x |
121 | 01111001 | 79 | 171 | y | y | Small y |
122 | 01111010 | 7A | 172 | z | z | Small z |
123 | 01111011 | 7B | 173 | { | { | Left curly bracket |
124 | 01111100 | 7C | 174 | | | \ | |
125 | 01111101 | 7D | 175 | } | } | Right curly bracket |
126 | 01111110 | 7E | 176 | ~ | ~ | Tilde |
127 | 01111111 | 7F | 177 |  | DEL | Delete |
Top comments (0)