ASCII Table: Complete ASCII Reference Guide

The complete data-driven reference — every character, control code, and extended mapping with practical programming examples

ReferenceApril 13, 202610 min read

ASCII (American Standard Code for Information Interchange) is the bedrock of digital text. Published in 1963 and finalized as ANSI X3.4 in 1968, this 7-bit encoding standard defines 128 characters that form the foundation of virtually every modern text encoding system. Whether you're a seasoned developer debugging character encoding issues or a student learning computer science fundamentals, this guide provides every ASCII value you'll ever need in one comprehensive reference.

ASCII Control Characters (Decimal 0–31)

The first 32 positions in the ASCII table (0–31) are reserved for control characters — non-printable codes originally designed to control teletype machines and early computer terminals. While most are invisible, they remain critically important in modern computing for text formatting, network protocols, and terminal control.

DecHexCharNameModern Use
000NULNullString terminator in C
101SOHStart of HeadingUnused today
202STXStart of TextUnused today
303ETXEnd of TextEnd-of-transmission in serial
404EOTEnd of TransmissionUnix EOF marker (Ctrl+D)
505ENQEnquiryUnused today
606ACKAcknowledgeSerial protocols
707BELBellTerminal alert sound
808BSBackspaceText editing (Ctrl+H)
909HTHorizontal TabTab formatting, \t escape
100ALFLine FeedUnix newline (\n)
110BVTVertical TabRare formatting
120CFFForm FeedPage break (\f)
130DCRCarriage ReturnWindows newline (\r)
140ESOShift OutUnused today
150FSIShift InUnused today
1610DLEData Link EscapeSerial protocols
1711DC1Device Control 1XON flow control (Ctrl+Q)
1812DC2Device Control 2Unused today
1913DC3Device Control 3XOFF flow control (Ctrl+S)
2014DC4Device Control 4Unused today
2115NAKNegative AckSerial protocols
2216SYNSynchronous IdleUnused today
2317ETBEnd Trans. BlockUnused today
2418CANCancelCancel operation
2519EMEnd of MediumUnused today
261ASUBSubstituteWindows EOF marker (Ctrl+Z)
271BESCEscapeANSI escape sequences
281CFSFile SeparatorData delimiting
291DGSGroup SeparatorData delimiting
301ERSRecord SeparatorData delimiting
311FUSUnit SeparatorData delimiting
1277FDELDeleteBackspace character

The most commonly used control characters today are LF (10) for Unix line endings, CR+LF (13+10) for Windows line endings, TAB (9) for indentation, NUL (0) as a C string terminator, and ESC (27) for terminal color codes and control sequences.

ASCII Printable Characters (Decimal 32–126)

Characters 32 through 126 are the printable ASCII characters — the visible symbols you type on a keyboard every day. This range includes the space character, punctuation marks, digits, uppercase and lowercase letters, and common symbols.

Punctuation and Symbols (32–47)

DecHexCharDescription
3220(space)Space character
3321!Exclamation mark
3422"Double quotation mark
3523#Number sign (hash)
3624$Dollar sign
3725%Percent sign
3826&Ampersand
3927'Apostrophe (single quote)
4028(Left parenthesis
4129)Right parenthesis
422A*Asterisk
432B+Plus sign
442C,Comma
452D-Hyphen-minus
462E.Period (full stop)
472F/Forward slash

Digits (48–57)

DecHexChar
48300
49311
50322
51333
52344
53355
54366
55377
56388
57399

Note the useful property: ASCII digit values are sequential, so converting a character digit to its numeric value is simply char - '0' (or char - 48).

Uppercase Letters (65–90)

DecHexCharDecHexCharDecHexChar
6541A744AJ8353S
6642B754BK8454T
6743C764CL8555U
6844D774DM8656V
6945E784EN8757W
7046F794FO8858X
7147G8050P8959Y
7248H8151Q905AZ
7349I8252R

Key property: the difference between uppercase and lowercase is exactly 32. So 'a' - 'A' = 32. To convert case, XOR with 32 or add/subtract 32.

Lowercase Letters (97–122)

DecHexCharDecHexCharDecHexChar
9761a1066Aj11573s
9862b1076Bk11674t
9963c1086Cl11775u
10064d1096Dm11876v
10165e1106En11977w
10266f1116Fo12078x
10367g11270p12179y
10468h11371q1227Az
10569i11472r

Extended ASCII (Decimal 128–255)

Standard ASCII only uses 7 bits (0–127). The 8th bit was originally reserved as a parity bit for error checking in serial communication. When 8-bit computing became common, the upper 128 values (128–255) were repurposed to add additional characters.

There is no single "extended ASCII" standard. Several competing encodings emerged:

For a complete interactive reference with all extended characters, use RiseTop's ASCII Table Tool.

ASCII in Programming: Practical Examples

Understanding ASCII values unlocks powerful text manipulation techniques:

// Case conversion using ASCII math
function toLower(ch) {
    return ch >= 65 && ch <= 90 ? ch + 32 : ch;
}
function toUpper(ch) {
    return ch >= 97 && ch <= 122 ? ch - 32 : ch;
}
// Check if character is a digit
function isDigit(ch) { return ch >= 48 && ch <= 57; }
// Check if character is alphanumeric
function isAlpha(ch) {
    return (ch >= 65 && ch <= 90) || (ch >= 97 && ch <= 122);
}

These operations are O(1) and avoid the overhead of regular expressions or library function calls, making them valuable in performance-critical code paths like parsers and tokenizers.

Key ASCII Properties Every Developer Should Know

Frequently Asked Questions

What is ASCII and how many characters does it define?

ASCII (American Standard Code for Information Interchange) defines 128 characters numbered 0-127. It includes 32 control characters (0-31 plus 127), 95 printable characters (32-126), and the DEL control character at position 127.

What is the difference between ASCII and extended ASCII?

Standard ASCII defines 128 characters (0-127). Extended ASCII refers to various 8-bit encodings that add 128 more characters (128-255) for additional symbols and accented letters. However, there is no single 'extended ASCII' standard — different systems use different extensions like ISO-8859-1, Windows-1252, or Code Page 437.

What are ASCII control characters?

ASCII control characters are non-printable codes (0-31 and 127) originally designed for teletype and terminal control. They include NUL (null), BEL (bell/beep), BS (backspace), LF (line feed), CR (carriage return), ESC (escape), and DEL (delete). Many are still used in modern computing for text formatting and terminal control.

Why is ASCII still relevant today?

ASCII remains the foundation of modern text encoding. UTF-8 is backward compatible with ASCII, meaning every ASCII file is a valid UTF-8 file. ASCII characters are used in programming syntax, URLs, email protocols (SMTP), network protocols, and file formats. Understanding ASCII is essential for any developer working with text processing.

How do I get the ASCII value of a character in programming?

In most languages, you can get the ASCII value by casting a character to an integer: Python uses ord('A') returning 65, JavaScript uses 'A'.charCodeAt(0) returning 65, Java uses (int)'A' returning 65, C uses (int)'A' returning 65. The reverse operation — converting an ASCII code to a character — uses chr() in Python and String.fromCharCode() in JavaScript.