JavaScript Unescape Online
Paste a JavaScript string with backslash escapes and read it as plain text. Line breaks, tabs, hex codes and unicode codes, including the curly brace form, are decoded. Nothing leaves your device.
How to use JavaScript Unescape on KickSolve
Three quick steps, no account needed.
Why choose KickSolve
Built for speed, privacy and accurate results.
About JavaScript Unescape on KickSolve
What it does and how to get the best results.
What does JavaScript unescape do?
It turns the backslash sequences in a string literal back into the characters they stand for. \n becomes a line break, \x41 becomes A, \u00e9 becomes é and \u{1F600} becomes an emoji.
Supported escape sequences
\n \r \t \b \f \vand\0\xHHtwo-digit hex codes\uXXXXfour-digit unicode codes\u{X...}unicode code points up to 10FFFF\',\",\`and\\- a backslash at the end of a line, which joins two lines
How to unescape a JavaScript string online
Paste the text in the top box. If it starts and ends with the same quote, the quotes are removed for you. The result appears below. Anything invalid, such as a short \x4, is reported with its position.
Not the same as unescape()
The old global unescape() function decodes percent codes like %20 and is deprecated. This page decodes string literal escapes. For URL text use decodeURIComponent. To go the other way, use JavaScript escape.
JavaScript Unescape examples
Real input and output so you can see exactly what changes.
Hex, unicode and code point escapes
Input
\x41\u0042\u{1F600}Output
AB😀Quoted string with an apostrophe
Input
'It\'s fine'Output
It's fineNew lines
Input
Hello\nWorldOutput
Hello
WorldWhen do you need to unescape a JavaScript string?
Common reasons people use this page.
Privacy, limits and browser support
What happens to your data and what to expect.
- How it works: with KickSolve, the conversion runs in your browser with JavaScript. Your text is not sent to a server and is not stored.
- Limits: there is no limit set by us. Very large text, many megabytes, depends on your device memory.
- Browsers: current Chrome, Edge, Firefox and Safari on desktop and mobile.
Read the KickSolve privacy policy for details about the site itself.
Frequently asked questions
Quick answers.
How do I unescape a JavaScript string?
Paste it into the top box. Backslash sequences are converted to their characters and the plain text appears below.
How do I decode \u and \x codes?
Paste the text. \uXXXX, \u{...} and \xHH are converted to characters automatically.
Do I need to remove the quotes?
No. If the text starts and ends with the same quote mark, the tool removes them.
What is a line continuation?
A backslash at the end of a line joins it to the next line. After unescaping, both lines become one.
What do the warnings mean?
The text has an escape that is not valid, such as a short \x or \u code. The tool keeps going and tells you where.
Is it the same as unescape() or decodeURIComponent?
No. Those decode URL percent codes. This tool decodes string literal escapes.
Is my text uploaded anywhere?
No. Everything runs in your browser.
Is it free?
Yes. It is free and needs no signup.
More free tools from KickSolve
Related string and developer tools.