Javascript Escape Unescape
Escape or unescape JavaScript string literal special characters.
When to use this tool
Useful when generating JavaScript code dynamically or preparing strings for use in JSON-like contexts where quotes and backslashes must be escaped. Also handy for decoding JavaScript-style escaped strings found in web console output or minified source maps.
How to use
Type or paste your string into the input area. Select "Escape" to add JavaScript escape sequences for special characters, or "Unescape" to convert escape sequences like \n and \" back to their original characters.