ASCII Table | Character Encoding Reference
Complete ASCII character set, containing 128 standard characters (0-127). Includes control characters, digits, English letters, and common symbols, providing decimal, hexadecimal, octal, HTML entity, and Unicode encoding. Click any character to view detailed information and copy with one click.
📋 About the ASCII Table
A collection of 128 standard ASCII characters, covering control characters, digits, English letters, and common symbols, with multi-base references and encoding details
ASCII (American Standard Code for Information Interchange) is the most fundamental character encoding standard in modern computer systems. It defines 128 characters, numbered from 0 to 127, including 33 control characters and 95 printable characters. The ASCII table is the cornerstone of all advanced encodings (such as UTF-8, ISO-8859) and holds an irreplaceable position in programming, data communication, text processing, and other fields. This page fully lists all standard ASCII characters, providing decimal, hexadecimal, octal, binary, HTML entity number, and Unicode code point information for each character, making it easy for developers to quickly reference and use.
🔢 Control Characters (0-31 and 127)
NUL (Null Character) is called the null character, with a decimal value of 0, hexadecimal of 0x00, octal of 000, and binary of 00000000. It is the most basic control character, commonly used in programming languages like C as a string terminator, indicating the end of a string. Its Unicode encoding is U+0000, and its HTML entity is �. In actual display, NUL is an invisible character and usually shows nothing in terminals or editors.
SOH (Start of Heading) is called start of heading, with a decimal value of 1, hexadecimal of 0x01, octal of 001, and binary of 00000001. It is used in communication protocols to identify the beginning of a message header. Its Unicode encoding is U+0001, and its HTML entity is . It is rarely used directly in modern applications but still exists in some low-level protocols.
BEL (Bell) is called the bell character, with a decimal value of 7, hexadecimal of 0x07, octal of 007, and binary of 00000111. When a terminal or printer receives this character, it triggers a beep or sound alert. Its Unicode encoding is U+0007, and its HTML entity is . In early computer terminals, BEL was used to alert users, but this function has largely been replaced by graphical notifications in modern systems.
BS (Backspace) is called the backspace character, with a decimal value of 8, hexadecimal of 0x08, octal of 010, and binary of 00001000. It moves the cursor one position to the left and is commonly used to delete the previous character. Its Unicode encoding is U+0008, and its HTML entity is . On keyboards, the Backspace key typically maps to this character.
TAB (Horizontal Tab) is called the horizontal tab character, with a decimal value of 9, hexadecimal of 0x09, octal of 011, and binary of 00001001. It is used to align columns in text, typically moving the cursor to the next tab stop. Its Unicode encoding is U+0009, and its HTML entity is 	. In programming, \t represents the tab character, but coding standards often recommend using spaces instead.
LF (Line Feed) is called the line feed character, with a decimal value of 10, hexadecimal of 0x0A, octal of 012, and binary of 00001010. It moves the cursor to the next line and is the standard line ending character in Unix/Linux systems (including macOS). Its Unicode encoding is U+000A, and its HTML entity is . Note that Windows systems use the CR+LF combination (\r\n) as the line ending, while older Mac systems used a standalone CR.
CR (Carriage Return) is called the carriage return character, with a decimal value of 13, hexadecimal of 0x0D, octal of 015, and binary of 00001101. It moves the cursor to the beginning of the current line without advancing to the next line. Its Unicode encoding is U+000D, and its HTML entity is . In the typewriter era, carriage return and line feed were two independent operations, a design that carried over into computer systems.
ESC (Escape) is called the escape character, with a decimal value of 27, hexadecimal of 0x1B, octal of 033, and binary of 00011011. It is used to introduce control sequences, such as ANSI escape codes for setting terminal text colors and styles. Its Unicode encoding is U+001B, and its HTML entity is . In programming, ESC is often used to represent special keys or control commands.
DEL (Delete) is called the delete character, with a decimal value of 127, hexadecimal of 0x7F, octal of 177, and binary of 01111111. Historically used to erase characters on paper tape by punching all holes (setting all bits to 1). Its Unicode encoding is U+007F, and its HTML entity is . On modern keyboards, the Delete key's function is related to but not exactly the same as the DEL character.
🔤 Printable Characters (32-126)
SP (Space) is called the space character, with a decimal value of 32, hexadecimal of 0x20, octal of 040, and binary of 00100000. It is the most commonly used separator, creating whitespace between words. Its Unicode encoding is U+0020, and its HTML entity is  . In HTML, multiple consecutive spaces are collapsed into one by default, requiring the use of or other methods to preserve them.
! (Exclamation Mark) is called the exclamation mark, with a decimal value of 33, hexadecimal of 0x21, octal of 041, and binary of 00100001. Commonly used to express emphasis or logical NOT operation. Its Unicode encoding is U+0021, and its HTML entity is !. In programming, ! typically represents the logical negation operation.
" (Double Quote) is called the double quote, with a decimal value of 34, hexadecimal of 0x22, octal of 042, and binary of 00100010. Used to enclose string constants. Its Unicode encoding is U+0022, and its HTML entities are " or ". In HTML attributes, " must be used to avoid conflicts.
Digits 0-9 range from decimal 48 (character '0') to 57 (character '9'), with hexadecimal values from 0x30 to 0x39. For example, the character '0' is called digit zero, with a decimal value of 48, binary of 00110000, Unicode encoding of U+0030, and HTML entity of 0. The character '5' is called digit five, with a decimal value of 53, and binary of 00110101. The encoding of digit characters is continuous, a property often used in programming for character-to-number conversion.
Uppercase Letters A-Z range from decimal 65 (character 'A') to 90 (character 'Z'), with hexadecimal values from 0x41 to 0x5A. For example, the character 'A' is called uppercase A, with a decimal value of 65, binary of 01000001, Unicode encoding of U+0041, and HTML entity of A. Uppercase letters have continuous encoding and differ from their corresponding lowercase letters by exactly 32, a pattern often used for case conversion.
Lowercase Letters a-z range from decimal 97 (character 'a') to 122 (character 'z'), with hexadecimal values from 0x61 to 0x7A. For example, the character 'a' is called lowercase a, with a decimal value of 97, binary of 01100001, Unicode encoding of U+0061, and HTML entity of a. By adding or subtracting 32, you can convert between uppercase and lowercase letters, a clever design of ASCII encoding.
Common Punctuation Marks such as comma (,) with decimal 44, hexadecimal 0x2C, binary 00101100, called comma; period (.) with decimal 46, hexadecimal 0x2E, binary 00101110, called period or dot; semicolon (;) with decimal 59, hexadecimal 0x3B, binary 00111011, called semicolon. All printable punctuation marks have corresponding HTML entity numbers and can be directly used in web page display.
Special Symbols include the at sign (@) with decimal 64, hexadecimal 0x40, binary 01000000, commonly used in email addresses and social media usernames; left square bracket ([) with decimal 91, hexadecimal 0x5B, binary 01011011, used in programming for array indexing; backslash (\) with decimal 92, hexadecimal 0x5C, binary 01011100, used in Windows paths and escape sequences; tilde (~) with decimal 126, hexadecimal 0x7E, binary 01111110, commonly used to indicate approximation or user home directory.
⚙️ ASCII Encoding Usage Notes
First, ASCII encoding defines characters 0-31 and 127 as control characters. These characters are non-printable and require entity numbers (such as ) to display in HTML. Second, ASCII only defines 128 characters and does not include any non-English characters, so processing Chinese, Japanese, etc., requires Unicode or extended encodings. Third, although standard ASCII is only 7 bits, it typically occupies one byte (8 bits) in actual storage, with the highest bit set to 0. Fourth, extended ASCII (128-255) is defined differently across various systems and is not a unified standard. Fifth, in programming, conversion between characters and ASCII codes can be achieved through built-in functions, such as Python's ord() and chr() functions. Sixth, the information on this page is suitable for programming learning, data communication debugging, encoding conversion reference, and teaching demonstration scenarios.
💡 Usage Tips
Click any ASCII character card to pop up a detail panel. In the panel, you can copy the character's decimal value, hexadecimal value, octal value, binary value, HTML entity number, Unicode encoding, and the character itself with one click. If you need to use ASCII control characters in programming, it is recommended to use escape sequences (such as \n for line feed, \t for tab). For web development, you can directly use the character itself or HTML entities, provided the page encoding is set to UTF-8. Mastering the ASCII table is essential for understanding the underlying character processing mechanisms of computers. This page provides developers with a fast and accurate reference.
❓ ASCII FAQ · Encoding / Number Systems / Input
Quickly master ASCII character encoding queries, number system conversion, and input methods
ord('A') to return 65; in JavaScript, use 'A'.charCodeAt(0). Click any character card on this page to view all encoding information. \n (decimal 10), carriage return \r (decimal 13), tab \t (decimal 9), null character \0 (decimal 0). represents line feed, represents carriage return. However, most control characters are invisible in browsers and typically require special methods for display.