\\
String Escape
DevOffline-ready
String Escape converts any text to an escaped version safe for use in JSON strings, JavaScript literals, SQL queries, and regular expressions — adding backslashes before quotes, newlines, and control characters as required by each format. Toggle between escape and unescape mode. Paste a raw string and copy the escaped version ready for code. Runs in your browser.
Related: AESHashUUIDHTML → JSX