An ASCII table maps each standard character to a number from 0 to 127. It is the quickest way to check the decimal, hexadecimal, or binary value of a letter, digit, punctuation mark, or control code. For example, uppercase A is decimal 65, hexadecimal 41, and binary 1000001.
The complete ASCII code table below uses the original 7-bit standard. It includes all 33 control entries and all 95 printable characters. Use your browser's find command to locate a character, decimal value, or control abbreviation.
Complete ASCII Table from 0 to 127
| Decimal | Hex | Binary | Character | Description |
|---|---|---|---|---|
| 0 | 00 | 0000000 | NUL | Null |
| 1 | 01 | 0000001 | SOH | Start of heading |
| 2 | 02 | 0000010 | STX | Start of text |
| 3 | 03 | 0000011 | ETX | End of text |
| 4 | 04 | 0000100 | EOT | End of transmission |
| 5 | 05 | 0000101 | ENQ | Enquiry |
| 6 | 06 | 0000110 | ACK | Acknowledge |
| 7 | 07 | 0000111 | BEL | Bell |
| 8 | 08 | 0001000 | BS | Backspace |
| 9 | 09 | 0001001 | HT | Horizontal tab |
| 10 | 0A | 0001010 | LF | Line feed |
| 11 | 0B | 0001011 | VT | Vertical tab |
| 12 | 0C | 0001100 | FF | Form feed |
| 13 | 0D | 0001101 | CR | Carriage return |
| 14 | 0E | 0001110 | SO | Shift out |
| 15 | 0F | 0001111 | SI | Shift in |
| 16 | 10 | 0010000 | DLE | Data link escape |
| 17 | 11 | 0010001 | DC1 | Device control 1 |
| 18 | 12 | 0010010 | DC2 | Device control 2 |
| 19 | 13 | 0010011 | DC3 | Device control 3 |
| 20 | 14 | 0010100 | DC4 | Device control 4 |
| 21 | 15 | 0010101 | NAK | Negative acknowledge |
| 22 | 16 | 0010110 | SYN | Synchronous idle |
| 23 | 17 | 0010111 | ETB | End of transmission block |
| 24 | 18 | 0011000 | CAN | Cancel |
| 25 | 19 | 0011001 | EM | End of medium |
| 26 | 1A | 0011010 | SUB | Substitute |
| 27 | 1B | 0011011 | ESC | Escape |
| 28 | 1C | 0011100 | FS | File separator |
| 29 | 1D | 0011101 | GS | Group separator |
| 30 | 1E | 0011110 | RS | Record separator |
| 31 | 1F | 0011111 | US | Unit separator |
| 32 | 20 | 0100000 | SP | Space |
| 33 | 21 | 0100001 | ! | Exclamation mark |
| 34 | 22 | 0100010 | " | Double quote |
| 35 | 23 | 0100011 | # | Number sign |
| 36 | 24 | 0100100 | $ | Dollar sign |
| 37 | 25 | 0100101 | % | Percent sign |
| 38 | 26 | 0100110 | & | Ampersand |
| 39 | 27 | 0100111 | ' | Apostrophe |
| 40 | 28 | 0101000 | ( | Left parenthesis |
| 41 | 29 | 0101001 | ) | Right parenthesis |
| 42 | 2A | 0101010 | * | Asterisk |
| 43 | 2B | 0101011 | + | Plus sign |
| 44 | 2C | 0101100 | , | Comma |
| 45 | 2D | 0101101 | - | Hyphen-minus |
| 46 | 2E | 0101110 | . | Period |
| 47 | 2F | 0101111 | / | Slash |
| 48 | 30 | 0110000 | 0 | Digit 0 |
| 49 | 31 | 0110001 | 1 | Digit 1 |
| 50 | 32 | 0110010 | 2 | Digit 2 |
| 51 | 33 | 0110011 | 3 | Digit 3 |
| 52 | 34 | 0110100 | 4 | Digit 4 |
| 53 | 35 | 0110101 | 5 | Digit 5 |
| 54 | 36 | 0110110 | 6 | Digit 6 |
| 55 | 37 | 0110111 | 7 | Digit 7 |
| 56 | 38 | 0111000 | 8 | Digit 8 |
| 57 | 39 | 0111001 | 9 | Digit 9 |
| 58 | 3A | 0111010 | : | Colon |
| 59 | 3B | 0111011 | ; | Semicolon |
| 60 | 3C | 0111100 | < | Less-than sign |
| 61 | 3D | 0111101 | = | Equals sign |
| 62 | 3E | 0111110 | > | Greater-than sign |
| 63 | 3F | 0111111 | ? | Question mark |
| 64 | 40 | 1000000 | @ | At sign |
| 65 | 41 | 1000001 | A | Uppercase letter A |
| 66 | 42 | 1000010 | B | Uppercase letter B |
| 67 | 43 | 1000011 | C | Uppercase letter C |
| 68 | 44 | 1000100 | D | Uppercase letter D |
| 69 | 45 | 1000101 | E | Uppercase letter E |
| 70 | 46 | 1000110 | F | Uppercase letter F |
| 71 | 47 | 1000111 | G | Uppercase letter G |
| 72 | 48 | 1001000 | H | Uppercase letter H |
| 73 | 49 | 1001001 | I | Uppercase letter I |
| 74 | 4A | 1001010 | J | Uppercase letter J |
| 75 | 4B | 1001011 | K | Uppercase letter K |
| 76 | 4C | 1001100 | L | Uppercase letter L |
| 77 | 4D | 1001101 | M | Uppercase letter M |
| 78 | 4E | 1001110 | N | Uppercase letter N |
| 79 | 4F | 1001111 | O | Uppercase letter O |
| 80 | 50 | 1010000 | P | Uppercase letter P |
| 81 | 51 | 1010001 | Q | Uppercase letter Q |
| 82 | 52 | 1010010 | R | Uppercase letter R |
| 83 | 53 | 1010011 | S | Uppercase letter S |
| 84 | 54 | 1010100 | T | Uppercase letter T |
| 85 | 55 | 1010101 | U | Uppercase letter U |
| 86 | 56 | 1010110 | V | Uppercase letter V |
| 87 | 57 | 1010111 | W | Uppercase letter W |
| 88 | 58 | 1011000 | X | Uppercase letter X |
| 89 | 59 | 1011001 | Y | Uppercase letter Y |
| 90 | 5A | 1011010 | Z | Uppercase letter Z |
| 91 | 5B | 1011011 | [ | Left square bracket |
| 92 | 5C | 1011100 | \ | Backslash |
| 93 | 5D | 1011101 | ] | Right square bracket |
| 94 | 5E | 1011110 | ^ | Caret |
| 95 | 5F | 1011111 | _ | Underscore |
| 96 | 60 | 1100000 | ` | Grave accent |
| 97 | 61 | 1100001 | a | Lowercase letter a |
| 98 | 62 | 1100010 | b | Lowercase letter b |
| 99 | 63 | 1100011 | c | Lowercase letter c |
| 100 | 64 | 1100100 | d | Lowercase letter d |
| 101 | 65 | 1100101 | e | Lowercase letter e |
| 102 | 66 | 1100110 | f | Lowercase letter f |
| 103 | 67 | 1100111 | g | Lowercase letter g |
| 104 | 68 | 1101000 | h | Lowercase letter h |
| 105 | 69 | 1101001 | i | Lowercase letter i |
| 106 | 6A | 1101010 | j | Lowercase letter j |
| 107 | 6B | 1101011 | k | Lowercase letter k |
| 108 | 6C | 1101100 | l | Lowercase letter l |
| 109 | 6D | 1101101 | m | Lowercase letter m |
| 110 | 6E | 1101110 | n | Lowercase letter n |
| 111 | 6F | 1101111 | o | Lowercase letter o |
| 112 | 70 | 1110000 | p | Lowercase letter p |
| 113 | 71 | 1110001 | q | Lowercase letter q |
| 114 | 72 | 1110010 | r | Lowercase letter r |
| 115 | 73 | 1110011 | s | Lowercase letter s |
| 116 | 74 | 1110100 | t | Lowercase letter t |
| 117 | 75 | 1110101 | u | Lowercase letter u |
| 118 | 76 | 1110110 | v | Lowercase letter v |
| 119 | 77 | 1110111 | w | Lowercase letter w |
| 120 | 78 | 1111000 | x | Lowercase letter x |
| 121 | 79 | 1111001 | y | Lowercase letter y |
| 122 | 7A | 1111010 | z | Lowercase letter z |
| 123 | 7B | 1111011 | { | Left brace |
| 124 | 7C | 1111100 | | | Vertical bar |
| 125 | 7D | 1111101 | } | Right brace |
| 126 | 7E | 1111110 | ~ | Tilde |
| 127 | 7F | 1111111 | DEL | Delete |
How to Read the ASCII Table
Every row represents one code point written in several forms:
- Decimal is the familiar base-10 number, from 0 through 127.
- Hex is the base-16 form, written with digits 0-9 and letters A-F.
- Binary is the 7-bit base-2 form, padded with leading zeros in this ASCII chart.
- Character shows a printable character or the accepted abbreviation for a control code.
- Description explains the symbol or control function.
Consider the row for uppercase A in the ASCII table. Decimal 65 converts to hexadecimal 41 and binary 1000001. Those three values do not identify different characters; they are different numerical notations for the same ASCII character. In an 8-bit byte, software commonly stores the same binary value as 01000001, adding one leading zero without changing the value.
If you want to verify a conversion outside the table, enter 65 in the decimal to binary converter. You can also enter 1000001 in the binary to decimal converter to recover 65.
What Standard ASCII Contains
ASCII stands for American Standard Code for Information Interchange. Standard ASCII assigns 128 codes because seven binary digits provide exactly 2^7 = 128 patterns. Its range is therefore decimal 0-127, hexadecimal 00-7F, or binary 0000000-1111111.
The range has two main parts:
| Range | Hex range | Purpose |
|---|---|---|
| 0-31 | 00-1F | Control characters |
| 32-126 | 20-7E | Printable characters |
| 127 | 7F | Delete control character |
The printable section contains the English alphabet in uppercase and lowercase, ten digits, a space, and common punctuation. It does not contain accented letters, emoji, Chinese characters, or most writing systems. Modern text uses Unicode encodings such as UTF-8 for that broader character set, while retaining the first 128 values in the same positions as ASCII.
ASCII Control Characters
Codes 0-31 and 127 do not normally draw a visible glyph. They were designed to control terminals, printers, data links, and the structure of transmitted records. Some are mostly historical, but several still affect everyday files and protocols.
Common control characters include:
- NUL (0) represents a null value. C-style strings traditionally use it as an end marker.
- BEL (7) originally triggered an audible terminal bell and can still represent an alert.
- BS (8) is backspace.
- HT (9) is the horizontal tab, commonly written as
\tin source code. - LF (10) is line feed, commonly written as
\n. - CR (13) is carriage return, commonly written as
\r. - ESC (27) begins escape sequences in terminals and communication formats.
- DEL (127) is the delete control character.
Line endings are the control-code detail developers encounter most often. Unix and modern macOS text files generally separate lines with LF. Windows commonly uses the two-code sequence CR followed by LF. Older classic Mac systems used CR alone. A file can look correct in one editor but produce extra blank lines or a single long line elsewhere when these conventions are interpreted incorrectly.
Control abbreviations in the ASCII table are display labels, not literal multi-letter file content. The table entry LF, for instance, identifies one code with decimal value 10. A text file does not need to contain the two printable letters L and F to create a line feed.
Printable ASCII Characters
Printable ASCII begins with space at decimal 32 and ends with tilde at decimal 126. The ordering is intentional enough to make several conversions and validation rules easy.
Digits 0 through 9
The ASCII digits occupy one continuous range from decimal 48 to 57, or hexadecimal 30-39.
| Character | Decimal | Hex | Binary |
|---|---|---|---|
0 | 48 | 30 | 0110000 |
1 | 49 | 31 | 0110001 |
5 | 53 | 35 | 0110101 |
9 | 57 | 39 | 0111001 |
The character '5' and the numeric value 5 are not the same stored value. The ASCII character '5' has code 53. Software that reads numeric text must interpret the character and convert it to a mathematical number before arithmetic. For an ASCII digit, subtracting the code for '0' from its code yields the represented number: 53 - 48 = 5.
Uppercase Letters A through Z
Uppercase letters occupy decimal 65-90, hexadecimal 41-5A. Because the range is continuous, the next letter always has a code one greater than the previous letter. A is 65, B is 66, and Z is 90.
This sequence makes alphabet indexing straightforward. If A is position zero, subtract 65 from an uppercase letter's ASCII code. The code for D is 68, so 68 - 65 = 3.
Lowercase Letters a through z
Lowercase letters occupy decimal 97-122, hexadecimal 61-7A. Each lowercase English letter is exactly 32 decimal positions after its uppercase counterpart:
A = 65 = 0x41 = 1000001
a = 97 = 0x61 = 1100001
Difference = 32 = 0x20That layout explains why older low-level code sometimes changed ASCII letter case by manipulating the bit with value 32. Production software should normally use language-aware case-conversion functions, because that shortcut applies only to the ASCII English alphabet and does not handle Unicode text correctly.
Punctuation and Symbols
Punctuation fills the gaps around the digit and letter blocks. Space is 32, exclamation mark is 33, and slash is 47. The symbols from colon through at sign use codes 58-64. Square brackets, backslash, caret, underscore, and grave accent appear at 91-96. Braces, vertical bar, and tilde close the printable range at 123-126.
These positions matter in source code, URLs, data formats, and network protocols. A space is often transformed because literal spaces are inconvenient in some formats; knowing that its ASCII hexadecimal value is 20 explains the familiar URL encoding %20.
Converting an ASCII Code Between Bases
The ASCII table is a lookup reference, but the values also follow ordinary base conversion rules. Reading an ASCII table becomes easier when you can move between those bases. To express decimal 65 in binary, decompose it into powers of two:
65 = 64 + 1
= 2^6 + 2^0
= 1000001 in binaryTo express the same value in hexadecimal, divide the binary digits into four-bit groups from the right. Pad the left group when necessary:
Binary: 0100 0001
Hex: 4 1
Result: 0x41Hexadecimal is common in debugging because one hex digit maps exactly to four bits. Binary reveals the bit pattern directly, while decimal is often easier for human arithmetic. The binary table gives a broader number chart across binary, decimal, octal, and hexadecimal; this ASCII chart adds the character meaning assigned to each value.
ASCII Text as a Sequence of Numbers
A string is represented by a sequence of character codes. In standard ASCII, the word CAT becomes:
| Character | Decimal | Hex | 8-bit display |
|---|---|---|---|
C | 67 | 43 | 01000011 |
A | 65 | 41 | 01000001 |
T | 84 | 54 | 01010100 |
The resulting hex sequence is 43 41 54, and the byte-form binary sequence is 01000011 01000001 01010100. Character boundaries matter. Treating the entire bit sequence as one large integer loses the fact that the data represents three characters.
ASCII itself defines character values, not the visual font, color, or layout. A renderer chooses how C, A, and T look. Formatting formats then add rules for paragraphs, styles, images, and other structure.
ASCII, Extended ASCII, Unicode, and UTF-8
Standard ASCII has one unambiguous 0-127 table. The phrase extended ASCII is less precise. It often refers to one of several incompatible 8-bit code pages that reuse values 0-127 for ASCII and assign regional characters or drawing symbols to 128-255. A byte above 127 cannot be decoded reliably unless you know which code page was used.
Unicode solves the broader assignment problem by giving characters code points across many scripts and symbol sets. UTF-8 is an encoding that turns those code points into bytes. UTF-8 deliberately represents Unicode code points 0-127 as the same single-byte values used by ASCII. Therefore every valid ASCII file is also valid UTF-8, but a UTF-8 file containing non-ASCII characters is not an ASCII-only file.
Do not assume one character always equals one byte. That is true for ASCII characters in UTF-8, but many other Unicode characters require two, three, or four bytes. It is also possible for what a reader perceives as one displayed symbol to contain multiple Unicode code points.
Practical Uses for an ASCII Code Table
An ASCII table remains useful even in Unicode-based systems:
- Inspecting text and protocol bytes in a hex dump.
- Checking escape characters, delimiters, and line endings.
- Validating whether input is restricted to basic ASCII.
- Converting character literals to numbers in programming exercises.
- Understanding URL encoding and other percent-encoded data.
- Reading legacy file formats and serial communication logs.
- Debugging differences between a numeric digit and its text representation.
When inspecting an unknown file, first decide whether the values represent text, raw numbers, or another binary structure. The same byte 41 can mean decimal 65, the ASCII letter A, part of an image, or one field in a machine instruction. The surrounding format determines the interpretation.
Common ASCII Table Mistakes
The first common mistake is calling every 8-bit code page ASCII. Standard ASCII stops at 127. Values 128-255 require an explicitly named encoding.
The second is confusing a digit with its value. ASCII '0' is decimal 48, not zero. The third is omitting the number base: 41 means forty-one in decimal but represents sixty-five when read as hexadecimal 0x41. Prefixes such as 0x for hex and 0b for binary remove ambiguity.
Finally, leading zeros do not change a mathematical value. The table uses seven bits because ASCII is a 7-bit standard. Byte-oriented displays usually show eight bits, so 1000001 and 01000001 identify the same code.
Frequently Asked Questions
Is ASCII 7-bit or 8-bit?
Standard ASCII is 7-bit and contains 128 codes, numbered 0-127. Computers usually store an ASCII character in an 8-bit byte with the highest bit set to zero. Various 8-bit extensions exist, but they are separate code pages rather than one universal extended ASCII standard.
What is ASCII code 32?
Decimal 32, hexadecimal 20, is the space character. It is printable in the sense that it creates spacing, although it has no visible ink shape.
What is ASCII code 65?
Decimal 65 is uppercase A. Its hexadecimal value is 41, its 7-bit binary value is 1000001, and its common 8-bit display is 01000001.
What is ASCII code 97?
Decimal 97 is lowercase a. Its hexadecimal value is 61 and its binary value is 1100001.
What are the ASCII codes for a new line?
LF is decimal 10 and CR is decimal 13. Unix-style text uses LF, while Windows-style text generally uses CR followed by LF. The application and file format determine which sequence is expected.
Is ASCII the same as Unicode?
No. ASCII is a 128-character set. Unicode covers a much larger collection of writing systems and symbols. Unicode encodings such as UTF-8 preserve ASCII's values for the first 128 code points, which provides compatibility without making the two standards identical.
Quick ASCII Reference
Remember the key boundaries: controls begin at 0, space is 32, digits are 48-57, uppercase letters are 65-90, lowercase letters are 97-122, tilde is 126, and delete is 127. Keep this ASCII table available whenever you need the exact decimal, hexadecimal, or binary form of a character, and use the conversion tools when you need to show the arithmetic behind a value.
