| Dec | Hex | Oct | Char | Description |
|---|---|---|---|---|
| 0 | 0x00 | 000 | NUL | Null |
| 1 | 0x01 | 001 | SOH | Start of Heading |
| 2 | 0x02 | 002 | STX | Start of Text |
| 3 | 0x03 | 003 | ETX | End of Text |
| 4 | 0x04 | 004 | EOT | End of Transmission |
| 5 | 0x05 | 005 | ENQ | Enquiry |
| 6 | 0x06 | 006 | ACK | Acknowledge |
| 7 | 0x07 | 007 | BEL | Bell |
| 8 | 0x08 | 010 | BS | Backspace |
| 9 | 0x09 | 011 | HT | Horizontal Tab |
| 10 | 0x0A | 012 | LF | Line Feed |
| 11 | 0x0B | 013 | VT | Vertical Tab |
| 12 | 0x0C | 014 | FF | Form Feed |
| 13 | 0x0D | 015 | CR | Carriage Return |
| 14 | 0x0E | 016 | SO | Shift Out |
| 15 | 0x0F | 017 | SI | Shift In |
| 16 | 0x10 | 020 | DLE | Data Link Escape |
| 17 | 0x11 | 021 | DC1 | Device Control 1 |
| 18 | 0x12 | 022 | DC2 | Device Control 2 |
| 19 | 0x13 | 023 | DC3 | Device Control 3 |
| 20 | 0x14 | 024 | DC4 | Device Control 4 |
| 21 | 0x15 | 025 | NAK | Negative Acknowledge |
| 22 | 0x16 | 026 | SYN | Synchronous Idle |
| 23 | 0x17 | 027 | ETB | End of Trans. Block |
| 24 | 0x18 | 030 | CAN | Cancel |
| 25 | 0x19 | 031 | EM | End of Medium |
| 26 | 0x1A | 032 | SUB | Substitute |
| 27 | 0x1B | 033 | ESC | Escape |
| 28 | 0x1C | 034 | FS | File Separator |
| 29 | 0x1D | 035 | GS | Group Separator |
| 30 | 0x1E | 036 | RS | Record Separator |
| 31 | 0x1F | 037 | US | Unit Separator |
| 32 | 0x20 | 040 | SP | Space |
| 33 | 0x21 | 041 | ! | Exclamation mark |
| 34 | 0x22 | 042 | " | Double quote |
| 35 | 0x23 | 043 | # | Hash / Number sign |
| 36 | 0x24 | 044 | $ | Dollar sign |
| 37 | 0x25 | 045 | % | Percent sign |
| 38 | 0x26 | 046 | & | Ampersand |
| 39 | 0x27 | 047 | ' | Single quote |
| 40 | 0x28 | 050 | ( | Left parenthesis |
| 41 | 0x29 | 051 | ) | Right parenthesis |
| 42 | 0x2A | 052 | * | Asterisk |
| 43 | 0x2B | 053 | + | Plus sign |
| 44 | 0x2C | 054 | , | Comma |
| 45 | 0x2D | 055 | - | Hyphen / Minus |
| 46 | 0x2E | 056 | . | Period / Full stop |
| 47 | 0x2F | 057 | / | Slash |
| 48 | 0x30 | 060 | 0 | Digit 0 |
| 49 | 0x31 | 061 | 1 | Digit 1 |
| 50 | 0x32 | 062 | 2 | Digit 2 |
| 51 | 0x33 | 063 | 3 | Digit 3 |
| 52 | 0x34 | 064 | 4 | Digit 4 |
| 53 | 0x35 | 065 | 5 | Digit 5 |
| 54 | 0x36 | 066 | 6 | Digit 6 |
| 55 | 0x37 | 067 | 7 | Digit 7 |
| 56 | 0x38 | 070 | 8 | Digit 8 |
| 57 | 0x39 | 071 | 9 | Digit 9 |
| 58 | 0x3A | 072 | : | Colon |
| 59 | 0x3B | 073 | ; | Semicolon |
| 60 | 0x3C | 074 | < | Less than |
| 61 | 0x3D | 075 | = | Equals sign |
| 62 | 0x3E | 076 | > | Greater than |
| 63 | 0x3F | 077 | ? | Question mark |
| 64 | 0x40 | 100 | @ | At sign |
| 65 | 0x41 | 101 | A | Uppercase A |
| 66 | 0x42 | 102 | B | Uppercase B |
| 67 | 0x43 | 103 | C | Uppercase C |
| 68 | 0x44 | 104 | D | Uppercase D |
| 69 | 0x45 | 105 | E | Uppercase E |
| 70 | 0x46 | 106 | F | Uppercase F |
| 71 | 0x47 | 107 | G | Uppercase G |
| 72 | 0x48 | 110 | H | Uppercase H |
| 73 | 0x49 | 111 | I | Uppercase I |
| 74 | 0x4A | 112 | J | Uppercase J |
| 75 | 0x4B | 113 | K | Uppercase K |
| 76 | 0x4C | 114 | L | Uppercase L |
| 77 | 0x4D | 115 | M | Uppercase M |
| 78 | 0x4E | 116 | N | Uppercase N |
| 79 | 0x4F | 117 | O | Uppercase O |
| 80 | 0x50 | 120 | P | Uppercase P |
| 81 | 0x51 | 121 | Q | Uppercase Q |
| 82 | 0x52 | 122 | R | Uppercase R |
| 83 | 0x53 | 123 | S | Uppercase S |
| 84 | 0x54 | 124 | T | Uppercase T |
| 85 | 0x55 | 125 | U | Uppercase U |
| 86 | 0x56 | 126 | V | Uppercase V |
| 87 | 0x57 | 127 | W | Uppercase W |
| 88 | 0x58 | 130 | X | Uppercase X |
| 89 | 0x59 | 131 | Y | Uppercase Y |
| 90 | 0x5A | 132 | Z | Uppercase Z |
| 91 | 0x5B | 133 | [ | Left square bracket |
| 92 | 0x5C | 134 | \ | Backslash |
| 93 | 0x5D | 135 | ] | Right square bracket |
| 94 | 0x5E | 136 | ^ | Caret / Circumflex |
| 95 | 0x5F | 137 | _ | Underscore |
| 96 | 0x60 | 140 | ` | Grave accent / Backtick |
| 97 | 0x61 | 141 | a | Lowercase a |
| 98 | 0x62 | 142 | b | Lowercase b |
| 99 | 0x63 | 143 | c | Lowercase c |
| 100 | 0x64 | 144 | d | Lowercase d |
| 101 | 0x65 | 145 | e | Lowercase e |
| 102 | 0x66 | 146 | f | Lowercase f |
| 103 | 0x67 | 147 | g | Lowercase g |
| 104 | 0x68 | 150 | h | Lowercase h |
| 105 | 0x69 | 151 | i | Lowercase i |
| 106 | 0x6A | 152 | j | Lowercase j |
| 107 | 0x6B | 153 | k | Lowercase k |
| 108 | 0x6C | 154 | l | Lowercase l |
| 109 | 0x6D | 155 | m | Lowercase m |
| 110 | 0x6E | 156 | n | Lowercase n |
| 111 | 0x6F | 157 | o | Lowercase o |
| 112 | 0x70 | 160 | p | Lowercase p |
| 113 | 0x71 | 161 | q | Lowercase q |
| 114 | 0x72 | 162 | r | Lowercase r |
| 115 | 0x73 | 163 | s | Lowercase s |
| 116 | 0x74 | 164 | t | Lowercase t |
| 117 | 0x75 | 165 | u | Lowercase u |
| 118 | 0x76 | 166 | v | Lowercase v |
| 119 | 0x77 | 167 | w | Lowercase w |
| 120 | 0x78 | 170 | x | Lowercase x |
| 121 | 0x79 | 171 | y | Lowercase y |
| 122 | 0x7A | 172 | z | Lowercase z |
| 123 | 0x7B | 173 | { | Left curly brace |
| 124 | 0x7C | 174 | | | Vertical bar / Pipe |
| 125 | 0x7D | 175 | } | Right curly brace |
| 126 | 0x7E | 176 | ~ | Tilde |
| 127 | 0x7F | 177 | DEL | Delete |
What is ASCII?
ASCII (American Standard Code for Information Interchange) is a character encoding standard that assigns numeric values to 128 characters, including English letters, digits, punctuation marks, and control characters. Developed in the 1960s, ASCII forms the foundation of modern character encoding systems like UTF-8. Each ASCII character is represented by a 7-bit binary number (0-127).
FAQ
Q: What is the difference between ASCII and Unicode?
A: ASCII defines 128 characters using 7 bits. Unicode is a much larger standard that encompasses over 149,000 characters from virtually all writing systems. The first 128 Unicode code points are identical to ASCII, making ASCII a subset of Unicode.
Q: What are ASCII control characters?
A: Control characters (0-31 and 127) are non-printable characters originally used to control hardware devices like printers and teleprinters. Examples include NUL (null), LF (line feed/newline), CR (carriage return), TAB (horizontal tab), and ESC (escape).
Q: Why does ASCII only go up to 127?
A: ASCII uses 7 bits of data, which allows for 2^7 = 128 possible values (0-127). The 8th bit was originally used for parity checking in data transmission. Extended ASCII variants use all 8 bits to represent 256 characters, but these are not part of the standard ASCII specification.
Q: What is the ASCII value of the space character?
A: The space character has the ASCII value 32 (decimal), 20 (hexadecimal), or 040 (octal). It is the first printable ASCII character and is used to separate words in text.
Q: How is ASCII used in programming?
A: Programmers use ASCII values for character comparison, sorting, encryption, data validation, and converting between characters and their numeric representations. Most programming languages provide built-in functions to get the ASCII value of a character (e.g., ord() in Python, charCodeAt() in JavaScript).