Decimal ASCII Converter
Convert text into decimal character codes and decode decimal ASCII values back into readable text.
Useful for ASCII reference lookups, programming lessons, protocol debugging, and comparing decimal values with binary or hexadecimal notation.
How Decimal ASCII Conversion Works
Decimal ASCII expresses character codes in base 10. Each character is assigned a number, such as 65 for uppercase A or 32 for a space. Encoding converts text into those numbers, while decoding reverses the process by mapping each number back to its character.
Example: "Hi" in decimal ASCII
'H' → decimal 72
'i' → decimal 105
Result: 72 105
Decoder behavior
To convert decimal to ASCII, choose Decimal to Text and enter separated codes such as 72 105. The decoder extracts runs of 1-7 digits, ignoring other characters, then converts each group to a Unicode code point. Values above 1114111 (0x10FFFF) become the replacement character U+FFFD. Encoding reads UTF-16 code units; only values 0-127 belong to ASCII.
ASCII Table Explained: Letters, Numbers and Symbols
ASCII has 128 codes, 0-127: 95 printable characters at 32-126 and 33 control codes at 0-31 and 127. The printable table below includes letters, digits, punctuation and space; the control table completes the set.
Dec, Hex and Bin show the same code in decimal, hexadecimal and binary. Binary is padded to eight bits with a leading zero; ASCII itself uses seven bits. SP labels the space character. See RFC 20, sections 2-4.
| Dec | Hex | Bin | Char |
|---|---|---|---|
| 32 | 20 | 00100000 | SP |
| 33 | 21 | 00100001 | ! |
| 34 | 22 | 00100010 | " |
| 35 | 23 | 00100011 | # |
| 36 | 24 | 00100100 | $ |
| 37 | 25 | 00100101 | % |
| 38 | 26 | 00100110 | & |
| 39 | 27 | 00100111 | ' |
| 40 | 28 | 00101000 | ( |
| 41 | 29 | 00101001 | ) |
| 42 | 2A | 00101010 | * |
| 43 | 2B | 00101011 | + |
| 44 | 2C | 00101100 | , |
| 45 | 2D | 00101101 | - |
| 46 | 2E | 00101110 | . |
| 47 | 2F | 00101111 | / |
| 48 | 30 | 00110000 | 0 |
| 49 | 31 | 00110001 | 1 |
| 50 | 32 | 00110010 | 2 |
| 51 | 33 | 00110011 | 3 |
| 52 | 34 | 00110100 | 4 |
| 53 | 35 | 00110101 | 5 |
| 54 | 36 | 00110110 | 6 |
| 55 | 37 | 00110111 | 7 |
| 56 | 38 | 00111000 | 8 |
| 57 | 39 | 00111001 | 9 |
| 58 | 3A | 00111010 | : |
| 59 | 3B | 00111011 | ; |
| 60 | 3C | 00111100 | < |
| 61 | 3D | 00111101 | = |
| 62 | 3E | 00111110 | > |
| 63 | 3F | 00111111 | ? |
| Dec | Hex | Bin | Char |
|---|---|---|---|
| 64 | 40 | 01000000 | @ |
| 65 | 41 | 01000001 | A |
| 66 | 42 | 01000010 | B |
| 67 | 43 | 01000011 | C |
| 68 | 44 | 01000100 | D |
| 69 | 45 | 01000101 | E |
| 70 | 46 | 01000110 | F |
| 71 | 47 | 01000111 | G |
| 72 | 48 | 01001000 | H |
| 73 | 49 | 01001001 | I |
| 74 | 4A | 01001010 | J |
| 75 | 4B | 01001011 | K |
| 76 | 4C | 01001100 | L |
| 77 | 4D | 01001101 | M |
| 78 | 4E | 01001110 | N |
| 79 | 4F | 01001111 | O |
| 80 | 50 | 01010000 | P |
| 81 | 51 | 01010001 | Q |
| 82 | 52 | 01010010 | R |
| 83 | 53 | 01010011 | S |
| 84 | 54 | 01010100 | T |
| 85 | 55 | 01010101 | U |
| 86 | 56 | 01010110 | V |
| 87 | 57 | 01010111 | W |
| 88 | 58 | 01011000 | X |
| 89 | 59 | 01011001 | Y |
| 90 | 5A | 01011010 | Z |
| 91 | 5B | 01011011 | [ |
| 92 | 5C | 01011100 | \ |
| 93 | 5D | 01011101 | ] |
| 94 | 5E | 01011110 | ^ |
| 95 | 5F | 01011111 | _ |
| Dec | Hex | Bin | Char |
|---|---|---|---|
| 96 | 60 | 01100000 | ` |
| 97 | 61 | 01100001 | a |
| 98 | 62 | 01100010 | b |
| 99 | 63 | 01100011 | c |
| 100 | 64 | 01100100 | d |
| 101 | 65 | 01100101 | e |
| 102 | 66 | 01100110 | f |
| 103 | 67 | 01100111 | g |
| 104 | 68 | 01101000 | h |
| 105 | 69 | 01101001 | i |
| 106 | 6A | 01101010 | j |
| 107 | 6B | 01101011 | k |
| 108 | 6C | 01101100 | l |
| 109 | 6D | 01101101 | m |
| 110 | 6E | 01101110 | n |
| 111 | 6F | 01101111 | o |
| 112 | 70 | 01110000 | p |
| 113 | 71 | 01110001 | q |
| 114 | 72 | 01110010 | r |
| 115 | 73 | 01110011 | s |
| 116 | 74 | 01110100 | t |
| 117 | 75 | 01110101 | u |
| 118 | 76 | 01110110 | v |
| 119 | 77 | 01110111 | w |
| 120 | 78 | 01111000 | x |
| 121 | 79 | 01111001 | y |
| 122 | 7A | 01111010 | z |
| 123 | 7B | 01111011 | { |
| 124 | 7C | 01111100 | | |
| 125 | 7D | 01111101 | } |
| 126 | 7E | 01111110 | ~ |
Patterns that make the table easy to remember
- Digits 0-9 occupy 48-57. A digit's value is its code minus 48: the character 7 has code 55, and 55 - 48 = 7.
- Uppercase A-Z occupies 65-90; lowercase a-z occupies 97-122. Within those 26 letter pairs, lowercase = uppercase + 32.
- Only one bit changes between letter cases: bit 5, counting from bit 0, has value 32. A = 65 = 01000001; a = 97 = 01100001. This rule applies to ASCII letters, not arbitrary characters.
- Space is 32; DEL is 127. Space belongs to the printable range; DEL is a control code.
- Punctuation and symbols fill four gaps: 33-47, 58-64, 91-96 and 123-126.
Control characters 0-31 and 127
These 33 codes describe controls rather than printable letters, digits or symbols.
Practical codes to recognize include HT 9 for horizontal tabulation, LF 10 for line feed, CR 13 for carriage return, ESC 27 for escape sequences and DEL 127 for delete; their roles are described in RFC 20 and Wikipedia's ASCII control-character overview.
| Dec | Hex | Abbr | Name |
|---|---|---|---|
| 0 | 00 | NUL | Null |
| 1 | 01 | SOH | Start of Heading |
| 2 | 02 | STX | Start of Text |
| 3 | 03 | ETX | End of Text |
| 4 | 04 | EOT | End of Transmission |
| 5 | 05 | ENQ | Enquiry |
| 6 | 06 | ACK | Acknowledge |
| 7 | 07 | BEL | Bell |
| 8 | 08 | BS | Backspace |
| 9 | 09 | HT | Horizontal Tab |
| 10 | 0A | LF | Line Feed |
| 11 | 0B | VT | Vertical Tab |
| 12 | 0C | FF | Form Feed |
| 13 | 0D | CR | Carriage Return |
| 14 | 0E | SO | Shift Out |
| 15 | 0F | SI | Shift In |
| 16 | 10 | DLE | Data Link Escape |
| 17 | 11 | DC1 | Device Control 1 |
| 18 | 12 | DC2 | Device Control 2 |
| 19 | 13 | DC3 | Device Control 3 |
| 20 | 14 | DC4 | Device Control 4 |
| 21 | 15 | NAK | Negative Acknowledge |
| 22 | 16 | SYN | Synchronous Idle |
| 23 | 17 | ETB | End of Transmission Block |
| 24 | 18 | CAN | Cancel |
| 25 | 19 | EM | End of Medium |
| 26 | 1A | SUB | Substitute |
| 27 | 1B | ESC | Escape |
| 28 | 1C | FS | File Separator |
| 29 | 1D | GS | Group Separator |
| 30 | 1E | RS | Record Separator |
| 31 | 1F | US | Unit Separator |
| 127 | 7F | DEL | Delete |
Examples With Real Output
Every output is computed by the same codec as the tool. Quoted, escaped views expose spaces and control characters; quotes and escape notation are display aids.
Text to decimal: Hello
Encode · typical · Separator: Space
- Input (escaped)
- "Hello"
- Output
- 72 101 108 108 111
Each ASCII letter becomes its decimal code. Spaces separate the five numbers.
Decimal to ASCII: Hello
Decode · typical
- Input (escaped)
- "72 101 108 108 111"
- Output
- Hello
- Output (escaped)
- "Hello"
The decoder reads five decimal groups and joins their characters into Hello.
Comma separator: Hi!
Encode · typical · Separator: Comma
- Input (escaped)
- "Hi!"
- Output
- 72, 105, 33
The Comma option inserts a comma followed by a space. The exclamation mark is code 33.
Uppercase, space and lowercase
Encode · typical · Separator: Space
- Input (escaped)
- "A a"
- Output
- 65 32 97
A is 65, space is 32 and a is 97. For ASCII letters, lowercase = uppercase + 32.
Digit characters: 2026
Encode · typical · Separator: Space
- Input (escaped)
- "2026"
- Output
- 50 48 50 54
Digit characters have codes 48-57. The digit value is its code minus 48; the character 0 has code 48, not code 0.
A line feed between letters
Encode · typical · Separator: Space
- Input (escaped)
- "a\nb"
- Output
- 97 10 98
The input contains an LF newline, code 10. It is a control character, not a printable letter or symbol.
Beyond ASCII: 128 and 233
Decode · boundary
- Input (escaped)
- "128 233"
- Output
- é
- Output (escaped)
- "\u0080é"
Both values are outside 7-bit ASCII (0-127). The tool treats them as Unicode code points: U+0080, a non-printing control, followed by U+00E9 (é). The escaped view makes the first character visible.
An accented character: é
Encode · boundary · Separator: Space
- Input (escaped)
- "é"
- Output
- 233
é is U+00E9 = 233, outside ASCII. Its single UTF-16 code unit has the same value as its Unicode code point.
Emoji encoding uses two UTF-16 units
Encode · limit · Separator: Space
- Input (escaped)
- "😀"
- Output
- 55357 56832
charCodeAt reads the two UTF-16 surrogate units, 55357 and 56832, rather than the single Unicode code point 128512. These are not ASCII codes. Decoding this pair does restore 😀 in this tool, as the next example shows.
The surrogate pair does round-trip here
Decode · pitfall
- Input (escaped)
- "55357 56832"
- Output
- 😀
- Output (escaped)
- "😀"
String.fromCodePoint produces a surrogate unit for each number; joining them reconstructs the valid pair and the emoji. The real result is 😀, not two replacement characters. Decoding 128512 also gives 😀, but encoding it again gives the two unit values.
None separator loses the number boundaries
Encode · pitfall · Separator: None
- Input (escaped)
- "Hello"
- Output
- 72101108108111
None concatenates all five codes. It stores no information about where one number ends and the next begins; decoding this output does not return Hello.
Decoding the output of None
Decode · pitfall
- Input (escaped)
- "72101108108111"
- Output
- ��
- Output (escaped)
- "��"
The /\d{1,7}/g parser extracts 7210110 and 8108111. Both exceed 0x10FFFF (1114111), so each becomes U+FFFD: the result is ��. Use spaces or commas to keep code boundaries.
Decimal ASCII Reference Table
| Character | Decimal | Hex | Typical Use |
|---|---|---|---|
| A | 65 | 41 | Uppercase letter |
| a | 97 | 61 | Lowercase letter |
| 0 | 48 | 30 | Digit zero |
| 32 | 20 | Space | |
| LF | 10 | 0A | Newline control code |
| @ | 64 | 40 | Email and shell symbol |
History and Context
The American Standards Association published ASCII's first edition in 1963, as Wikipedia's ASCII history records. The standard underwent a major revision in 1967.
RFC 20, dated October 16, 1969, describes ASCII for network interchange and proposes carrying its seven bits in an eight-bit byte with the high bit set to zero.
Common Use Cases
- Checking decimal character codes while learning programming fundamentals.
- Debugging delimited text streams, control characters, and legacy data exports.
- Preparing classroom examples that compare decimal, binary, octal, and hexadecimal representations.
Authoritative References
The original network ASCII specification from the IETF archive.
Overview of ASCII history, control characters, and modern compatibility.
Definition of code points, useful when comparing classic ASCII with modern Unicode values.
Frequently Asked Questions
Why would someone use decimal ASCII instead of hex or binary?
Decimal, hexadecimal and binary write the same character code in different bases. For example, A is decimal 65, hex 41 and binary 01000001. Use decimal when your input or reference lists base-10 numbers.
Does this tool only work for standard ASCII?
No. ASCII covers 0-127, but this tool encodes each UTF-16 code unit with charCodeAt and decodes decimal groups as Unicode code points. The decoder extracts groups of 1-7 digits; values above 1114111 (0x10FFFF) become U+FFFD. For example, 233 decodes to é, which is not ASCII.
What is the decimal value for a newline?
Line feed (LF) is decimal 10 and carriage return (CR) is decimal 13. An LF newline encodes as 10; a CR followed by LF encodes as 13 10 with the Space separator.
Is decimal ASCII encryption?
No. It represents character codes as decimal numbers without a secret key. Separated ASCII codes can be decoded directly back into the original text.
How many characters are in ASCII?
ASCII has 128 codes, numbered 0-127. There are 95 printable characters at 32-126, including space, and 33 control codes at 0-31 and 127 (DEL).
What is the difference between ASCII, extended ASCII, Latin-1 and Unicode?
ASCII is a 7-bit character set with codes 0-127. Extended ASCII is an umbrella term for different 8-bit extensions, not one universal mapping. Latin-1 (ISO-8859-1) is one such encoding. Unicode includes ASCII at the same code points and represents many more characters. This tool uses JavaScript UTF-16 units on encode and Unicode code points on decode; it does not select a legacy byte encoding.
Why is lowercase equal to uppercase plus 32 in ASCII?
For the 26 ASCII letter pairs, uppercase codes 65-90 and lowercase codes 97-122 differ only in bit 5 (counting from bit 0), whose value is 32. A = 65 = 01000001 and a = 97 = 01100001. Adding 32 converts an uppercase ASCII letter to its lowercase partner; this is not a general rule for other characters.
What are the decimal codes for space, 0, A, a and DEL?
Space is 32, the digit character 0 is 48, uppercase A is 65, lowercase a is 97 and DEL is 127. Digit characters span 48-57, so subtracting 48 from a digit character code gives its numeric value.
Why does an emoji give two numbers in this tool?
The encoder uses charCodeAt on each UTF-16 code unit. 😀 has the surrogate units 55357 and 56832, so it produces two numbers instead of its single Unicode code point 128512. Decoding 55357 56832 does restore 😀: the decoder joins those units into a valid surrogate pair. Decoding 128512 also gives 😀. Neither representation is ASCII.
Why does the None separator not round-trip reliably?
Without separators, variable-length codes lose their boundaries. Hello becomes 72101108108111. The decoder takes groups of up to 7 digits, so it reads 7210110 and 8108111. Both exceed 1114111 (0x10FFFF) and become U+FFFD, producing �� instead of Hello. Use spaces, commas, tabs or line breaks between codes.
Compare representations with the ASCII converter, Binary encoder, Hex encoder and Octal ASCII converter.