Skip to content

Unicode Escape and Unescape

Turns non-ASCII characters into \uXXXX escapes for code, or turns escapes back into readable text.

Mode
0 characters

What is Unicode Escape and Unescape?

Source code and JSON files sometimes need characters written as escape codes like \u00e9 instead of รฉ, so that the file only contains plain ASCII.

What this tool does

In escape mode it replaces every character above ASCII with a \u code (emoji become two codes, a surrogate pair). In unescape mode it reads \uXXXX and \u{XXXXX} codes and turns them back into characters.

How to use it

  1. Choose escape or unescape.
  2. Paste your text.
  3. Copy the result into your code.

Did you know?

  • JavaScript and JSON use the same \uXXXX format, so the output works in both.
  • Characters beyond the first 65,536 in Unicode, such as many emoji, need two escapes.

More tools in this category