About the String Escape / Unescape
Embedding text inside source code or data formats requires escaping quotes, backslashes and control characters. This tool produces correct string literals for many languages — and unescapes them back, which is handy when you find a stringified JSON payload ("{\"id\":1}") in a log file.
Features
- JSON, JavaScript, Java/C#/Kotlin, Python
- Unicode
\uXXXXfor all non-ASCII - Regex metacharacter escaping
- SQL single-quote doubling
- CSV field quoting
- Shell single-quote escaping
How to use it
- Pick Escape or Unescape and the target language.
- Paste the text.
- Optionally wrap the result in quotes and copy it.
Frequently asked questions
How do I un-stringify JSON from a log?
Choose Unescape + JSON string, paste the escaped value (with or without surrounding quotes), then format the result in the JSON Formatter.