Format Code Now
/

Convert Text to ASCII Codes

ED-37

Paste text to get the ASCII code of every character, in decimal, hexadecimal, binary or octal. A table view lists all four bases, and ASCII to text reverses it.

Runs in your browser. Nothing is uploaded.

Text, or ASCII codes for the reverse

Result

How to use it

  1. Paste your text into the input box.
  2. Pick the base for the codes and the separator.
  3. Click Text to ASCII for a line of codes, or Show table for one row per character.
  4. To go back, paste codes such as 72 101 108 and click ASCII to text.

What counts as ASCII

ASCII has 128 codes: 0 to 31 are control characters such as TAB (9) and LF (10), 32 is the space, 33 to 126 are printable characters and 127 is DEL. The letter A is 65, a is 97 and 0 is 48. A character like é or an emoji is not in ASCII. This tool still numbers it, by Unicode code point by default or by UTF-8 bytes if you choose that, and the table marks it as not ASCII.

Table and reverse conversion

Show table writes one row per character with its decimal, hex, binary and octal code and names control characters. ASCII to text reads numbers in the base you selected, separated by spaces, commas or semicolons, and reports the first value that is not a number in that base or is not a valid character. Windows-1252 and other extended code pages are not covered. To replace non-ASCII characters instead of numbering them, use the UTF-8 to ASCII tool.

Error messages and what to do

MessageWhat it meansFix
is above U+10FFFFA code is larger than the largest Unicode code point.Check the numbers and the base selected under Codes are.
No numbers foundThe input held no codes to convert.Paste codes such as 72 101 108 108 111.

Questions people ask

How do I convert text to ASCII?

Paste the text and click Text to ASCII. Each character is replaced by its code, so Hi becomes 72 105 in decimal. Change the base to get hex (48 69), binary or octal output.

What is the ASCII code of a letter or digit?

Capital letters run from 65 (A) to 90 (Z), lowercase from 97 (a) to 122 (z), and digits from 48 (0) to 57 (9). The table view shows the code of every character you paste, in four bases.

What happens to characters that are not ASCII?

They have no ASCII code. The tool gives their Unicode code point (é is 233) or their UTF-8 bytes (195 169), depending on the setting, and the table marks the row as not ASCII.

Can I convert ASCII codes back to text?

Yes. Choose the base the codes use, paste them separated by spaces or commas, and click ASCII to text. Hex values may start with 0x, binary values with 0b.

What is the difference between ASCII and Unicode?

ASCII is 128 characters. Unicode is a larger standard whose first 128 code points are the same as ASCII. UTF-8 stores those first 128 as single bytes, so plain English text has the same bytes in both.

About this tool

ASCII has 128 codes, 0 to 127. Text to ASCII writes the code of each character in the base you choose. Characters outside ASCII, such as accented letters, are not ASCII; by default they get their Unicode code point, or you can write their UTF-8 bytes instead. Show table lists decimal, hex, binary and octal for each character, names control characters such as LF and TAB, and marks anything above 127. To replace non-ASCII characters rather than number them, use the UTF-8 to ASCII tool on this site. Extended code pages such as Windows-1252 are not covered.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.