ASCII Lookup
Search by character, decimal code, hexadecimal (0x41), or binary (01000001).
A • 65 • 0x41 • 01000001 • space • newline
ASCII Table (0–127)
| Dec | Hex | Binary | Char | Description |
|---|
Control characters (0–31, 127) are non-printable. Printable characters (32–126) display directly.
What is ASCII?
ASCII (American Standard Code for Information Interchange) is a character encoding standard that assigns numeric codes to letters, digits, punctuation marks, and control characters. First published in 1963, ASCII uses 7 bits to represent 128 characters (codes 0–127).
ASCII forms the foundation of modern text encoding. UTF-8, the dominant encoding on the web, is backwards-compatible with ASCII — the first 128 UTF-8 codes are identical to ASCII.
ASCII Character Ranges
🔢 Digits (48–57)
| 48–57 | 0 1 2 3 4 5 6 7 8 9 |
| Tip | Digit value = code − 48 |
🔤 Uppercase (65–90)
| 65–90 | A B C ... X Y Z |
| A = 65 | Z = 90 |
🔡 Lowercase (97–122)
| 97–122 | a b c ... x y z |
| a = 97 | z = 122 |
| Tip | lowercase = uppercase + 32 |
⚙️ Control (0–31, 127)
| 0 | NUL (null) |
| 9 | TAB (horizontal tab) |
| 10 | LF (line feed / newline) |
| 13 | CR (carriage return) |
| 27 | ESC (escape) |
| 127 | DEL (delete) |
Common Control Characters
Control characters (codes 0–31 and 127) are non-printable characters originally used for controlling devices like teletypes and printers. Many are still used in modern computing.
echo -e '\a'Converting ASCII in Code
Get ASCII code from character
ord('A') # → 65
// JavaScript
'A'.charCodeAt(0) // → 65
// C / C++
(int)'A' // → 65
Get character from ASCII code
chr(65) # → 'A'
// JavaScript
String.fromCharCode(65) // → 'A'
// C / C++
(char)65 // → 'A'
Case Conversion Trick
The difference between uppercase and lowercase ASCII letters is always 32:
'A' + 32 = 'a' // 65 + 32 = 97
// To uppercase: subtract 32 (or clear bit 5)
'a' - 32 = 'A' // 97 - 32 = 65
// Bitwise toggle case:
'A' ^ 32 = 'a' // XOR with 0x20
ASCII vs Extended ASCII vs Unicode
| Encoding | Bits | Characters | Notes |
|---|---|---|---|
| ASCII | 7 | 128 | Original standard (0–127). English letters, digits, punctuation, control codes. |
| Extended ASCII | 8 | 256 | Adds 128 characters (128–255). Varies by code page (Windows-1252, ISO-8859-1, etc.). |
| UTF-8 | 8–32 | 1,112,064 | Variable-width Unicode encoding. First 128 codes identical to ASCII. Web standard. |
| UTF-16 | 16–32 | 1,112,064 | Used by Windows and Java internally. 2 or 4 bytes per character. |
Key insight: UTF-8 is backwards-compatible with ASCII. Any valid ASCII text is also valid UTF-8. This is why ASCII remains relevant despite Unicode's dominance.
Frequently Asked Questions
What is ASCII?
ASCII (American Standard Code for Information Interchange) is a 7-bit character encoding standard that assigns numbers 0–127 to letters, digits, punctuation, and control codes. First published in 1963, it remains the foundation for modern text encoding systems like UTF-8.
How many characters are in ASCII?
Standard ASCII contains 128 characters (0–127): 33 control characters (0–31 and 127) and 95 printable characters (32–126). Extended ASCII uses 8 bits for 256 characters, but the extended set varies by code page.
What is the ASCII code for 'A'?
Uppercase 'A' is 65 (decimal), 0x41 (hex), 01000001 (binary). Lowercase 'a' is 97, 0x61, 01100001. The difference between uppercase and lowercase letters is always 32.
What are ASCII control characters?
Control characters (codes 0–31 and 127) are non-printable characters used for text formatting and device control. Common examples: NUL (0), TAB (9), LF/newline (10), CR/carriage return (13), ESC (27).
What is the ASCII code for newline?
Newline (LF) is code 10 (0x0A). Windows uses CR+LF (13, 10). Unix/Linux/macOS uses just LF (10). Carriage return (CR) alone is 13 (0x0D).
What is the difference between ASCII and Unicode?
ASCII encodes 128 characters (English letters, digits, basic punctuation). Unicode encodes over 149,000 characters from virtually all writing systems. UTF-8 is backwards-compatible — the first 128 UTF-8 codes are identical to ASCII.
How do I type ASCII characters with Alt codes?
On Windows, hold Alt and type the decimal code on the numeric keypad (e.g., Alt+65 = 'A'). On Mac, use Character Viewer (Ctrl+Cmd+Space). On Linux, use Ctrl+Shift+U + hex code.
Why does space have code 32?
Codes 0–31 are reserved for control characters. Space (32 / 0x20) is the first printable character, separating control codes from visible characters and simplifying sorting operations.
What is Extended ASCII?
Extended ASCII refers to 8-bit character sets adding 128 more characters (128–255). These vary by code page — Windows-1252, ISO-8859-1, and Code Page 437 all define different characters for codes 128–255.
Privacy & Notes
- Client-side only. All lookups run in your browser. No data is sent to any server.
- Standard ASCII only. This table covers the original 7-bit ASCII (0–127). Extended ASCII codes (128–255) vary by code page and are not included.
- For Unicode lookups beyond ASCII, consider dedicated Unicode tools.
Related Tools
- Base Converter -- Convert numbers between bases 2 and 36
- Storage RAID Calculator -- Calculate usable RAID capacity for RAID 0, 1, 5, 6, and 10
- Data Transfer Time Calculator -- Estimate upload and download time from file size and speed
- DPI Calculator -- Calculate DPI, PPI, print sizes, and resolution for screens and printing
Related Tools
View all toolsDecimal to Hex Converter
Convert decimal numbers to hexadecimal
UUID Generator
Generate random UUIDs instantly
Binary to Decimal Converter
Convert binary numbers to decimal
Base Converter
Convert numbers between bases 2 and 36
Data Size Converter
Convert between bytes, KB, MB, GB, and TB
Binary File Size Calculator
Convert file sizes between decimal and binary units with bits/bytes support
ASCII Table FAQ
What is ASCII?
ASCII (American Standard Code for Information Interchange) is a 7-bit character encoding standard that assigns numbers 0–127 to letters, digits, punctuation, and control codes. It was first published in 1963 and remains the foundation for modern text encoding systems like UTF-8.
How many characters are in ASCII?
Standard ASCII contains 128 characters (0–127). This includes 33 control characters (0–31 and 127) and 95 printable characters (32–126). Extended ASCII uses 8 bits for 256 characters (0–255), but the extended set varies by code page.
What is the ASCII code for the letter A?
The ASCII code for uppercase 'A' is 65 in decimal, 0x41 in hexadecimal, and 01000001 in binary. Lowercase 'a' is 97 (decimal), 0x61 (hex), or 01100001 (binary). The difference between uppercase and lowercase letters is always 32.
What are ASCII control characters?
ASCII control characters (codes 0–31 and 127) are non-printable characters used for text formatting and device control. Common examples include NUL (0), TAB (9), LF/newline (10), CR/carriage return (13), and ESC (27). They originated from teletype and terminal communication.
What is the difference between ASCII and Unicode?
ASCII encodes 128 characters using 7 bits and covers only English letters, digits, and basic punctuation. Unicode encodes over 149,000 characters from virtually all writing systems. UTF-8 (the most common Unicode encoding) is backwards-compatible with ASCII — the first 128 UTF-8 codes are identical to ASCII.
How do I convert a character to its ASCII code?
In most programming languages: Python uses ord('A') → 65; JavaScript uses 'A'.charCodeAt(0) → 65; C uses (int)'A' → 65. To convert a code back to a character: Python uses chr(65) → 'A'; JavaScript uses String.fromCharCode(65) → 'A'.
Why does ASCII code 32 represent a space?
Code 32 (0x20) is the space character — the first printable character in ASCII. Codes 0–31 are reserved for control characters. The space was placed at 32 to separate control codes from printable characters and to make sorting and comparison operations simpler.
What is the ASCII code for newline?
The newline character (LF, line feed) is ASCII code 10 (0x0A). On Windows, a newline is typically represented as CR+LF (codes 13 and 10). On Unix/Linux/macOS, a newline is just LF (code 10). The carriage return (CR) alone is code 13 (0x0D).
How do I type ASCII characters using Alt codes?
On Windows, hold Alt and type the decimal code on the numeric keypad. For example, Alt+65 types 'A', Alt+64 types '@'. This works for codes 0–255. On Mac, use the Character Viewer (Ctrl+Cmd+Space). On Linux, use Ctrl+Shift+U followed by the hex code.
What is Extended ASCII?
Extended ASCII refers to 8-bit character sets that add 128 more characters (codes 128–255) to standard ASCII. These extensions vary by code page — for example, Windows-1252 (Western European), ISO-8859-1 (Latin-1), and Code Page 437 (DOS) all define different characters for codes 128–255.