JSON String Escape / Unescape
Prep any text for dropping inside a JSON string — quotes, backslashes, newlines and tabs all handled — or reverse it to get the raw text back. It all happens locally in your browser.
How it works
JSON strings are wrapped in double quotes, so any double quote, backslash, or control character inside them has to be escaped with a backslash sequence. A newline becomes \n, a tab becomes \t, and a literal quote becomes \" — otherwise the JSON won't parse.
Escape mode runs your text through the same serializer the language uses, then strips the surrounding quotes so you get just the inner, ready-to-paste content. Unescape mode wraps your input back in quotes and parses it, turning those backslash sequences into the real characters they represent.
Unescaping is strict, because JSON is strict. A dangling backslash or an invalid sequence means the string can't be parsed, so instead of guessing, the tool shows a warning and leaves your input untouched.
Frequently asked questions
Do I paste the surrounding quotes or leave them off?
Leave them off. Work with the inner content only — the tool adds and removes the wrapping quotes for you, so you're always dealing with just the string body.
Which characters actually get escaped?
Double quotes, backslashes, and control characters like newlines and tabs. Those are the ones that would otherwise break a JSON string, so they're converted to their backslash forms.
Why won't my string unescape?
Unescaping parses the text as a JSON string, which fails on things like a lone backslash or a bad escape sequence. When that happens you'll get a warning instead of a partial or corrupted result.