How to use the ascii table
- Scroll the table to see all 128 ASCII characters, or type in Find a character to narrow it down.
- Search by decimal code (65), by hex code (0x41), by a single character (A) or by part of a name such as space, tab or bracket.
- Tick Printable characters only to hide the control codes and DEL.
- Press Copy the table as text to copy the rows that are showing, separated by tabs so they paste cleanly into a spreadsheet.
What ASCII is
ASCII is a 7 bit code that gives a number from 0 to 127 to each of 128 characters. The 1969 specification RFC 20 describes the same character set for network use. Almost every modern text encoding, including UTF-8, uses these same numbers for these same characters, so the table is useful far beyond old systems.
The 128 codes fall into groups. Codes 0 to 31 and 127 are control codes, which were made for teletype machines and still matter in text files and programs. Code 32 is the space. Codes 48 to 57 are the digits, 65 to 90 the capital letters, 97 to 122 the small letters, and the rest are punctuation and symbols.
Patterns worth knowing
A small letter is its capital plus 32, so A is 65 and a is 97. In binary that is one bit: the capitals start with 010 and the small letters with 011. A digit character is its value plus 48, so 0 is 48 and 9 is 57. This is why code can turn the character 7 into the number 7 by subtracting 48.
Line endings use control codes. LF (10) is a line feed and CR (13) is a carriage return. Unix style files end lines with LF, and Windows style files use CR followed by LF. HT (9) is the tab character. DEL (127) is the only control code outside the first 32.
Beyond 127
ASCII stops at 127. Codes from 128 to 255 are not part of ASCII, and what they mean depends on the encoding, such as Windows-1252, ISO 8859-1 or the multi-byte forms in UTF-8. To turn text into the byte values for any characters, including accents and emoji, use the binary translator, and to move numbers between decimal, hex and binary use the number base converter. For symbols you can copy straight into a document, see copy and paste symbols.
Assumptions and limits
- The table lists the 128 characters of US-ASCII. Extended or national code pages are not shown.
- Control characters are shown by their usual abbreviation, such as NUL, LF and ESC, because they have no visible form.
- Names are plain English descriptions. Older documents may name some characters differently.
- Hex values are shown in capital letters and octal in three digits.
Frequently asked questions
What is the ASCII code for A and a?
A is 65 (hex 41, binary 01000001) and a is 97 (hex 61, binary 01100001). The small letter is always the capital plus 32.
How many characters are in ASCII?
There are 128: 33 control codes (0 to 31 and 127), the space, and 94 visible characters made of letters, digits and punctuation.
What is the difference between ASCII and Unicode?
ASCII has 128 characters. Unicode has far more and covers most of the world's writing systems. UTF-8, the common way to store Unicode, keeps the first 128 codes identical to ASCII so old ASCII text is also valid UTF-8.
What are control characters used for?
They tell a device or program to do something rather than show a symbol, such as start a new line (LF), move to a tab stop (HT), ring a bell (BEL) or mark the end of a transmission (EOT).