Text to ASCII

Convert text to code points in any notation, and decode them back again.

Output updates as you type.


Result will appear here.

Character breakdownFirst 60 characters

Features

  • Six output notations including JS and HTML escapes
  • Decodes every notation back to text
  • Per-character table with code point, hex and UTF-8 length
  • Correct handling of emoji and astral-plane characters
  • Custom separator between values

How to use it

  1. Choose whether you are encoding or decoding.
  2. Type or paste your input.
  3. Pick the notation you need.
  4. Copy the result or study the breakdown table.

ASCII, Unicode and the difference between them

ASCII defines 128 characters numbered 0 to 127, the English alphabet, digits, common punctuation and a set of control codes. It was designed for teleprinters in the early 1960s, which is why it contains oddities like the bell character and why carriage return and line feed are separate. Everything in that range still has the same number today, which is why ASCII text is valid in essentially every encoding in use.

Unicode extends that to over 150,000 characters covering every living script, historical alphabets, mathematical symbols and emoji. A Unicode code point is written U+ followed by hex, so U+0041 is the letter A and U+1F30D is the Earth globe emoji. Code points above U+FFFF are the astral planes, and they are where naive string handling falls over.

The distinction that causes most bugs is between code points and encoded bytes. UTF-8 stores a code point in one to four bytes, ASCII characters take one, most European accented letters two, most CJK characters three, and emoji four. JavaScript strings, meanwhile, are UTF-16, storing astral characters as two 16-bit surrogates. So a single emoji has one code point, four UTF-8 bytes, and a JavaScript .length of 2. The table below shows all three so the discrepancy is visible.

Frequently asked questions

Yes, completely. Text to ASCII is free with no usage limits, no account and no sign-up. There is no paid tier and no trial that expires. Tools marked Premium on this site carry that label to indicate a deeper feature set, not a price.
Text to ASCII covers six output notations including JS and HTML escapes, decodes every notation back to text, per-character table with code point, hex and UTF-8 length, among other things. Everything is available immediately with no account, no sign-up and no usage limit.
ASCII defines 128 characters numbered 0 to 127, the English alphabet, digits, common punctuation and a set of control codes. It was designed for teleprinters in the early 1960s, which is why it contains oddities like the bell character and why carriage return and line feed are separate. Everything in that range still has the same number today, which is why ASCII text is valid in essentially every encoding in use.
Everything happens inside your browser. The text you enter is processed by JavaScript running on your own device and is never sent to a server, there is no backend to send it to. You can confirm this in your browser's Network tab while you use the tool. Because nothing depends on a server, the tool also keeps working offline once the page has loaded, the site registers a service worker that caches it after your first visit.

Related tools

Further reading

πŸ“– What Is ASCII? Converting Text to Character Codes

Read the full guide on the 123MiniApps blog.

Pick a theme

Ten hand-tuned palettes.