{ ILoveJS }

JavaScript String Unescape

Unescape JavaScript string escape sequences.

javascriptunescapestringdecode

What is JavaScript String Unescape?

The JavaScript String Unescape tool converts escaped JavaScript string sequences back into their original, human-readable form. When JavaScript strings are escaped — whether for transport, storage, logging, or embedding in code — they contain sequences like \n for newlines, \t for tabs, \uXXXX for Unicode characters, and \xXX for hex-encoded characters. This tool decodes all of those sequences in one click, giving you the clean, readable text underneath.

This is especially useful for developers who encounter escaped strings in API responses, log files, minified code, or serialized data and need to quickly understand what the string actually contains. Instead of mentally parsing backslash sequences or writing a throwaway script, you can paste the escaped string in and get the decoded output immediately — saving time and reducing the chance of misreading encoded content.

How to Use

Using the tool is straightforward: paste your escaped JavaScript string into the input field and the decoded output appears instantly. You do not need to include surrounding quotes — just the raw escaped content. For example, pasting Hello\nWorld\t! will produce Hello followed by a real newline, then World, a tab, and an exclamation mark. Unicode sequences like \u0048\u0065\u006C\u006C\u006F will correctly render as Hello.

The tool handles all standard JavaScript escape sequences: \n (newline), \r (carriage return), \t (tab), \ (literal backslash), ' and " (quotes), \0 (null character), \xXX (hexadecimal), and \uXXXX (Unicode code points). It also supports the extended \u{XXXXX} format introduced in ES6 for characters outside the Basic Multilingual Plane, such as emoji and rare Unicode symbols.

One edge case to be aware of: if your input contains sequences that are not valid JavaScript escape sequences, the tool will leave them as-is or flag them depending on the context — it will not silently corrupt your data. Also note that this tool decodes the escape sequences themselves; it is not a URL decoder or HTML entity decoder, so \u0026 will become & but %26 or & will remain unchanged. Use the appropriate companion tools for those formats.

Use Cases

Debugging API responses: When a REST API returns a JSON string with escaped characters — such as a message field containing \u201CHello\u201D — paste it here to instantly see the actual Unicode quotation marks and read the intended text without guessing.
Reading minified or obfuscated JavaScript: Minifiers and obfuscators often encode string literals using Unicode or hex escape sequences to obscure readable content. Unescaping the strings helps you understand what a script is doing during a code review or security audit.
Parsing log files: Application logs frequently escape special characters to keep entries on a single line. Unescaping logged strings — especially those containing embedded JSON, stack traces, or user input — makes them far easier to read and analyze.
Working with serialized data: When copying string values out of a JavaScript debugger, browser console, or database dump, the values often arrive with escape sequences intact. Decoding them before comparing or processing the content prevents subtle mismatches caused by escaped vs. literal characters.

Related Tools