JSON String Escape / Unescape

Escape text so it's safe inside a JSON string (quotes, newlines, tabs, backslashes), or unescape a JSON string back to plain text. Runs in your browser.

When you need this

To put arbitrary text inside a JSON value, special characters must be escaped: " becomes \", a newline becomes \n, a tab \t, and a backslash \\. This tool does that exactly (using the JavaScript JSON serializer, so it's correct), and reverses it. Handy for embedding a code snippet, log line, or multi-line message into a config or API payload, or for reading an escaped string out of one.

Related

JSON viewer  ·  JSON formatter  ·  Fix JSON errors  ·  All tools