JavaScript Unescape
Turn an escaped JavaScript string back into plain text. It runs entirely on your device — nothing is uploaded.
Example
How it works
Escape sequences like \", \n and \t are interpreted to recover the original text.
Good to know
JavaScript Unescape takes a string full of backslash escape sequences and converts it back into the readable text it represents. If you have ever copied a value out of a log file, a JSON payload, a network response, or a stringified error and seen something like line1\nline2\t\"quoted\" instead of actual line breaks and quotes, this tool decodes those sequences so you can see what the data really contains. It is aimed at developers, QA testers, and anyone debugging serialized or escaped output.
Reach for it whenever escaped characters are getting in the way of reading a value. Common moments include inspecting a \n-laden message that should be multi-line, recovering a path where backslashes were doubled, pulling a human-readable string out of a minified bundle, or confirming what a server actually returned before pasting it somewhere that expects raw text. It is the inverse of an escape tool, so it pairs naturally with the JavaScript Escape utility when you need to round-trip a value.
To read the result, compare the input and output side by side: each escape sequence in the input collapses to a single real character in the output. \n becomes a genuine new line, \t becomes a tab, \" and \' become bare quotes, \\ becomes one backslash, and \uXXXX or \xXX becomes the corresponding Unicode character. If a character did not change, it was not escaped to begin with.
A practical caveat: unescaping is not the same as parsing JSON or running JavaScript. Pass only the inner string content, not the surrounding quotes or object syntax, or you may get unexpected results. Also be careful with deliberately double-escaped data (for example \\n, which represents a literal backslash followed by an n, not a newline) — unescaping once may leave a layer behind, and unescaping twice can corrupt the intended value. Everything runs locally in your browser, so it is safe to use on private strings.
Frequently asked questions
Is my data uploaded anywhere?
No — everything runs in your browser. Your code never leaves your device, so it's safe for private work and runs offline once loaded.
Is this tool free?
Yes, completely free with no sign-up and no limits.
People also ask
What is the difference between escape and unescape in JavaScript?
Escaping converts special characters into backslash sequences so a string can be safely stored or embedded (for example a newline becomes \n), while unescaping reverses that, turning the sequences back into the original characters. This tool performs the unescape direction.
What does \n mean in a JavaScript string?
\n is the escape sequence for a newline (line feed) character. When unescaped it becomes an actual line break, so a single-line input with \n turns into multiple visible lines in the output.
How do I convert \u escape sequences to characters?
A \uXXXX sequence is a Unicode code point written in four hexadecimal digits, and unescaping it produces the matching character (for example é becomes é). Paste the string containing the sequences and the tool resolves them to their real characters.
Why does my path have double backslashes like C:\\Users?
In many string formats a single backslash is an escape character, so a literal backslash must be written as two (\\). Unescaping collapses each \\ back into one backslash, giving the normal path such as C:\Users.
Is JavaScript unescape the same as URL decoding?
No. JavaScript unescaping handles backslash sequences like \n, \t and \uXXXX, whereas URL decoding handles percent-encoded values like %20. The legacy global unescape() function in JavaScript actually did URL-style decoding, which is a separate operation from what this tool does.
Can I unescape a whole JSON string with this tool?
This tool decodes the escape sequences inside a string, but it does not parse JSON structure. For a JSON value, copy just the text between the quotes rather than the full object, since braces, keys, and surrounding quotes are not part of what gets unescaped.
Why is some of my text unchanged after unescaping?
Only characters written as escape sequences are converted; plain characters pass through untouched. If part of the output looks identical to the input, that portion did not contain any escape sequences to decode.
Is it safe to unescape sensitive strings online?
This tool runs entirely in your browser, so the text you paste is processed on your own device and is not uploaded to any server. That makes it suitable for private logs or data, and it works offline once the page has loaded.
Related tools