Unicode Escape / Unescape
Escape text to \uXXXX, \UXXXXXXXX, or HTML entity form, and unescape it back to readable characters.
About this tool
The Unicode Escape / Unescape tool converts readable text into escaped Unicode codepoint notation, and reverses escaped sequences back into their original characters. This is essential when working with JSON strings, JavaScript/Java/Python source containing non-ASCII literals, log files that escape non-printable characters, or debugging mangled encoding.
Three output formats are supported: the common \uXXXX form (4 hex digits, used by JSON and most languages — astral characters like emoji are automatically split into a UTF-16 surrogate pair), the \UXXXXXXXX form (8 hex digits, used by Python and C-family languages for any codepoint without surrogate pairs), and the HTML numeric entity form (&#xXXXX;).
An "escape only non-ASCII" toggle lets you leave plain ASCII characters untouched and only escape the characters that would actually cause encoding trouble. Turn it off to escape every character, including ASCII.
Unescaping auto-detects and handles \uXXXX sequences (including merging valid surrogate pairs back into a single emoji or astral character), \UXXXXXXXX sequences, and HTML entities in the same input. Everything runs locally — no server round-trip.
