Text to Decimal Converter (ASCII Codes)

H
72
72
i
105
105

decimal

Show the working for decimal → text

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 takes one code value from the 0–127 table and writes that number in decimal, padded to 2 digits so every code is the same width.

  1. Read the code value. This example uses 72.
  2. Convert the number to decimal: 72 is 72.
  3. Pad it on the left to 2 digits: 72.
  4. Repeat for every code in the list and separate them 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.

Text to Decimal Conversion Table
DecCharHexOctBin
65A4110101000001
72H4811001001000
97a6114101100001
98b6214201100010
100d6414401100100
101e6514501100101
102f6614601100110
103g6714701100111
105i6915101101001
106j6A15201101010
110n6E15601101110
111o6F15701101111
114r7216201110010
116t7416401110100

The base this page writes, defined by the digits it uses, how a value is marked, and what each position is worth.

Base reference
BaseRadixDigits PrefixPlace worthTypical range
Decimal100–9 none10ⁿ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".

H
72
72
i
105
105

decimal

Result: Hi = 72 105

Start with the code itself: 72. The table gives one row per code from 0 to 127, and that row is the whole answer — there is no arithmetic to get wrong, only a row to find. Reading the row across gives the same value in every base the table carries.

The row gives 72 directly. Nothing is padded and nothing is rounded, so a code either has a row or it is out of range — and the converter says which. That is the difference between a lookup and a calculation, and it is why the answer here can be checked by eye against the table above.

Check it in reverse

The value looks the same read backwards. 72 maps to code 72, and code 72 maps to 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 code 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: code 97 written in decimal is 97.

Load this value in the converter

What is A in decimal?

Text A is 65 in decimal.

Method: code 65 written in decimal is 65.

Load this value in the converter

What is e in decimal?

Text e is 101 in decimal.

Method: code 101 written in decimal is 101.

Load this value in the converter

What is b in decimal?

Text b is 98 in decimal.

Method: code 98 written in decimal is 98.

Load this value in the converter

What is d in decimal?

Text d is 100 in decimal.

Method: code 100 written in decimal is 100.

Load this value in the converter

What is f in decimal?

Text f is 102 in decimal.

Method: code 102 written in decimal is 102.

Load this value in the converter

What is t in decimal?

Text t is 116 in decimal.

Method: code 116 written in decimal is 116.

Load this value in the converter

What is g in decimal?

Text g is 103 in decimal.

Method: code 103 written in decimal is 103.

Load this value in the converter

What is j in decimal?

Text j is 106 in decimal.

Method: code 106 written in decimal is 106.

Load this value in the converter

What is n in decimal?

Text n is 110 in decimal.

Method: code 110 written in decimal is 110.

Load this value in the converter

What is r in decimal?

Text r is 114 in decimal.

Method: code 114 written in decimal is 114.

Load this value in the converter

What is o in decimal?

Text o is 111 in decimal.

Method: code 111 written in decimal is 111.

Load this value in the converter

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, because this converter is not capped to ASCII. 233 is é and 8364 is €. all 128 ASCII codes and their characters lists the codes that ASCII itself defines.

Which base the code is written in

The same code can be typed as decimal, hex, octal or binary, and the base selector says which one you mean. 65, 41, 101 and 01000001 are all the letter A. Pick the wrong base and you look up 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 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 code values and return their decimal form.

Python: ' '.join(str(b) for b in s.encode('utf-8'))
JavaScript: [...new TextEncoder().encode(s)].join(' ')

Common Mistakes

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.

The rest of the family sits on back to the binary converter.