ASCII Reference
The complete 7-bit character set, its control codes, printable characters, and common relationships.
Updated 2026-07-22
Overview
ASCII is a 7-bit character encoding containing 128 code points numbered 0 through 127. It was designed for information interchange and remains the common foundation of many modern text encodings.
The first 32 values and value 127 are control characters. Values 32 through 126 are printable characters. Unicode preserves this range as U+0000 through U+007F, and UTF-8 represents it with the same single-byte values.
Code Ranges
| Category | Decimal | Hexadecimal | Description |
|---|---|---|---|
| C0 controls | 0–31 | 00–1F | Control characters |
| Space | 32 | 20 | First printable character |
| Digits | 48–57 | 30–39 | Characters 0 through 9 |
| Uppercase letters | 65–90 | 41–5A | Characters A through Z |
| Lowercase letters | 97–122 | 61–7A | Characters a through z |
| Printable characters | 32–126 | 20–7E | Space through tilde |
| Delete | 127 | 7F | DEL control character |
Control Characters
Control characters do not represent ordinary printable glyphs. Their original purposes included controlling terminals, data links, printers, and record-oriented data streams. Some, including tab, line feed, carriage return, escape, and delete, remain common.
| Binary | Octal | Decimal | Hex | Unicode | Abbr. | Picture | Caret | Escape | Name |
|---|---|---|---|---|---|---|---|---|---|
| 0000000 | 000 | 0 | 00 | U+0000 | NUL | ␀ | ^@ | \0 | Null |
| 0000001 | 001 | 1 | 01 | U+0001 | SOH | ␁ | ^A | Start of Heading | |
| 0000010 | 002 | 2 | 02 | U+0002 | STX | ␂ | ^B | Start of Text | |
| 0000011 | 003 | 3 | 03 | U+0003 | ETX | ␃ | ^C | End of Text | |
| 0000100 | 004 | 4 | 04 | U+0004 | EOT | ␄ | ^D | End of Transmission | |
| 0000101 | 005 | 5 | 05 | U+0005 | ENQ | ␅ | ^E | Enquiry | |
| 0000110 | 006 | 6 | 06 | U+0006 | ACK | ␆ | ^F | Acknowledgement | |
| 0000111 | 007 | 7 | 07 | U+0007 | BEL | ␇ | ^G | \a | Bell |
| 0001000 | 010 | 8 | 08 | U+0008 | BS | ␈ | ^H | \b | Backspace |
| 0001001 | 011 | 9 | 09 | U+0009 | HT | ␉ | ^I | \t | Horizontal Tab |
| 0001010 | 012 | 10 | 0A | U+000A | LF | ␊ | ^J | \n | Line Feed |
| 0001011 | 013 | 11 | 0B | U+000B | VT | ␋ | ^K | \v | Vertical Tab |
| 0001100 | 014 | 12 | 0C | U+000C | FF | ␌ | ^L | \f | Form Feed |
| 0001101 | 015 | 13 | 0D | U+000D | CR | ␍ | ^M | \r | Carriage Return |
| 0001110 | 016 | 14 | 0E | U+000E | SO | ␎ | ^N | Shift Out | |
| 0001111 | 017 | 15 | 0F | U+000F | SI | ␏ | ^O | Shift In | |
| 0010000 | 020 | 16 | 10 | U+0010 | DLE | ␐ | ^P | Data Link Escape | |
| 0010001 | 021 | 17 | 11 | U+0011 | DC1 | ␑ | ^Q | Device Control 1 (often XON) | |
| 0010010 | 022 | 18 | 12 | U+0012 | DC2 | ␒ | ^R | Device Control 2 | |
| 0010011 | 023 | 19 | 13 | U+0013 | DC3 | ␓ | ^S | Device Control 3 (often XOFF) | |
| 0010100 | 024 | 20 | 14 | U+0014 | DC4 | ␔ | ^T | Device Control 4 | |
| 0010101 | 025 | 21 | 15 | U+0015 | NAK | ␕ | ^U | Negative Acknowledgement | |
| 0010110 | 026 | 22 | 16 | U+0016 | SYN | ␖ | ^V | Synchronous Idle | |
| 0010111 | 027 | 23 | 17 | U+0017 | ETB | ␗ | ^W | End of Transmission Block | |
| 0011000 | 030 | 24 | 18 | U+0018 | CAN | ␘ | ^X | Cancel | |
| 0011001 | 031 | 25 | 19 | U+0019 | EM | ␙ | ^Y | End of Medium | |
| 0011010 | 032 | 26 | 1A | U+001A | SUB | ␚ | ^Z | Substitute | |
| 0011011 | 033 | 27 | 1B | U+001B | ESC | ␛ | ^[ | \x1B | Escape |
| 0011100 | 034 | 28 | 1C | U+001C | FS | ␜ | ^\ | File Separator | |
| 0011101 | 035 | 29 | 1D | U+001D | GS | ␝ | ^] | Group Separator | |
| 0011110 | 036 | 30 | 1E | U+001E | RS | ␞ | ^^ | Record Separator | |
| 0011111 | 037 | 31 | 1F | U+001F | US | ␟ | ^_ | Unit Separator | |
| 1111111 | 177 | 127 | 7F | U+007F | DEL | ␡ | ^? | Delete |
Printable Characters
| Binary | Octal | Decimal | Hex | Unicode | Glyph |
|---|---|---|---|---|---|
| 0100000 | 040 | 32 | 20 | U+0020 | SP |
| 0100001 | 041 | 33 | 21 | U+0021 | ! |
| 0100010 | 042 | 34 | 22 | U+0022 | " |
| 0100011 | 043 | 35 | 23 | U+0023 | # |
| 0100100 | 044 | 36 | 24 | U+0024 | $ |
| 0100101 | 045 | 37 | 25 | U+0025 | % |
| 0100110 | 046 | 38 | 26 | U+0026 | & |
| 0100111 | 047 | 39 | 27 | U+0027 | ' |
| 0101000 | 050 | 40 | 28 | U+0028 | ( |
| 0101001 | 051 | 41 | 29 | U+0029 | ) |
| 0101010 | 052 | 42 | 2A | U+002A | * |
| 0101011 | 053 | 43 | 2B | U+002B | + |
| 0101100 | 054 | 44 | 2C | U+002C | , |
| 0101101 | 055 | 45 | 2D | U+002D | - |
| 0101110 | 056 | 46 | 2E | U+002E | . |
| 0101111 | 057 | 47 | 2F | U+002F | / |
| 0110000 | 060 | 48 | 30 | U+0030 | 0 |
| 0110001 | 061 | 49 | 31 | U+0031 | 1 |
| 0110010 | 062 | 50 | 32 | U+0032 | 2 |
| 0110011 | 063 | 51 | 33 | U+0033 | 3 |
| 0110100 | 064 | 52 | 34 | U+0034 | 4 |
| 0110101 | 065 | 53 | 35 | U+0035 | 5 |
| 0110110 | 066 | 54 | 36 | U+0036 | 6 |
| 0110111 | 067 | 55 | 37 | U+0037 | 7 |
| 0111000 | 070 | 56 | 38 | U+0038 | 8 |
| 0111001 | 071 | 57 | 39 | U+0039 | 9 |
| 0111010 | 072 | 58 | 3A | U+003A | : |
| 0111011 | 073 | 59 | 3B | U+003B | ; |
| 0111100 | 074 | 60 | 3C | U+003C | < |
| 0111101 | 075 | 61 | 3D | U+003D | = |
| 0111110 | 076 | 62 | 3E | U+003E | > |
| 0111111 | 077 | 63 | 3F | U+003F | ? |
| 1000000 | 100 | 64 | 40 | U+0040 | @ |
| 1000001 | 101 | 65 | 41 | U+0041 | A |
| 1000010 | 102 | 66 | 42 | U+0042 | B |
| 1000011 | 103 | 67 | 43 | U+0043 | C |
| 1000100 | 104 | 68 | 44 | U+0044 | D |
| 1000101 | 105 | 69 | 45 | U+0045 | E |
| 1000110 | 106 | 70 | 46 | U+0046 | F |
| 1000111 | 107 | 71 | 47 | U+0047 | G |
| 1001000 | 110 | 72 | 48 | U+0048 | H |
| 1001001 | 111 | 73 | 49 | U+0049 | I |
| 1001010 | 112 | 74 | 4A | U+004A | J |
| 1001011 | 113 | 75 | 4B | U+004B | K |
| 1001100 | 114 | 76 | 4C | U+004C | L |
| 1001101 | 115 | 77 | 4D | U+004D | M |
| 1001110 | 116 | 78 | 4E | U+004E | N |
| 1001111 | 117 | 79 | 4F | U+004F | O |
| 1010000 | 120 | 80 | 50 | U+0050 | P |
| 1010001 | 121 | 81 | 51 | U+0051 | Q |
| 1010010 | 122 | 82 | 52 | U+0052 | R |
| 1010011 | 123 | 83 | 53 | U+0053 | S |
| 1010100 | 124 | 84 | 54 | U+0054 | T |
| 1010101 | 125 | 85 | 55 | U+0055 | U |
| 1010110 | 126 | 86 | 56 | U+0056 | V |
| 1010111 | 127 | 87 | 57 | U+0057 | W |
| 1011000 | 130 | 88 | 58 | U+0058 | X |
| 1011001 | 131 | 89 | 59 | U+0059 | Y |
| 1011010 | 132 | 90 | 5A | U+005A | Z |
| 1011011 | 133 | 91 | 5B | U+005B | [ |
| 1011100 | 134 | 92 | 5C | U+005C | \ |
| 1011101 | 135 | 93 | 5D | U+005D | ] |
| 1011110 | 136 | 94 | 5E | U+005E | ^ |
| 1011111 | 137 | 95 | 5F | U+005F | _ |
| 1100000 | 140 | 96 | 60 | U+0060 | ` |
| 1100001 | 141 | 97 | 61 | U+0061 | a |
| 1100010 | 142 | 98 | 62 | U+0062 | b |
| 1100011 | 143 | 99 | 63 | U+0063 | c |
| 1100100 | 144 | 100 | 64 | U+0064 | d |
| 1100101 | 145 | 101 | 65 | U+0065 | e |
| 1100110 | 146 | 102 | 66 | U+0066 | f |
| 1100111 | 147 | 103 | 67 | U+0067 | g |
| 1101000 | 150 | 104 | 68 | U+0068 | h |
| 1101001 | 151 | 105 | 69 | U+0069 | i |
| 1101010 | 152 | 106 | 6A | U+006A | j |
| 1101011 | 153 | 107 | 6B | U+006B | k |
| 1101100 | 154 | 108 | 6C | U+006C | l |
| 1101101 | 155 | 109 | 6D | U+006D | m |
| 1101110 | 156 | 110 | 6E | U+006E | n |
| 1101111 | 157 | 111 | 6F | U+006F | o |
| 1110000 | 160 | 112 | 70 | U+0070 | p |
| 1110001 | 161 | 113 | 71 | U+0071 | q |
| 1110010 | 162 | 114 | 72 | U+0072 | r |
| 1110011 | 163 | 115 | 73 | U+0073 | s |
| 1110100 | 164 | 116 | 74 | U+0074 | t |
| 1110101 | 165 | 117 | 75 | U+0075 | u |
| 1110110 | 166 | 118 | 76 | U+0076 | v |
| 1110111 | 167 | 119 | 77 | U+0077 | w |
| 1111000 | 170 | 120 | 78 | U+0078 | x |
| 1111001 | 171 | 121 | 79 | U+0079 | y |
| 1111010 | 172 | 122 | 7A | U+007A | z |
| 1111011 | 173 | 123 | 7B | U+007B | { |
| 1111100 | 174 | 124 | 7C | U+007C | | |
| 1111101 | 175 | 125 | 7D | U+007D | } |
| 1111110 | 176 | 126 | 7E | U+007E | ~ |
Useful Relationships
- The numeric value of an ASCII digit is its code minus 48 (0x30).
- Matching uppercase and lowercase letters differ by 32 (0x20).
- For ASCII letters only, setting the 0x20 bit converts A–Z to lowercase.
- For ASCII letters only, clearing the 0x20 bit converts a–z to uppercase.
- Unix-like systems use LF for line endings; Windows conventionally uses CR followed by LF.
printf '%d 0x%X\n' "'A" "'A"
printf '%d 0x%X\n' "'a" "'a" History and Modern Use
ASCII was standardized during the 1960s and revised over time. Some character positions and names differed between early editions, which explains historical glyph variants found in older tables and equipment.
Today ASCII is most often encountered as the shared subset of Unicode and UTF-8, in programming-language syntax, network protocols, terminal controls, and plain-text file formats.