Unicode Escape Decoder
Decode Unicode escapes.
About this tool
Both \uXXXX and \u{XXXX} forms are accepted.
A truncated escape is rejected.
How to use it
- Open this page and provide the input it asks for.
- Set the options that are visible, then use Decode escapes.
- Read the result in the panel. Copy it or download it when a file is offered. The input stays in this browser.
Limitations
- A truncated escape is rejected.
Recognized escapes are replaced, the rest stays
Two patterns, no exception for ordinary leftovers
The decoder first replaces a backslash, a u, a brace, hex digits, and a closing brace, using the hex as a Unicode code point. The second pass rewrites each \uXXXX sequence into a BMP unit. Text that matches neither pattern is copied, including a bare backslash, a quote, or a broken sequence such as a backslash and a u with only three hex digits. The function does not throw because a sequence was almost an escape. It throws only if a brace form names a code point fromCodePoint rejects. The four-digit form uses fromCharCode, so it always yields a unit for any four hex digits, including values in the surrogate range.
That is a different failure style from the encoder. The encoder accepts ordinary text without raising. It also does not look for escapes. It only decides whether each code point is ASCII. This page looks for escapes and is silent when it finds none. An input with no escapes comes back unchanged, which can look like a no-op rather than an error.
Round-trip losses
Output from the encoder decodes back for characters the encoder actually escaped. ASCII that the encoder preserved comes back as ASCII, except where that ASCII formed an escape the decoder consumes. A backslash the encoder left in place is data to the encoder and syntax to this page. Decoding a string the encoder just wrote is safe only when the original had no embedded escape spelling. The other direction, decoding and then encoding, turns non-ASCII characters into escapes and leaves ASCII, so a brace-form emoji becomes a brace-form escape again. A four-digit escape of a non-ASCII character becomes a four-digit escape again. A character that decoded from a surrogate pair is a separate case: the encoder would emit a single brace form for a character above 65535, not two unit escapes.
Not a JavaScript parser
Quotes, newlines, and other backslash letters such as n or t are not interpreted. \n in the box stays a backslash and an n, not a newline, unless you typed a real newline. The page is not eval, and it is not a JSON string parser. It does not decode percent escapes or HTML entities. Those have their own pages, with their own failure rules. A successful unescape is still only a representation change.
Privacy
Your input is processed in your browser and is not uploaded to UtilChain. File names, text, and results are not sent to analytics.

