String Escape / Unescape
Escape or unescape text for JSON, JavaScript, HTML, XML, CSV, SQL and backslash targets. Everything runs instantly in your browser.
Target format
Direction
Quick starts
Output
"Hello \"world\"\nLine two\twith a tab."About escaping
Escaping makes special characters safe to embed in your chosen format: JSON and JavaScript use backslash sequences, HTML and XML use named entities, CSV fields are quoted and have inner quotes doubled when needed, and SQL doubles single quotes. Unescaping reverses these transformations and shows an inline error when the input is invalid.