Unicode Escape / Unescape

Convert text to \uXXXX Unicode escape sequences, or turn \uXXXX and \u{1F600} escapes back into readable characters. Handles emoji and surrogate pairs. Useful for reading escaped strings from JSON, JavaScript or Java source and logs. Works in your browser.

About this tool

What is a Unicode escape?

A Unicode escape writes a character as its code in hexadecimal, such as \u3042 for あ. JavaScript, JSON, Java and many other languages use this form so that any character can be written using plain ASCII. You often see it in API responses, log files and source code, where non-English text appears as a long run of \u sequences. This tool converts text to that notation and back, in a single editor.

How to use

  1. Type or paste text into the editor, or drop a text file onto it.
  2. Click Escape to replace every character with its \uXXXX code.
  3. Click Unescape to turn escape sequences in the editor back into characters.
  4. Use the buttons in the corner of the editor to copy, download, or view full screen.

Features

  • Escape: converts every character (including ASCII letters, spaces and line breaks) into a 4-digit \uXXXX sequence with lowercase hex digits
  • Characters outside the Basic Multilingual Plane, such as emoji, are written as a UTF-16 surrogate pair (😀 → 😀), the same as in JavaScript and JSON
  • Unescape: decodes \uXXXX (upper- or lowercase hex, surrogate pairs included) and the ES2015 code point form \u{1F600}
  • Text that is not an escape sequence is left unchanged when unescaping, so you can paste a whole line of JSON or code
  • Text file input and download

Examples

TextEscaped
Hi\u0048\u0069
あ\u3042
😀😀

When unescaping, \u{1F600} and 😀 both become 😀.

FAQ

Why does Escape also convert ASCII letters?

The tool escapes every character so the output is uniform and safe for any ASCII-only context. Unescape accepts mixed text, so caf\u00e9 becomes café.

Are other escapes like \n, \x41 or あ supported?

No. Only \uXXXX and \u{...} are decoded; other sequences are left as they are.

Is my text sent anywhere?

No. Conversion happens entirely in your browser.