Text to Decimal Converter (ASCII Codes)
This converter works on code values, one at a time, from the table. Codes are not capped, so values above 127 are accepted. For whole text rather than single codes, use Text to Binary; for codes capped to 0 to 127, use Text to ASCII.
Going the other way? Convert decimal back to text →
How do you convert text to decimal?
Text to decimal conversion replaces each character with its Unicode code point written in decimal; 0 to 127 match the ASCII table, and every other character has a larger number.
"Hi" is decimal 72 105. Replace each character with its Unicode code point written in decimal: H is 72 and i is 105, the same as their ASCII codes, while é is 233.
- Take the first character and find its code point in the table: H is 72.
- Write the code as a plain decimal number, with no leading zeros.
- Repeat for every character, spaces included, and separate the codes with a single space: Hi = 72 105.
Text to Decimal Conversion Table
The codes this page works through, each with the character it stands for and the same value in hex, octal and binary. Find the code in the first column and read across; the row is the whole conversion. Codes 0 to 31 and 127 have no glyph, so the Char column shows their short name instead. This page writes one unpadded decimal code point per character, single space between codes. This page shows the rows you need; ASCII code chart (decimal, hex, octal, binary) carries all 128.
| Dec | Char | Hex | Oct | Bin |
|---|---|---|---|---|
| 65 | A | 41 | 101 | 01000001 |
| 72 | H | 48 | 110 | 01001000 |
| 97 | a | 61 | 141 | 01100001 |
| 98 | b | 62 | 142 | 01100010 |
| 100 | d | 64 | 144 | 01100100 |
| 101 | e | 65 | 145 | 01100101 |
| 102 | f | 66 | 146 | 01100110 |
| 103 | g | 67 | 147 | 01100111 |
| 105 | i | 69 | 151 | 01101001 |
| 106 | j | 6A | 152 | 01101010 |
| 110 | n | 6E | 156 | 01101110 |
| 111 | o | 6F | 157 | 01101111 |
| 114 | r | 72 | 162 | 01110010 |
| 116 | t | 74 | 164 | 01110100 |
The base this page writes, defined by the digits it uses, how a value is marked, and what each position is worth.
| Base | Radix | Digits | Prefix | Place worth | Typical range |
|---|---|---|---|---|---|
| Decimal | 10 | 0–9 | none | 10ⁿ | any; decimal pages treat 0–255 as the byte range |
Worked Example: Hi to Decimal
One code value, taken from the table and written out in full. This is the same working the converter shows when you turn on "show steps".
Result: Hi = 72 105
Take the first character, H. Its row in the ASCII table is 72, which is also its Unicode code point. Decimal codes are written as they are, with no padding: 72.
Every other character is looked up the same way: i is 105. The codes are joined in the order the characters were typed, one space apart. A character past the table still has a number: é is 233, its Unicode code point.
Check it in reverse
Read it back and you arrive where you started: code 72 is the letter H. The table is a two-way lookup, not a calculation, so no rounding or padding can change the answer. To verify the result by hand, convert the decimal codes back to characters and compare it with the value you started from.
Worked examples: text to decimal
Each example gives the value first, then the working. Click a value to load it in the converter.
What is a in decimal?
Text a is 97 in decimal.
Method: a is code 97 in the table.
What is A in decimal?
Text A is 65 in decimal.
Method: A is code 65 in the table.
What is e in decimal?
Text e is 101 in decimal.
Method: e is code 101 in the table.
What is b in decimal?
Text b is 98 in decimal.
Method: b is code 98 in the table.
What is d in decimal?
Text d is 100 in decimal.
Method: d is code 100 in the table.
What is f in decimal?
Text f is 102 in decimal.
Method: f is code 102 in the table.
What is t in decimal?
Text t is 116 in decimal.
Method: t is code 116 in the table.
What is g in decimal?
Text g is 103 in decimal.
Method: g is code 103 in the table.
What is j in decimal?
Text j is 106 in decimal.
Method: j is code 106 in the table.
What is n in decimal?
Text n is 110 in decimal.
Method: n is code 110 in the table.
What is r in decimal?
Text r is 114 in decimal.
Method: r is code 114 in the table.
What is o in decimal?
Text o is 111 in decimal.
Method: o is code 111 in the table.
Every example above reverses exactly — read the same code values back as characters.
What Changes the Code Output?
Values above 127
Values above 127 are accepted here as Unicode code points, because this converter is not capped to ASCII: 233 is é and 8364 is €. The codes ASCII itself defines are listed in the ASCII table.
Which base the code is written in
The same code can be written in decimal, hex, octal or binary: 65, 41, 101 and 01000001 are all the letter A. This page writes decimal only, so a code in another base names a different row.
Control codes and printable codes
Codes 32 to 126 are printable characters; 0–31 and 127 are control codes. A control code has no glyph, so the table shows its short name instead — 10 is LF, 13 is CR. Converting one is valid; displaying one is not.
One code or a list
Several codes separated by spaces, commas or new lines convert as a list, in order, and each keeps its own row. The separator is a display choice and does not change any value.
Text to Decimal in Code
The same rule in one line. Both take a string and return one decimal code per character.
Python: ' '.join(str(ord(c)) for c in s) JavaScript: [...s].map(c => c.codePointAt(0)).join(' ') Common Mistakes
- Typing a code instead of text. Here 72 is read as the characters 7 and 2, codes 55 and 50, not as code 72. For codes capped at 0–127, use convert text to ASCII code.
- Reading a code in the wrong base. 41 is A in hex and ) in decimal.
- Pasting UTF-8 byte values where code points belong: 195 169 reads as é, not é. The converter says what the bytes would have spelled.
- Joining decimal codes with no separator. 72105 is one number, not 72 and 105, because decimal codes have no fixed width.
Frequently Asked Questions
What is the decimal value of a character outside ASCII, such as é?
é is 233, € is 8364, and 😀 is 128512. é is U+00E9 and encodes as C3 A9 (2 bytes); € is U+20AC and encodes as E2 82 AC (3 bytes); 😀 is U+1F600 and encodes as F0 9F 98 80 (4 bytes).
Is text to decimal the same as text to ASCII?
Almost. Both give one number per character, but this page is not capped at 127, so é comes out as 233 where text to ASCII reports it out of range. ASCII defines 128 characters, codes 0–127, using 7 bits; in practice each code is stored in one 8-bit byte with a leading 0.
How do you convert text to decimal in Python?
ord(c) gives one character's code, so [ord(c) for c in s] gives the list: Hi is 72 105. The one-liner under Text to Decimal in Code joins them with single spaces.
Every code here reverses: the same value converts straight back in the decimal code to character direction.
Related Conversions
The rest of the family sits on back to the binary converter.