Skip to content

String Escape & Unescape

Escape and unescape strings online. Handle JavaScript, JSON, HTML, URL and CSV string escaping. Free string escape tool for developers.

What is String Escaping?

String escaping converts special characters into safe representations for different contexts. For example, a newline becomes \n in JavaScript, < becomes < in HTML, and spaces become %20 in URLs. Proper escaping prevents syntax errors, injection attacks, and encoding issues. This tool handles JavaScript, JSON, HTML, URL, and CSV escaping. All processing happens in your browser with no data sent to any server.

Supported Modes

JavaScript mode handles backslash sequences, unicode escapes, quotes, and backticks. JSON mode follows RFC 8259 with forward slash and control character escaping. HTML mode converts &, <, >, quotes, and named entities. URL mode uses encodeURIComponent/decodeURIComponent for percent-encoding. CSV mode wraps fields in quotes and double-escapes internal quotes per RFC 4180.