
String escape / unescape
Escape or unescape a string for JSON, JavaScript, HTML, URL, SQL, shell, regex or CSV, each with its own table of rules. Runs on your device.
String escape / unescape runs one of eight language tables, html, url, sql, shell, regex, csv, json or js, against the typed text in either direction. Each table follows its own rule: shell wraps the string in single quotes, sql doubles an internal quote, json calls JSON.stringify or JSON.parse. You pick lang yourself, so pairing the wrong two silently comes back garbled.
Questions
Which languages are supported?
JSON, JavaScript, HTML, URL, SQL, shell, regex and CSV, each with its own escape and unescape table.
How does shell escaping work?
It wraps the whole string in single quotes, ending and reopening the quote around any literal single quote inside it.
Does it auto-detect the language?
No, you pick lang yourself; escaping for one language and unescaping with another produces the wrong result silently.
What does the JSON mode use?
JSON.stringify to escape and JSON.parse to unescape, wrapped in quotes internally.
What happens with invalid escaped input?
JSON unescape and URL unescape refuse with the underlying parser's error; other languages simply pass unmatched sequences through.
Compare
| Tool | Runs on the CLI | Live as you type |
|---|---|---|
| String escape / unescape | Yes | Yes |
| MIME type lookup | Yes | Yes |
| HTTP status reference | Yes | Yes |
| User-agent parser | Yes | Yes |
| Regex tester + explainer | Yes | Yes |
| docker run → compose | Yes | Yes |
| URL parser | Yes | Yes |