developers.do

Unicode Escape / Unescape

Convert text to \\uXXXX / \\u{XXXXX} Unicode escapes and back, with support for surrogate pairs and standard JSON-style escapes

Hello, \u4e16\u754c! \u{1f30d} Caf\u00e9 \u2014 na\u00efve\u000aNew line.
Hello, 世界! 🌍 Café — naïve
New line.

Unescape handles \uXXXX, \u{XXXXX}, \xXX,\n \t \r \b \f \0 \\ \" (JSON-style). Emoji and other supplementary-plane characters are encoded as surrogate pairs or the ES6 braced form depending on the option.