Decimal to ASCII: How Numbers Map to Characters
Learn how decimal to ASCII works: what ASCII codes mean, how numbers map to characters, plus a handy reference table and worked encode and decode examples.
Decimal to ASCII: How Numbers Map to Characters
Converting decimal to ASCII means taking a decimal number and looking up the character it represents in the ASCII table. Each ASCII character has a decimal code from 0 to 127 — for example, decimal 65 is the letter "A", decimal 97 is "a", and decimal 33 is "!". To convert, you simply match the number to its character in the standard ASCII chart. The reverse, ASCII to decimal, just reads the code off the same table.
This guide explains what ASCII codes are, how the decimal-to-character mapping works, and provides a clear reference table of the most useful values. You will also see worked examples for turning numbers into readable text and back again. For converting long sequences instantly, our free Binary to ASCII converter handles decimal, binary, and ASCII in one place — no signup required.
What Are ASCII Codes?
ASCII stands for the American Standard Code for Information Interchange. It is a character-encoding standard from the 1960s that assigns a unique number to each letter, digit, punctuation mark, and control instruction. Computers cannot store letters directly; they store numbers. ASCII is the agreed-upon "dictionary" that says number 72 means H, number 32 means a space, and so on.
Standard ASCII defines 128 characters, numbered 0 through 127. These split into three groups: control characters (0–31, such as tab and newline, which are commands rather than printable symbols), printable symbols and digits (32–64, including space, punctuation, and the numbers 0–9), and letters (65–122, covering uppercase A–Z and lowercase a–z, with a few symbols in between).
How the Decimal-to-Character Mapping Works
The mapping is just a fixed lookup. To convert a decimal number to its ASCII character, you find that number in the ASCII table and read off the symbol. There is no math involved — only a reference. The structure is logical, though, which makes key ranges easy to memorize:
- 48–57 are the digits 0 through 9 (so decimal 48 is the character "0").
- 65–90 are uppercase A through Z (decimal 65 is "A").
- 97–122 are lowercase a through z (decimal 97 is "a").
- 32 is the space character.
Notice the gap of 32 between uppercase and lowercase letters: A is 65, a is 97, and 97 − 65 = 32. This consistent offset is why changing a letter's case is a simple matter of adding or subtracting 32 from its decimal code.
Decimal to ASCII Reference Table
The table below covers the most commonly needed printable characters with their decimal codes. Use it to convert in either direction: decimal to ASCII (find the number, read the character) or ASCII to decimal (find the character, read the number).
| Decimal | Character | Decimal | Character | Decimal | Character |
|---|---|---|---|---|---|
| 32 | (space) | 65 | A | 97 | a |
| 33 | ! | 66 | B | 98 | b |
| 44 | , | 67 | C | 99 | c |
| 46 | . | 72 | H | 104 | h |
| 48 | 0 | 73 | I | 105 | i |
| 49 | 1 | 76 | L | 108 | l |
| 57 | 9 | 79 | O | 111 | o |
| 63 | ? | 87 | W | 119 | w |
| 64 | @ | 90 | Z | 122 | z |
For a full 0–127 lookup and bulk conversions, the free online ASCII converter is faster than scanning a table by hand, and it works with binary input too.
Worked Example: Decode a Number Sequence
Suppose you are given the decimal sequence 72 101 108 108 111 and asked what it spells. We convert each number to its ASCII character using the table:
| Decimal | Character |
|---|---|
| 72 | H |
| 101 | e |
| 108 | l |
| 108 | l |
| 111 | o |
Reading the characters in order spells Hello. To go the other way — encoding "Hello" as decimal (ASCII to decimal) — you look each letter up and write its code: 72, 101, 108, 108, 111. The same table works in both directions, which is the whole point of a fixed encoding standard.
Quick tip: if a decimal value is greater than 127, it is outside standard ASCII. Such codes belong to extended ASCII or, more likely today, a Unicode encoding like UTF-8.
Understanding Control Characters (0–31)
The first 32 ASCII codes are not letters or symbols you can see — they are control characters, instructions left over from the era of teletype machines and early terminals. They do not print a glyph; instead they tell a device to do something. A few are still used constantly today, even if you never see their codes:
| Decimal | Name | What it does |
|---|---|---|
| 9 | Tab (HT) | Moves the cursor to the next tab stop |
| 10 | Line Feed (LF) | Moves down one line (newline on Unix) |
| 13 | Carriage Return (CR) | Returns the cursor to the start of the line |
| 0 | Null (NUL) | Marks the end of a string in some languages |
The line-ending codes explain a classic cross-platform headache: Windows ends lines with both CR and LF (decimal 13 then 10), while Unix and macOS use just LF (decimal 10). When you decode raw bytes, those invisible control codes are why a file from one system can look oddly formatted on another. Recognizing decimal 10 and 13 in a byte stream tells you exactly what is happening.
Using Decimal ASCII Codes in Programming
Most programming languages give you direct access to ASCII decimal values, which makes character logic clean and fast. In many languages the function ord() returns a character's decimal code and chr() turns a code back into a character. For example, the value of A is obtained with ord("A"), which returns 65, and chr(97) returns "a". This is the programmatic version of the decimal-to-ASCII lookup you do by hand.
Because the codes are sequential, you can do useful arithmetic with them. To check whether a character is an uppercase letter, you test whether its code falls between 65 and 90. To shift a letter's case, you add or subtract 32. To convert the character "7" into the number 7, you subtract 48 (the code for "0") from its ASCII value. These tricks power input validation, simple ciphers like Caesar shifts, and text-parsing routines. The decimal-to-ASCII relationship is the foundation underneath all of them.
Why Decimal to ASCII Conversion Matters
This conversion shows up in many practical settings. Programmers use ASCII codes when validating input, sorting strings, or performing character math (for instance, checking whether a character falls between 48 and 57 to test if it is a digit). Data analysts encounter ASCII when cleaning files that store characters as numeric codes. And anyone working with low-level data formats, network protocols, or older systems will see ASCII decimal values regularly.
Beyond the workplace, decimal-to-ASCII decoding is a staple of coding puzzles, capture-the-flag security challenges, and escape rooms, where a string of numbers often hides a secret word. Knowing the key ranges (65 for A, 97 for a, 48 for 0) lets you decode short messages in your head.
ASCII vs. Unicode: A Note on Limits
ASCII only covers 128 characters, which is enough for English but not for accented letters, other alphabets, or emoji. The modern successor is Unicode, usually encoded as UTF-8. The good news is that UTF-8 was designed to be backward-compatible: the first 128 Unicode code points are identical to ASCII. So decimal 65 is still "A" in both systems. You only need to think about UTF-8 when working with characters beyond the basic ASCII set.
Related Reading
Explore more conversion tutorials in our Binary Converters hub. Two guides pair naturally with this one: The Binary Alphabet: A to Z in Binary shows the same letters in base 2, and Decimal to Octal: Repeated Division by 8 covers a classic numeric base conversion. Reading all three gives you a solid grasp of how computers encode both text and numbers.
Frequently Asked Questions
What does decimal to ASCII mean?
It means taking a decimal number and finding the character it represents in the ASCII table. For example, decimal 65 maps to the letter A and decimal 97 maps to a. It is a simple lookup, not a calculation.
What is decimal 65 in ASCII?
Decimal 65 is the uppercase letter A. The uppercase alphabet runs from 65 (A) to 90 (Z), while the lowercase alphabet runs from 97 (a) to 122 (z).
How do I convert ASCII to decimal?
Look up the character in the ASCII table and read its number. For instance, the character A is 65 and the digit "1" (the character, not the value) is 49. It is the reverse of the same lookup used for decimal to ASCII.
Why is the digit 0 equal to decimal 48 and not 0?
Decimal code 0 is a control character (the null character), not the printable digit zero. The printable character "0" is assigned code 48, with "1" at 49 and so on up to "9" at 57.
How many characters are in standard ASCII?
Standard ASCII defines 128 characters numbered 0 through 127. This includes 33 control characters and 95 printable characters such as letters, digits, punctuation, and the space.
What happens with decimal codes above 127?
Codes above 127 fall outside standard ASCII. They belong to extended ASCII variants or, more commonly today, to Unicode encodings like UTF-8, which support thousands of additional characters.
What is the easiest way to convert a long sequence?
For more than a few characters, use a free online converter. It maps decimal to ASCII (and back) instantly and avoids the errors that come from scanning a table by hand.