Skip to main content
FixLines

Unicode escape and unescape

Turn non-ASCII characters into \u escapes, or back.

Editor

Ln 1, Col 10 lines0 words0 characters

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

  1. Paste your text, or the escaped string.
  2. Choose Unicode escape or Unicode unescape.
  3. 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

Escape an accented word

Input

café 😀

Result

caf\u00e9 \ud83d\ude00
Unescape it again

Input

caf\u00e9 \ud83d\ude00

Result

café 😀
Escape text with an emoji flag

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.

Tools people often use together with this one.

More in Encode & decodeBrowse all text tools