Skip to content
Jellykit

Text to ASCII Codes

List the decimal code of every character in your text, such as 72 105 for Hi, and turn a list of codes back into text.

  • Runs on your device
Loading tool

About Text to ASCII Codes

Get the number behind each character: H is 72, a space is 32, a new line is 10. Codes come out in decimal, one per character, separated by spaces, commas or new lines, ready for a spreadsheet, an exercise or a char() call.

Characters beyond ASCII get their Unicode code point, which for the first 128 characters is the same as the ASCII code: é is 233 and 😀 is 128512. Prefer byte values? Set "One number per" to UTF-8 byte. Switch the direction to turn a list of codes back into text.

How it works

  1. Your text is encoded as UTF-8, the encoding used by the web and most files, so plain English letters take one byte and other characters take two to four.
  2. Each byte is written in the base you choose, padded to a fixed width (two hex digits, eight binary digits, three octal digits) so the output can be read back even without separators.
  3. With "One number per: Character" each character becomes its Unicode code point instead, so an emoji is one number rather than four bytes.
  4. Reading numbers back, the tool ignores separators and common prefixes, checks every value, and decodes the bytes as UTF-8, reporting where any invalid sequence starts.

Questions

What code does a character outside ASCII get?

Its Unicode code point. ASCII only defines codes 0 to 127; Unicode keeps those and continues beyond, so é is 233 and 😀 is 128512. Pure ASCII text gives exactly the ASCII codes.

How do I turn codes back into text?

Switch the direction to "Numbers to text" and paste the codes separated by spaces, commas or new lines. Each must be a whole number no higher than 1114111, the last Unicode code point.

Is the emoji code the same as charCodeAt in JavaScript?

No. charCodeAt returns UTF-16 code units, which splits an emoji into two numbers. This tool gives the single code point, the same as codePointAt.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.