Unicode Escape / Unescape

About this tool

Escape converts every non-ASCII character to a \uXXXX Unicode escape sequence while leaving plain ASCII untouched — the format used in JavaScript, Java and JSON string literals. Characters outside the Basic Multilingual Plane (emoji, rare CJK) are iterated by code point, then written either as a UTF-16 surrogate pair (two \uXXXX) or, with the option enabled, as a single ES2015-style \u{XXXXX} escape.

Unescape decodes both \uXXXX and \u{XXXXX} forms back to readable text, correctly reassembling surrogate pairs. Everything runs locally in your browser — nothing is uploaded, so it is safe for private strings.

Related tools

Hex ConverterHTML EscapeBase64