Unicode Escape / Unescape

Unicode Escape / Unescape converts text to and from \uXXXX escape sequences. Paste your text and click Escape to encode non-ASCII characters, or Unescape to decode them back. All processing happens locally in your browser, and nothing is sent to a server.

Copied!

About Unicode Escaping

Unicode escaping represents characters as \uXXXX sequences using their code point in hexadecimal. It is widely used in JSON, JavaScript, Java and other languages to embed non-ASCII text such as Chinese, Japanese or emoji safely in source code and data.

Unicode escaping matters whenever you embed non-ASCII text in places that expect plain ASCII: JSON config files, Java properties files, JavaScript and CSS string literals, and database migration scripts. It is also a fast way to reveal invisible or look-alike characters hidden inside a string.

Escaping turns each character into its hexadecimal code-point form, optionally leaving plain ASCII untouched, while unescaping decodes those sequences, including astral code points and byte escapes, back into readable text. Surrogate pairs for emoji and rare CJK characters are handled correctly in both directions.

Frequently Asked Questions

What is a Unicode escape sequence?

It represents a character by its hexadecimal code point, the form used in JSON, JavaScript and Java to embed non-ASCII text safely in ASCII-only files.

Can it escape only non-ASCII characters?

Yes. By default it leaves plain ASCII untouched and escapes only characters above the ASCII range, which keeps the output readable. You can turn this off to escape everything.

Does it handle emoji and CJK characters?

Yes. The surrogate pairs used by emoji and rare Chinese, Japanese and Korean characters are encoded and decoded correctly in both directions.