Interactive ASCII Table
Complete ASCII reference: decimal, hex, octal, binary, and character. Click any row to copy. Search or convert instantly.
| Char | Dec | Hex | Oct | Bin | Name / Description |
|---|
About ASCII
ASCII (American Standard Code for Information Interchange) is a character encoding standard first published in 1963 by the American National Standards Institute. It uses 7 bits to represent 128 characters: 33 non-printable control characters (0–31 and 127) and 95 printable characters (32–126). Despite being over 60 years old, ASCII remains foundational to modern computing — all Unicode code points from 0 to 127 are identical to their ASCII values, and UTF-8 encodes these characters as single bytes with the same byte values.
Control Characters (0–31)
The first 32 characters (decimal 0–31) are non-printable control characters inherited from the era of teletype machines and early computer peripherals. Many are obsolete, but several remain essential in modern computing: TAB (9) for horizontal tabulation, LF/Line Feed (10) for Unix-style line endings, CR/Carriage Return (13) for Windows line endings (CRLF = 13+10), ESC (27) for terminal escape sequences, and DEL (127) for the Delete key. NUL (0) is used as a string terminator in C. BEL (7) originally rang a physical bell on a teletype terminal and still triggers a system sound on some terminals.
Printable Characters (32–126)
The 95 printable characters form the core of English-language computing: Space (32), digits 0–9 (48–57), uppercase A–Z (65–90), lowercase a–z (97–122), and 32 punctuation and special characters. The consistent layout has important implications: subtracting 32 from an uppercase letter gives the lowercase equivalent (A=65, a=97, 65+32=97). The digits 0–9 start at 48, so subtracting 48 from the ASCII value of a digit gives its numeric value. This arithmetic is exploited heavily in low-level programming and text processing.
Extended ASCII (128–255)
While standard ASCII defines 128 characters (0–127), 8-bit systems needed to represent more characters and extended the table to 256 values. Unfortunately, there was no single standard for the upper half. ISO 8859-1 (Latin-1) covers Western European languages. Windows-1252 is similar to Latin-1 but uses some codepoints differently. CP437 (used in DOS and early IBM PCs) contains box-drawing characters, Greek letters, and mathematical symbols in the 128–255 range. The extended ASCII section in this tool shows the Latin-1/Windows-1252 values, which are the most commonly encountered in web contexts.
ASCII in Programming
ASCII values appear throughout programming. In C and C++, character literals like 'A' are integers with ASCII values, enabling arithmetic comparisons: if (c >= 'a' && c <= 'z') checks for lowercase letters. In Python, ord('A') returns 65 and chr(65) returns 'A'. In JavaScript, 'A'.charCodeAt(0) returns 65 and String.fromCharCode(65) returns 'A'. Regular expressions use ASCII ranges extensively: [A-Z] matches uppercase letters because they occupy a contiguous range (65–90) in ASCII.
Common ASCII Values to Memorize
Several ASCII values are worth memorising for efficient programming: NUL=0 (string terminator), TAB=9, LF=10 (Unix newline), CR=13 (Windows newline component), Space=32, '0'=48 (digits start), 'A'=65 (uppercase letters start), 'a'=97 (lowercase letters start, exactly 32 more than uppercase), DEL=127. The difference of 32 between uppercase and lowercase corresponds to the bit position 5 (0x20), so toggling bit 5 of an ASCII letter switches case — a classic low-level optimization still used in performance-critical code.