String Escape / Unescape
Convert raw text into a properly escaped JavaScript/JSON string literal, or paste an escaped string to decode it back to plain text.
Raw text
Escaped
Ad space
Frequently asked questions
What gets escaped?+
Quotes, backslashes, newlines, tabs, and other control characters, following the same rules as JSON.stringify, which matches how JavaScript and JSON string literals are written.
Can I unescape a string without its surrounding quotes?+
Yes, if the input isn't wrapped in quotes, the tool tries wrapping it in double quotes automatically before decoding.
Does this work for languages other than JavaScript?+
The escaping rules are close to JSON, which most languages (Python, Java, C#, Go) can parse directly, though exact edge cases can vary.