Unicode Unescape
Decode \uXXXX, \u{XXXXX}, and \xHH escape sequences back to their original characters.
0 characters
0 characters
About Unicode Unescape
This is the reverse of unicode escape. JavaScript-style escapes — \uXXXX (4-hex BMP), \u{XXXXX} (any code point), \xHH (1-byte) — are all converted back to the corresponding character. Other text is left alone.
When to use it
- Reading machine-generated strings that escape non-ASCII
- Recovering Unicode from a log file that ASCII-escaped its content
- Converting JavaScript source code back to a human-readable form
How it works
Three regex passes run in order: \u{...} first (variable-length code points), then \uXXXX (4-hex BMP characters), then \xHH (1-byte). The matches are replaced via String.fromCodePoint / fromCharCode.
Examples
caf\u00e9 \u{1f389}café 🎉
Frequently asked questions
- Are surrogate pairs handled?
- Yes. Two consecutive \uXXXX escapes that form a valid surrogate pair decode into the correct astral-plane character — JavaScript's String constructor handles them automatically.
- What about other escape sequences?
- Only \u, \u{...}, and \x escapes are decoded. Standard backslash escapes like \n, \t, \r are left as-is. Use JSON.parse for full JSON-style unescaping.