ASCII Table
Complete ASCII character table with decimal, hex, octal, binary values. Look up ASCII codes, control characters, and printable characters.
ASCII Character Table
| Decimal | Hex | Octal | Binary | Char | HTML | Description | Actions |
|---|---|---|---|---|---|---|---|
| 0 | 0x00 | 0000 | 0000000 | NUL | � | NUL (Null) | |
| 1 | 0x01 | 0001 | 0000001 | SOH |  | SOH (Start of Heading) | |
| 2 | 0x02 | 0002 | 0000010 | STX |  | STX (Start of Text) | |
| 3 | 0x03 | 0003 | 0000011 | ETX |  | ETX (End of Text) | |
| 4 | 0x04 | 0004 | 0000100 | EOT |  | EOT (End of Transmission) | |
| 5 | 0x05 | 0005 | 0000101 | ENQ |  | ENQ (Enquiry) | |
| 6 | 0x06 | 0006 | 0000110 | ACK |  | ACK (Acknowledge) | |
| 7 | 0x07 | 0007 | 0000111 | BEL |  | BEL (Bell) | |
| 8 | 0x08 | 0010 | 0001000 | BS |  | BS (Backspace) | |
| 9 | 0x09 | 0011 | 0001001 | TAB | 	 | TAB (Horizontal Tab) | |
| 10 | 0x0A | 0012 | 0001010 | LF | | LF (Line Feed) | |
| 11 | 0x0B | 0013 | 0001011 | VT |  | VT (Vertical Tab) | |
| 12 | 0x0C | 0014 | 0001100 | FF |  | FF (Form Feed) | |
| 13 | 0x0D | 0015 | 0001101 | CR | | CR (Carriage Return) | |
| 14 | 0x0E | 0016 | 0001110 | SO |  | SO (Shift Out) | |
| 15 | 0x0F | 0017 | 0001111 | SI |  | SI (Shift In) | |
| 16 | 0x10 | 0020 | 0010000 | DLE |  | DLE (Data Link Escape) | |
| 17 | 0x11 | 0021 | 0010001 | DC1 |  | DC1 (Device Control 1) | |
| 18 | 0x12 | 0022 | 0010010 | DC2 |  | DC2 (Device Control 2) | |
| 19 | 0x13 | 0023 | 0010011 | DC3 |  | DC3 (Device Control 3) | |
| 20 | 0x14 | 0024 | 0010100 | DC4 |  | DC4 (Device Control 4) | |
| 21 | 0x15 | 0025 | 0010101 | NAK |  | NAK (Negative Acknowledge) | |
| 22 | 0x16 | 0026 | 0010110 | SYN |  | SYN (Synchronous Idle) | |
| 23 | 0x17 | 0027 | 0010111 | ETB |  | ETB (End of Transmission Block) | |
| 24 | 0x18 | 0030 | 0011000 | CAN |  | CAN (Cancel) | |
| 25 | 0x19 | 0031 | 0011001 | EM |  | EM (End of Medium) | |
| 26 | 0x1A | 0032 | 0011010 | SUB |  | SUB (Substitute) | |
| 27 | 0x1B | 0033 | 0011011 | ESC |  | ESC (Escape) | |
| 28 | 0x1C | 0034 | 0011100 | FS |  | FS (File Separator) | |
| 29 | 0x1D | 0035 | 0011101 | GS |  | GS (Group Separator) | |
| 30 | 0x1E | 0036 | 0011110 | RS |  | RS (Record Separator) | |
| 31 | 0x1F | 0037 | 0011111 | US |  | US (Unit Separator) | |
| 32 | 0x20 | 0040 | 0100000 | Printable character: | |||
| 33 | 0x21 | 0041 | 0100001 | ! | ! | Punctuation/Symbol: ! | |
| 34 | 0x22 | 0042 | 0100010 | " | " | Punctuation/Symbol: " | |
| 35 | 0x23 | 0043 | 0100011 | # | # | Punctuation/Symbol: # | |
| 36 | 0x24 | 0044 | 0100100 | $ | $ | Punctuation/Symbol: $ | |
| 37 | 0x25 | 0045 | 0100101 | % | % | Punctuation/Symbol: % | |
| 38 | 0x26 | 0046 | 0100110 | & | & | Punctuation/Symbol: & | |
| 39 | 0x27 | 0047 | 0100111 | ' | ' | Punctuation/Symbol: ' | |
| 40 | 0x28 | 0050 | 0101000 | ( | ( | Punctuation/Symbol: ( | |
| 41 | 0x29 | 0051 | 0101001 | ) | ) | Punctuation/Symbol: ) | |
| 42 | 0x2A | 0052 | 0101010 | * | * | Punctuation/Symbol: * | |
| 43 | 0x2B | 0053 | 0101011 | + | + | Punctuation/Symbol: + | |
| 44 | 0x2C | 0054 | 0101100 | , | , | Punctuation/Symbol: , | |
| 45 | 0x2D | 0055 | 0101101 | - | - | Punctuation/Symbol: - | |
| 46 | 0x2E | 0056 | 0101110 | . | . | Punctuation/Symbol: . | |
| 47 | 0x2F | 0057 | 0101111 | / | / | Punctuation/Symbol: / | |
| 48 | 0x30 | 0060 | 0110000 | 0 | 0 | Digit: 0 | |
| 49 | 0x31 | 0061 | 0110001 | 1 | 1 | Digit: 1 | |
| 50 | 0x32 | 0062 | 0110010 | 2 | 2 | Digit: 2 | |
| 51 | 0x33 | 0063 | 0110011 | 3 | 3 | Digit: 3 | |
| 52 | 0x34 | 0064 | 0110100 | 4 | 4 | Digit: 4 | |
| 53 | 0x35 | 0065 | 0110101 | 5 | 5 | Digit: 5 | |
| 54 | 0x36 | 0066 | 0110110 | 6 | 6 | Digit: 6 | |
| 55 | 0x37 | 0067 | 0110111 | 7 | 7 | Digit: 7 | |
| 56 | 0x38 | 0070 | 0111000 | 8 | 8 | Digit: 8 | |
| 57 | 0x39 | 0071 | 0111001 | 9 | 9 | Digit: 9 | |
| 58 | 0x3A | 0072 | 0111010 | : | : | Punctuation/Symbol: : | |
| 59 | 0x3B | 0073 | 0111011 | ; | ; | Punctuation/Symbol: ; | |
| 60 | 0x3C | 0074 | 0111100 | < | < | Punctuation/Symbol: < | |
| 61 | 0x3D | 0075 | 0111101 | = | = | Punctuation/Symbol: = | |
| 62 | 0x3E | 0076 | 0111110 | > | > | Punctuation/Symbol: > | |
| 63 | 0x3F | 0077 | 0111111 | ? | ? | Punctuation/Symbol: ? | |
| 64 | 0x40 | 0100 | 1000000 | @ | @ | Punctuation/Symbol: @ | |
| 65 | 0x41 | 0101 | 1000001 | A | A | Uppercase letter: A | |
| 66 | 0x42 | 0102 | 1000010 | B | B | Uppercase letter: B | |
| 67 | 0x43 | 0103 | 1000011 | C | C | Uppercase letter: C | |
| 68 | 0x44 | 0104 | 1000100 | D | D | Uppercase letter: D | |
| 69 | 0x45 | 0105 | 1000101 | E | E | Uppercase letter: E | |
| 70 | 0x46 | 0106 | 1000110 | F | F | Uppercase letter: F | |
| 71 | 0x47 | 0107 | 1000111 | G | G | Uppercase letter: G | |
| 72 | 0x48 | 0110 | 1001000 | H | H | Uppercase letter: H | |
| 73 | 0x49 | 0111 | 1001001 | I | I | Uppercase letter: I | |
| 74 | 0x4A | 0112 | 1001010 | J | J | Uppercase letter: J | |
| 75 | 0x4B | 0113 | 1001011 | K | K | Uppercase letter: K | |
| 76 | 0x4C | 0114 | 1001100 | L | L | Uppercase letter: L | |
| 77 | 0x4D | 0115 | 1001101 | M | M | Uppercase letter: M | |
| 78 | 0x4E | 0116 | 1001110 | N | N | Uppercase letter: N | |
| 79 | 0x4F | 0117 | 1001111 | O | O | Uppercase letter: O | |
| 80 | 0x50 | 0120 | 1010000 | P | P | Uppercase letter: P | |
| 81 | 0x51 | 0121 | 1010001 | Q | Q | Uppercase letter: Q | |
| 82 | 0x52 | 0122 | 1010010 | R | R | Uppercase letter: R | |
| 83 | 0x53 | 0123 | 1010011 | S | S | Uppercase letter: S | |
| 84 | 0x54 | 0124 | 1010100 | T | T | Uppercase letter: T | |
| 85 | 0x55 | 0125 | 1010101 | U | U | Uppercase letter: U | |
| 86 | 0x56 | 0126 | 1010110 | V | V | Uppercase letter: V | |
| 87 | 0x57 | 0127 | 1010111 | W | W | Uppercase letter: W | |
| 88 | 0x58 | 0130 | 1011000 | X | X | Uppercase letter: X | |
| 89 | 0x59 | 0131 | 1011001 | Y | Y | Uppercase letter: Y | |
| 90 | 0x5A | 0132 | 1011010 | Z | Z | Uppercase letter: Z | |
| 91 | 0x5B | 0133 | 1011011 | [ | [ | Punctuation/Symbol: [ | |
| 92 | 0x5C | 0134 | 1011100 | \ | \ | Punctuation/Symbol: \ | |
| 93 | 0x5D | 0135 | 1011101 | ] | ] | Punctuation/Symbol: ] | |
| 94 | 0x5E | 0136 | 1011110 | ^ | ^ | Punctuation/Symbol: ^ | |
| 95 | 0x5F | 0137 | 1011111 | _ | _ | Punctuation/Symbol: _ | |
| 96 | 0x60 | 0140 | 1100000 | ` | ` | Punctuation/Symbol: ` | |
| 97 | 0x61 | 0141 | 1100001 | a | a | Lowercase letter: a | |
| 98 | 0x62 | 0142 | 1100010 | b | b | Lowercase letter: b | |
| 99 | 0x63 | 0143 | 1100011 | c | c | Lowercase letter: c | |
| 100 | 0x64 | 0144 | 1100100 | d | d | Lowercase letter: d | |
| 101 | 0x65 | 0145 | 1100101 | e | e | Lowercase letter: e | |
| 102 | 0x66 | 0146 | 1100110 | f | f | Lowercase letter: f | |
| 103 | 0x67 | 0147 | 1100111 | g | g | Lowercase letter: g | |
| 104 | 0x68 | 0150 | 1101000 | h | h | Lowercase letter: h | |
| 105 | 0x69 | 0151 | 1101001 | i | i | Lowercase letter: i | |
| 106 | 0x6A | 0152 | 1101010 | j | j | Lowercase letter: j | |
| 107 | 0x6B | 0153 | 1101011 | k | k | Lowercase letter: k | |
| 108 | 0x6C | 0154 | 1101100 | l | l | Lowercase letter: l | |
| 109 | 0x6D | 0155 | 1101101 | m | m | Lowercase letter: m | |
| 110 | 0x6E | 0156 | 1101110 | n | n | Lowercase letter: n | |
| 111 | 0x6F | 0157 | 1101111 | o | o | Lowercase letter: o | |
| 112 | 0x70 | 0160 | 1110000 | p | p | Lowercase letter: p | |
| 113 | 0x71 | 0161 | 1110001 | q | q | Lowercase letter: q | |
| 114 | 0x72 | 0162 | 1110010 | r | r | Lowercase letter: r | |
| 115 | 0x73 | 0163 | 1110011 | s | s | Lowercase letter: s | |
| 116 | 0x74 | 0164 | 1110100 | t | t | Lowercase letter: t | |
| 117 | 0x75 | 0165 | 1110101 | u | u | Lowercase letter: u | |
| 118 | 0x76 | 0166 | 1110110 | v | v | Lowercase letter: v | |
| 119 | 0x77 | 0167 | 1110111 | w | w | Lowercase letter: w | |
| 120 | 0x78 | 0170 | 1111000 | x | x | Lowercase letter: x | |
| 121 | 0x79 | 0171 | 1111001 | y | y | Lowercase letter: y | |
| 122 | 0x7A | 0172 | 1111010 | z | z | Lowercase letter: z | |
| 123 | 0x7B | 0173 | 1111011 | { | { | Punctuation/Symbol: { | |
| 124 | 0x7C | 0174 | 1111100 | | | | | Punctuation/Symbol: | | |
| 125 | 0x7D | 0175 | 1111101 | } | } | Punctuation/Symbol: } | |
| 126 | 0x7E | 0176 | 1111110 | ~ | ~ | Punctuation/Symbol: ~ | |
| 127 | 0x7F | 0177 | 1111111 | DEL |  | DEL (Delete) |
What is ASCII?
ASCII (American Standard Code for Information Interchange) is a character encoding standard that represents text in computers and other devices. Developed in the 1960s, ASCII was the first widely used character encoding standard and remains fundamental to computing today. The ASCII standard uses 7 bits to represent 128 different characters, including letters, digits, punctuation marks, and control characters.
ASCII was first published as a standard in 1963 by the American Standards Association (now ANSI). It was designed to ensure compatibility between different computer systems and communication devices. The original ASCII standard included 128 characters, with the first 32 being non-printable control characters used for device control and formatting, and characters 32-126 being printable characters including uppercase and lowercase letters, digits, and punctuation.
Understanding ASCII is crucial for developers, system administrators, and anyone working with text encoding. ASCII forms the basis for many modern character encodings, including UTF-8, which is backward compatible with ASCII. All ASCII characters have the same codes in UTF-8, making ASCII knowledge essential for understanding character encoding and text processing in programming.
ASCII Character Categories
ASCII characters are divided into two main categories: control characters and printable characters. Each category serves specific purposes in computing and text processing:
Control Characters (0-31, 127)
Control characters are non-printable characters used for device control and data formatting. These include characters like TAB (9), Line Feed (10), Carriage Return (13), and Escape (27). Control characters don't have a visual representation but control how text is processed and displayed. For example, TAB moves the cursor to the next tab stop, LF moves to the next line, and CR returns the cursor to the beginning of the line. These characters are essential for text formatting, terminal control, and data communication protocols.
Printable Characters (32-126)
Printable characters include all ASCII characters that have a visual representation. This category includes the space character (32), uppercase letters A-Z (65-90), lowercase letters a-z (97-122), digits 0-9 (48-57), and various punctuation marks and symbols. Printable characters are what users typically see and interact with when reading text. The printable ASCII range ensures compatibility across different systems and is the foundation for English text representation in computing.
How to Use This ASCII Table
Our ASCII table provides a comprehensive reference for all 128 ASCII characters. Use it to quickly find character codes and their representations:
- Browse the table to find characters by decimal value, hex code, character, or description
- Filter by category using the category buttons to view only control characters or printable characters
- Search for specific characters by entering a decimal number, hex code, character, or description keywords
- Click on any row to view detailed information and copy character codes in different formats (decimal, hex, octal, binary)
For more encoding and conversion tools, check out our Toolbox homepage or explore related tools like our Binary to Text Converter and Base64 Encoder for character encoding workflows.
Using ASCII in Programming
ASCII codes are commonly used in programming for character manipulation, encoding, and text processing. Here are examples of how to work with ASCII in different programming languages:
- JavaScript: Use String.fromCharCode(65) to get character 'A' from ASCII code 65, or 'A'.charCodeAt(0) to get ASCII code 65 from character 'A'. You can also use escape sequences like '\x41' for hex or '\101' for octal.
- Python: Use chr(65) to get character 'A' from ASCII code 65, or ord('A') to get ASCII code 65 from character 'A'. Python 3 uses Unicode by default, but ASCII is a subset of Unicode.
- Java: Use (char)65 to cast integer to character, or (int)'A' to get ASCII code. Java's char type represents Unicode characters, but ASCII characters (0-127) have the same values in Unicode.
- C#: Use Convert.ToChar(65) or (char)65 to get character from ASCII code, or (int)'A' to get ASCII code from character. C# char type is 16-bit Unicode, with ASCII being a subset.
ASCII vs Unicode
While ASCII is limited to 128 characters and primarily supports English text, Unicode is a much more comprehensive standard that can represent over 1 million characters from multiple languages and scripts worldwide.
ASCII is fully compatible with Unicode and UTF-8. The first 128 Unicode characters (U+0000 to U+007F) are identical to ASCII characters. This means any valid ASCII text is also valid UTF-8 text, making UTF-8 backward compatible with ASCII. This compatibility is why ASCII knowledge remains relevant even in modern Unicode-based systems.
Use ASCII when working with legacy systems, simple English text processing, or when you need the smallest possible encoding (7 bits per character). Use Unicode (UTF-8, UTF-16, etc.) when you need to support multiple languages, special characters, emojis, or international text. For most modern applications, UTF-8 is recommended as it combines Unicode's comprehensive character support with ASCII compatibility and efficient encoding.
For more information on Unicode, refer to the Unicode Consortium and the UTF-8 Wikipedia article for comprehensive documentation.
Best Practices for Working with ASCII
Following best practices ensures optimal results when working with ASCII characters. Here are key recommendations:
Encoding Awareness
Encoding Awareness: Always be aware of the encoding when processing text. ASCII is 7-bit, but many systems use extended ASCII (8-bit) or UTF-8. Ensure your tools and code handle the encoding correctly to avoid character corruption.
Handling Control Characters
Handling Control Characters: Control characters (0-31, 127) have specific purposes. Don't remove them blindly - TAB, LF, CR are essential for formatting. Understand what each control character does before modifying text containing them.
Case Sensitivity
Case Sensitivity: ASCII distinguishes between uppercase (65-90) and lowercase (97-122). Be mindful of case-sensitive operations. Use case-insensitive comparisons when appropriate, but preserve case when it matters (like in code or proper nouns).
Input Validation
Input Validation: When accepting ASCII input, validate that characters are within the expected range. Reject or convert characters outside ASCII range (128-255 in extended ASCII, or any non-ASCII in pure ASCII) based on your requirements.
Troubleshooting ASCII Issues
When working with ASCII, you may encounter various issues. Here are common problems and their solutions:
Encoding Problems
Encoding Problems: If you see garbled characters or question marks, the text might not be in ASCII encoding. Check the file encoding (UTF-8, ISO-8859-1, Windows-1252) and convert if necessary. Use encoding detection tools to identify the correct encoding.
Control Character Issues
Control Character Issues: Unexpected line breaks, tabs, or formatting issues often stem from control characters. Use a hex editor or text editor's 'show whitespace' feature to identify control characters. Remove or replace them based on your needs.
Extended ASCII Confusion
Extended ASCII Confusion: Extended ASCII (128-255) varies by system and locale. Characters in this range are not part of standard ASCII. For portability, stick to standard ASCII (0-127) or use UTF-8 for international characters.
Case Conversion Problems
Case Conversion Problems: Case conversion requires understanding ASCII values. Uppercase to lowercase: add 32 (or use language-specific functions). Be careful with non-letter characters - they don't have case equivalents.
Tips and Tricks for ASCII
Master these advanced techniques to get the most out of ASCII:
- Quick Reference: Quick Reference: Memorize key ASCII values: 'A'=65, 'a'=97, '0'=48, space=32. Use these for quick calculations. The difference between uppercase and lowercase is always 32 in ASCII.
- Bitwise Operations: Bitwise Operations: ASCII values can be manipulated with bitwise operations. For example, to convert to uppercase: value & 0xDF, to lowercase: value | 0x20. These tricks are useful in low-level programming.
- Validation Techniques: Validation Techniques: Check if a character is ASCII: value >= 0 && value <= 127. Check if printable: value >= 32 && value < 127. Check if letter: (value >= 65 && value <= 90) || (value >= 97 && value <= 122).
- Conversion Shortcuts: Conversion Shortcuts: Convert digit to integer: char - '0' (or char - 48). Convert letter to 0-25: (char | 0x20) - 'a'. These shortcuts work because ASCII digits and letters are consecutive.
Performance Considerations
Understanding performance characteristics helps you work efficiently with ASCII:
Memory Efficiency
Memory Efficiency: ASCII uses 7 bits per character, making it very memory-efficient. In UTF-8, ASCII characters still use only 1 byte. For large text processing, ASCII is optimal if you don't need international characters.
Processing Speed
Processing Speed: ASCII operations are fast because characters fit in single bytes. String operations, comparisons, and searches are efficient. For performance-critical code processing only English text, ASCII is ideal.
Compatibility Benefits
Compatibility Benefits: ASCII's universal compatibility means no encoding conversion overhead. Text can be processed directly without decoding/encoding steps, improving performance in text processing pipelines.
When to Use Modern Alternatives
When to Use Modern Alternatives: While ASCII is efficient, UTF-8 is the modern standard. Use UTF-8 for new projects - it's ASCII-compatible but supports international characters. Only use pure ASCII when you have specific constraints (legacy systems, embedded devices with limited memory).
Related Character Encoding Tools
Our ASCII table works great with other character encoding and text processing tools. Here's when to use each tool:
Binary to Text Converter
Binary to Text Converter: Convert between ASCII and binary representations. Useful for understanding how text is stored in binary format. Combine with our ASCII table to understand the relationship between characters and their binary values.
Use our Binary to Text Converter to convert between ASCII and binary.
Base64 Encoder
Base64 Encoder: Base64 encoding uses ASCII characters (A-Z, a-z, 0-9, +, /) to represent binary data. Understanding ASCII is essential for working with Base64. Use our Base64 encoder to encode/decode data using ASCII-safe characters.
Encode and decode data with our Base64 Encoder using ASCII-safe characters.
Hash Generator
Hash Generator: Hash functions work with byte sequences, and ASCII text provides predictable byte values. Use our hash generator with ASCII text to create checksums and verify data integrity.
Generate hashes with our Hash Generator for ASCII text.
Workflow Examples
Workflow Examples: A common workflow is: check ASCII table → convert to binary → encode with Base64 → generate hash. For text processing: validate ASCII range → convert case → encode entities → verify encoding. For debugging: view hex values → check ASCII codes → identify control characters → fix encoding issues.
Explore all our character encoding and conversion tools to build complete encoding workflows.