ASCII to Decimal Converter – Free

This ASCII to decimal converter lists the decimal code of every character in your text, in order. Codes are separated by spaces, and the work happens in your browser.

How to use the ASCII to Decimal tool

  1. Enter text in the ASCII text box. Select Example if you want to try ABC first.
  2. Select Convert to look up the codes.
  3. Read the decimal codes in the Result box, one number per character in the original order.
  4. Use Copy to take the list to your clipboard, or Clear to reset the page.

What ASCII to decimal conversion gives you

Every ASCII character has a code number between 0 and 127. This tool prints that number in base 10 for each character you enter. The text ABC becomes 65 66 67. Numbers are written without leading zeros, so a tab is 9, a space is 32 and a lowercase z is 122.

Decimal is the form most programming languages hand back when you ask for a character's code. JavaScript's charCodeAt, Python's ord and a cast from char to int in C all return these same values for ASCII text.

The layout of the ASCII table in decimal

The table is easier to remember as a handful of ranges than as 128 separate entries.

  • 0 to 31: control codes, including 9 for tab, 10 for line feed and 13 for carriage return.
  • 32: the space character.
  • 48 to 57: the digits 0 through 9.
  • 65 to 90: uppercase A through Z.
  • 97 to 122: lowercase a through z.
  • 33 to 47, 58 to 64, 91 to 96 and 123 to 126: punctuation and symbols.
  • 127: the delete control code.

Worked example with punctuation and a space

Take the text Hello, World. It has twelve characters, so the result has twelve numbers. The comma is 44 and the space after it is 32. Uppercase H and W fall in the 65 to 90 range, and the lowercase letters are all above 96.

Hello, World
72 101 108 108 111 44 32 87 111 114 108 100

Character arithmetic with decimal codes

Seeing the codes as plain numbers makes common tricks obvious. A lowercase letter is always 32 more than its uppercase form, so 97 minus 65 is the same gap as 122 minus 90. Subtracting 48 from a digit character gives its numeric value: the character 7 is code 55, and 55 minus 48 is 7.

Sorting works on the same numbers. A plain byte-order sort puts all uppercase letters before all lowercase ones because 90 is less than 97, and it puts digits before both. If a sorted list looks wrong, checking the codes here usually explains why.

Input rules and errors

Only ASCII is accepted. A character above 127, such as ñ or a curly apostrophe, stops the conversion with the message Enter ASCII characters only. Whitespace is kept exactly as typed, so each line break in the box appears as a control code in the list. There is no length cap in the code. To go the other way, paste the numbers into the ASCII to Text tool.

Frequently asked questions

What is the ASCII decimal code for a space?

The space character is code 32. It is the first code after the control range, and it appears in the output like any other number, so count the values if a word boundary seems to be missing.

What are the decimal codes for A to Z and a to z?

Uppercase A to Z are 65 to 90 and lowercase a to z are 97 to 122. Add 32 to an uppercase code to get the lowercase letter, or subtract 32 to go back.

Why do I see 10 or 13 in my result?

Codes 10 and 13 are line feed and carriage return, the characters that mark a line break. If your input spans several lines, each break is converted along with the visible characters. Put the text on one line if you only want the printable codes.

Does this tool support extended ASCII codes from 128 to 255?

No. Values above 127 are not part of ASCII. They belong to code pages such as Windows-1252 or ISO 8859-1, which do not all agree with each other. The tool rejects any character outside the 0 to 127 range.

Is the text I enter kept private?

Yes. The lookup runs in your browser with JavaScript. The page does not transmit the text or the resulting codes.

Related tools