ASCII Converter

Convert text to ASCII decimal codes and decode ASCII values back to readable characters. The foundational encoding standard that powers all modern computing.

6 characters
Each character maps to its ASCII decimal code (A=65, a=97, space=32). Use Decode to turn codes back into text.Client-side · no upload

What is ASCII?

ASCII, the American Standard Code for Information Interchange, is the character encoding system that laid the foundation for how computers represent text. Published in 1963 by the American Standards Association (now ANSI), ASCII assigns a unique numeric value to 128 characters, enabling different computers and devices to interpret text data consistently.

The 128 ASCII characters are divided into two groups. The first 32 codes (0 through 31) plus code 127 are control characters, originally designed to operate teletype machines: codes like Tab (9), Line Feed (10), and Carriage Return (13) controlled text formatting, while others like Bell (7) triggered audible alerts. The remaining 95 codes (32 through 126) represent printable characters including the space character (32), digits 0 through 9 (48 through 57), uppercase letters A through Z (65 through 90), lowercase letters a through z (97 through 122), and common punctuation marks.

What makes ASCII particularly elegant is its internal structure. The uppercase and lowercase versions of each letter differ by exactly 32, making case conversion a single arithmetic operation. Digits 0 through 9 occupy codes 48 through 57, so converting between a digit character and its numeric value requires subtracting 48. These design decisions have influenced programming practices for over six decades.

While modern systems use Unicode and UTF-8 to support international scripts and emoji, the first 128 Unicode code points are identical to ASCII. This backward compatibility means ASCII remains relevant in every computing context, from embedded systems and network protocols to web development and data science.

How ASCII Conversion Works

Converting text to ASCII codes and back is a direct lookup process:

  1. Text to ASCII (encoding): Each character in your input is converted to its decimal ASCII value using the standard table. The letter H maps to 72, e maps to 101, l maps to 108, and so on. The resulting numbers are separated by spaces.
  2. ASCII to text (decoding): Each number in your input is looked up in the ASCII table and replaced with its corresponding character. The value 72 becomes H, 101 becomes e, 108 becomes l. Numbers outside the 0 to 127 range are flagged as invalid ASCII.
  3. Output format: This tool outputs decimal (base-10) ASCII codes — the most common, human-readable form (A = 65, a = 97). The same values can also be written in other bases: use the Hex Converter for hexadecimal or Text to Binary for the raw bit pattern.
  4. Batch processing: Multiple lines of text can be converted simultaneously. Each line is processed independently, preserving the original structure of your input.

All processing occurs locally in your browser using JavaScript's built-in charCodeAt() and String.fromCharCode() functions. No data is transmitted to any server.

Worked Examples You Can Reproduce

Every result below comes straight from the converter above — type the input and you get the exact output shown. They cover the cases people ask about most: a typical string, how case and spaces behave, decoding decimal codes back to text (the “decimal to ASCII” direction), and an input this ASCII translator refuses rather than guessing.

ModeInputOutputWhy it matters
EncodeHello!72 101 108 108 111 33Typical string; each character → its decimal ASCII code (! is 33).
EncodeAa65 97Case matters: uppercase and lowercase differ by exactly 32.
EncodeA B65 32 66A space is a real ASCII character (32), not dropped.
Decode72 105 33Hi!Decimal codes round-trip straight back to text.
EncodecaféRejectedé is code point 233, outside 0–127 — the tool asks for UTF-8 instead of guessing.

Keep the full ASCII table beside you to look up any code, or see how ASCII compares to A1Z26 and binary to pick the right scheme.

What This Converter Accepts — and What It Rejects

This ASCII decoder validates input instead of scraping whatever it can, so you get a result you can trust — or a clear message, never a wrong character pulled from a bad code. Here is exactly where the line is drawn:

  • Encoding accepts standard ASCII characters (0–127): letters, digits, punctuation and spaces are all preserved (a space is code 32). Accented letters, emoji and non-Latin scripts are not ASCII, so the tool answers “ASCII supports only characters 0–127. Choose UTF-8 binary for accents, emoji or other scripts.”
  • Decoding accepts whole numbers 0 through 127, separated by spaces or commas. A value outside that range is refused — decoding 200 returns “value 200 is outside 0–127. Check the selected format.”
  • It will not guess run-together digits. An unseparated string offers no reliable split, so it is rejected rather than interpreted.

This tool outputs decimal ASCII codes. For the same characters in other bases, use the hex converter or text to binary tool.

A Common Mistake: Hyphens Don't Separate ASCII Codes

If you have used the A1Z26 cipher, hyphen-separated codes like 72-101-108 feel natural. ASCII is different: this decoder accepts spaces or commas only, because a hyphen is ambiguous next to numbers and is not a standard ASCII delimiter. Paste 72-101-108 and the tool refuses it with a message to use spaces or commas rather than silently mis-splitting the codes.

The fix is simple: write 72 101 108 or 72,101,108. When you encode with the converter above it always uses single spaces, which is the safest format for a code someone else can decode without ambiguity. (The A1Z26 ciphertool is the one that accepts hyphens, since its codes only run 1–26.)

Common Use Cases

  • Programming and debugging: Developers frequently need to inspect the exact byte values of characters when debugging encoding issues, parsing file formats, or implementing communication protocols. ASCII conversion reveals invisible characters like tabs, null bytes, and carriage returns that cause subtle bugs.
  • Data analysis and ETL: When processing CSV files, log data, or legacy database exports, non-printable characters can corrupt parsing. Converting suspect strings to ASCII values helps identify and remove problematic characters before data ingestion.
  • Network security and forensics: Security analysts inspect packet captures and log files at the byte level. Converting hex or decimal dumps back to ASCII reveals URLs, credentials, commands, and other readable content embedded in raw network traffic.
  • Education and computer science courses: ASCII conversion is a fundamental topic in introductory computer science. Students learn how computers represent text internally, practice bit manipulation, and understand why uppercase A is 65 while lowercase a is 97.

Key ASCII Values to Remember

CharacterDecimalHexBinary
Space322000100000
0483000110000
9573900111001
A654101000001
Z905A01011010
a976101100001
z1227A01111010

Frequently Asked Questions

ASCII stands for the American Standard Code for Information Interchange. It is a character encoding standard that assigns numeric values to 128 characters including uppercase letters (65-90), lowercase letters (97-122), digits (48-57), punctuation marks, and control characters. It was first published in 1963 and remains foundational to modern computing.
Uppercase A has an ASCII decimal value of 65. Lowercase a has an ASCII decimal value of 97. The difference of 32 between uppercase and lowercase is consistent across all 26 letters, which is why toggling case in code is as simple as adding or subtracting 32.