100% local — your data never leaves your browser

JavaScript Unescape — Read a Literal From a Bundle

Decode a JavaScript string literal back to plain text: named escapes, \uXXXX, \u{...}, \xNN and surrogate pairs all come back as characters.

Instant Private Zero cookies

JS Escaped input

Text output

What this tool does

It reads the contents of a string literal and returns the text they stand for. The named escapes \n, \r, \t, \b, \f, \v and \0 become their characters. \uXXXX, the code point form \u{1F600} and the hex form \xNN are decoded. A surrogate pair written out as \ud83d\ude00 is recomposed into the one character it encodes.

Anything else after a backslash comes back as the bare character: \q gives q, \\ gives one backslash, \" gives a quote. That is the JavaScript rule itself rather than a fallback — an unrecognised escape is defined to be the character that follows it.

When you need it

A string pulled out of a minified bundle, a log line or a stack trace, where the escaping has stacked up and you want to read what it actually says. Also for a translation file or a config value that went through one encoding step too many.

What it does not do

It decodes one literal’s contents, not a JavaScript expression. Paste what sits between the quotes: nothing is concatenated, and nothing is evaluated.

Legacy octal escapes are decoded, because a non-strict engine decodes them: \101 gives A, \012 a line feed. Seeing one tells you something about the source, though — the form is a syntax error in strict mode and in template literals, so a literal that uses it came from old code.

Private by design

Everything runs locally in your browser with JavaScript. Your data is never uploaded, which makes the tool safe for sensitive content, and it keeps working offline.

Frequently asked questions

Should I include the surrounding quotes?
No — paste what sits between them. Quotes left in the input are treated as ordinary characters and come back unchanged.
Why did `\q` become `q`?
Because that is what JavaScript itself does with an escape it does not recognise: the backslash is dropped and the next character is kept. The tool does not invent a control character for it.
Do emoji survive the round trip?
Yes. A surrogate pair such as `\ud83d\ude00` is recomposed into the single character it encodes, and the code point form `\u{1F600}` decodes to the same emoji.

Related converters