ASCII Character lookup table
A complete ASCII character query comparison tool. Covers all codes from 0-255, supports real-time search of Decimal, Hex, Binary, and Unicode, and has built-in text converter, favorites, and recent query functions.
No matching characters
What is ASCII?
ASCII (American Standard Code for Information Interchange, American Standard Code for Information Interchange) is the most basic character encoding standard in computer systems. It uses 7 bits to represent 128 characters, including English letters (A-Z, a-z), numbers (0-9), punctuation marks and control characters.
The ASCII encoding was first released in 1963 and was originally designed for telegraph communications. Because of its simplicity and universality, it is still the basis for all modern text encoding systems (such as Unicode, UTF-8).
Key points: ASCII only uses 7 bits (0–127) because early communication lines could only transmit 7 bits of data at a time, and the 8th bit was usually used for parity.
Differences between ASCII and Unicode
| Compare items | ASCII | Unicode |
|---|---|---|
| number of bits | 7 bits | Variable (UTF-8, UTF-16, UTF-32) |
| Number of characters | 128 (basic) | More than 149,000 |
| Language support | English only | All languages around the world + emojis |
| Compatibility | — | Forward compatible ASCII (UTF-8) |
| Release year | 1963 | 1991 |
| Application scenarios | Old system, embedded, pure English | Web, modern apps, multilingual |
LF, CR, CRLF difference
All three are "line feed" symbols, but different operating systems use different conventions:
| symbol | numerical value | Use the system | Description |
|---|---|---|---|
| LF | 10 (0x0A) | Linux / macOS | Line Feed, the cursor moves down one line |
| CR | 13 (0x0D) | Classic Mac (OS 9) | Carriage Return, the cursor returns to the beginning of the line |
| CRLF | 13 10 (0x0D 0x0A) | Windows | Carriage return + line feed, combination of the two |
Git can be found in .gitattributes Set the automatic conversion of line breaks between different platforms.
Why does ASCII only have 128 characters?
ASCII uses a 7-bit encoding, 2⁷ = 128, so it can only represent up to 128 characters. Here’s why:
- Historical restrictions: Communications equipment in the 1960s used 7-bit transmission, with the 8th bit reserved as a parity bit for basic error detection.
- Cost considerations: At that time, memory and storage space were extremely expensive, and 7 bits was enough to cover all English letters, numbers, and basic symbols.
- Design goals: ASCII is designed for English only and does not need to accommodate characters from other languages.
Later, in order to solve the problem of insufficient 128 characters, Extended ASCII (Extended ASCII, 128–255) and the final Unicode standard appeared.
ASCII FAQ
What is Extended ASCII?
What is the relationship between ASCII and UTF-8?
How to query the ASCII value of a character?
1. Programming language:
'A'.charCodeAt(0)(JavaScript) or ord('A')(Python)2. Enter text directly in the "ASCII Converter" of this tool to see the corresponding decimal value.
3. Enter characters in the search box of this tool to find all corresponding encoding information
What are the control characters in ASCII used for?
- NUL (0): String terminator in C language
- BEL (7): The terminal beeps
- BS (8): Backspace key
- TAB (9):Tab character (indentation)
- LF (10):Unix/Linux newline
- CR (13): Enter
- ESC (27): Escape key, commonly used in terminal control sequences
- DEL (127): Delete key
These characters are still active in areas such as network protocols, serial communications, and printer control.
What is a Code Page?
- CP437: IBM PC native code page (contains frame-drawing characters)
- Windows-1252: Western European (replaces ISO-8859-1)
- CP850: Latin-1 (for DOS)
Before Unicode became popular, Code Page was the only way to handle multiple languages.
What is the NUL character (0x00)?
Why is 'A' 65? Isn't this decided casually?
- Number (0–9): Encoding 48–57 (0x30–0x39), convenient programs can quickly convert to numerical values by subtracting 48
- Uppercase letters (A–Z): Encoding 65–90 (0x41–0x5A)
- Lowercase letters (a–z): Encoding 97–122 (0x61–0x7A)
There is a fixed difference of 32 (0x20) between uppercase and lowercase letters, which makes uppercase and lowercase conversion only require bit operations: lowercase = uppercase | 0x20, uppercase = lowercase & ~0x20. This design was critical in the early days of extremely limited memory and CPU resources.