JavaScript String Escape Online — Quote-Aware
Escape or unescape strings for JSON, JavaScript/TypeScript, SQL and regex — live, entirely in your browser.
Processing...
0%
Result
This page opens the string escaper with JavaScript/TypeScript mode preselected — pick single quotes, double quotes or backticks and paste your raw string to get a copy-paste-ready literal.
Each quote style escapes only what it needs: single-quote mode escapes ', double-quote mode escapes ", and backtick mode escapes ` and template-literal ${ sequences — plus backslashes, newlines, tabs and carriage returns in every style.
Decode mode reverses common JS escapes, including \uXXXX and \xXX sequences, back to the original characters. The full tool also handles JSON, SQL and regex escaping, everything running locally in your browser.