Unicode escape and unescape
Turn non-ASCII characters into \u escapes, or back.
Editor
Unicode escape and unescape: what it does
JSON files, JavaScript strings and many APIs write accented letters and emoji as \uXXXX sequences. Escape your text to make it ASCII-only, or paste a string full of \u00e9-style codes and turn it back into readable characters.
Unicode escape and unescape: how to use it
- Paste your text, or the escaped string.
- Choose Unicode escape or Unicode unescape.
- Select Apply and copy the result.
Unicode escape and unescape: when to use it
- Write accented letters or emoji in a JSON file, a Java properties file or a source file that must stay ASCII.
- Read a string full of \u sequences copied from a log or an API response.
- Check which code point a strange character has.
Unicode escape and unescape: examples
Input
café 😀
Result
caf\u00e9 \ud83d\ude00
Input
caf\u00e9 \ud83d\ude00
Result
café 😀
Input
Hi 🇫🇷
Result
Hi \ud83c\uddeb\ud83c\uddf7
Unicode escape and unescape: questions and answers
How are emoji escaped?
Characters outside the basic plane become two \u codes (a surrogate pair), the same way JSON and JavaScript write them.
Does unescaping understand the braced form?
Yes. Both the four-digit form and the form with braces and up to six hexadecimal digits are accepted.
Are ASCII letters escaped too?
No. Letters, digits and ASCII punctuation stay readable; only characters outside ASCII become \u sequences.
Does it work for Python or JSON strings?
Yes. The four-digit \u form is understood by JSON, JavaScript, Java, Python and most other languages.
Is my text sent to a server?
No. Everything runs in your browser on your own device, so your text never leaves it.
Related tools
Tools people often use together with this one.
- Text to hex converter
Convert text to hexadecimal bytes, or hex back to text.
- HTML entities encode and decode
Escape text for HTML, or turn entities back into characters.
- Remove accents from text
Replace accented letters with plain ones, or drop non-ASCII characters.
- Base64 encode and decode
Convert text to Base64, or decode Base64 back to text.
- URL encode and decode
Percent-encode text for a URL, or decode it back.
- Text to binary converter
Convert text to binary code, or binary back to text.
- Morse code translator
Translate text to Morse code, or Morse back to text.