ASCII Converter — Complete Guide to ASCII Character Encoding
The ASCII Converter is a free online tool that lets you convert text characters to their ASCII decimal codes and convert ASCII codes back to readable text. Whether you are a developer debugging character encoding issues, a student learning about computer science fundamentals, or anyone working with data that requires ASCII representation, this tool provides instant, accurate conversions.
What is ASCII?
ASCII stands for American Standard Code for Information Interchange. It is a character encoding standard developed in the early 1960s by the American National Standards Institute (ANSI). ASCII defines 128 characters, each mapped to a number from 0 to 127. These include 33 non-printable control characters (0-31 and 127) and 95 printable characters (32-126) covering English letters, digits, punctuation marks, and common symbols.
ASCII was the dominant encoding standard for decades and remains the foundation of modern encoding systems. Every UTF-8 encoded document is backward-compatible with ASCII — the first 128 code points in Unicode are identical to ASCII values.
ASCII Table (0-127)
The standard ASCII table contains 128 characters divided into several groups:
Control Characters (0-31, 127)
| Dec | Hex | Name | Description |
|---|---|---|---|
| 0 | 00 | NUL | Null character |
| 9 | 09 | TAB | Horizontal tab |
| 10 | 0A | LF | Line feed (newline) |
| 13 | 0D | CR | Carriage return |
| 27 | 1B | ESC | Escape |
| 127 | 7F | DEL | Delete |
Printable Characters (32-126)
| Range | Characters | Description |
|---|---|---|
| 32 | (space) | Space character |
| 48-57 | 0-9 | Digits |
| 65-90 | A-Z | Uppercase letters |
| 97-122 | a-z | Lowercase letters |
| 33-47, 58-64, 91-96, 123-126 | ! @ # $ % etc. | Punctuation & symbols |
Extended ASCII (128-255)
Extended ASCII uses the 8th bit of a byte to represent characters 128-255. Unlike standard ASCII which is universal, extended ASCII varies by code page. Common implementations include:
- ISO 8859-1 (Latin-1) — Covers Western European languages (é, ñ, ü, ß)
- Windows-1252 — Microsoft's extension of Latin-1 with smart quotes and other symbols
- Code Page 437 — IBM PC original character set with box-drawing characters
- ISO 8859-5 — Cyrillic characters for Russian and related languages
Unicode vs ASCII
While ASCII handles only 128 characters (sufficient for English), Unicode was created to represent all writing systems worldwide. Key differences:
| Feature | ASCII | Unicode |
|---|---|---|
| Characters | 128 | 143,000+ |
| Bytes per char | 1 byte (7 bits) | 1-4 bytes (UTF-8) |
| Languages | English only | All living scripts |
| Emoji support | No | Yes |
| Backward compatible | — | First 128 codes = ASCII |
Common ASCII Codes Quick Reference
Here are the most frequently needed ASCII values:
- Space: 32 | Newline (LF): 10 | Tab: 9
- 0-9 digits: 48-57 | A-Z: 65-90 | a-z: 97-122
- ! (exclamation): 33 | @ (at): 64 | # (hash): 35
- $ (dollar): 36 | % (percent): 37 | & (ampersand): 38
- Difference between upper and lowercase: 32 (A=65, a=97, difference=32)
Programming with ASCII
ASCII values are fundamental in programming. Here are common operations across languages:
- JavaScript:
'A'.charCodeAt(0)→ 65,String.fromCharCode(65)→ 'A' - Python:
ord('A')→ 65,chr(65)→ 'A' - C/C++:
(int)'A'→ 65,(char)65→ 'A' - Java:
(int)'A'→ 65,(char)65→ 'A'
Common use cases include: case conversion (toggle bit 5), checking if a character is a digit (code 48-57), alphabetical sorting, Caesar cipher encryption, and data sanitization.
Frequently Asked Questions
What is ASCII?
ASCII (American Standard Code for Information Interchange) is a character encoding standard that assigns numeric codes (0-127) to 128 characters. It includes English letters (uppercase and lowercase), digits 0-9, punctuation marks, common symbols, and 33 control characters. Developed in the 1960s, it remains the foundation of modern text encoding systems.
How do I convert text to ASCII?
Each character has a unique ASCII number. Type your text into our converter and it instantly shows the decimal ASCII code for each character. For example, "Hello" becomes "72 101 108 108 111". You can also get hex or binary representations.
What is the difference between ASCII and Unicode?
ASCII covers only 128 characters (English letters, digits, basic symbols) using 7 bits per character. Unicode covers over 143,000 characters from all writing systems, emoji, and symbols using variable-length encoding (1-4 bytes in UTF-8). The first 128 Unicode code points are identical to ASCII, making UTF-8 backward-compatible.
What are ASCII control characters?
ASCII codes 0-31 and 127 are control characters — non-printable characters originally designed for controlling hardware devices like printers and terminals. Important ones include: NUL (0), BEL/bell (7), BS/backspace (8), TAB (9), LF/newline (10), CR/carriage return (13), ESC/escape (27), and DEL (127).
What is extended ASCII?
Extended ASCII uses the 8th bit to represent characters 128-255, adding 128 more characters to the standard set. Unlike standard ASCII which is universal, extended ASCII varies by code page (ISO 8859-1, Windows-1252, etc.). This inconsistency is why Unicode was created as a universal replacement.
What is the ASCII code for 'A'?
Uppercase 'A' has ASCII code 65 (decimal), 41 (hexadecimal), or 01000001 (binary). The full uppercase alphabet A-Z spans codes 65-90. Lowercase 'a' is 97, and lowercase letters span 97-122. The difference between upper and lower case is always 32.
How is ASCII used in programming?
Programmers use ASCII for character comparisons, string sorting, input validation, encryption (Caesar cipher, XOR), protocol implementation (HTTP, SMTP use ASCII headers), file parsing (CSV delimiters, line endings), and data serialization. Most languages provide built-in functions like charCodeAt(), ord(), and chr() for ASCII operations.
Can ASCII represent non-English characters?
Standard ASCII (0-127) only supports English characters and basic symbols. For accented characters (é, ñ, ü), you need extended ASCII code pages. For non-Latin scripts (Chinese, Arabic, Hindi, Japanese), you must use Unicode encoding (UTF-8 or UTF-16). Today, UTF-8 is the universal standard for web content.
Related Tools
Encode and decode Base64 strings
Unicode ConverterConvert text to Unicode code points
HTML Encoder/DecoderEncode special HTML characters
Number System ConverterBinary, octal, decimal, hexadecimal
Text FormatterFormat, transform, and clean text
Binary ConverterConvert between binary and other bases