String Escape / Unescape
Escape or unescape text for JSON, JavaScript, HTML, XML, CSV, SQL and regular expressions.
Loading tool…
How to use the String Escape / Unescape
- 1
Choose the format and whether to escape or unescape.
- 2
Paste your text.
- 3
Copy the result, or swap it back to check the round trip.
Frequently asked questions
Should I escape SQL strings by hand?
Use parameterised queries in application code. The SQL option is meant for writing one-off queries and data scripts.
Why does unescaping show an error?
The text contains an escape sequence that is not valid for the chosen format, such as \q in JSON. The message shows its position.
Is my text uploaded?
No. Everything runs in your browser, so your data never leaves your device.