JSON Escape & Unescape

Turn text into a safe JSON string, or decode a JSON string back to plain text.

Result appears here…
Advertisement

What this tool does

When you put text inside a JSON string, certain characters must be “escaped” with a backslash — double quotes, backslashes, and control characters like newlines and tabs. This tool escapes raw text into a valid JSON string, and reverses the process.

Example

The two-line text Hello
World
escapes to "Hello\nWorld". Unescaping that returns the original two lines.

What gets escaped

  • " → \"   \ → \\
  • newline → \n, tab → \t, carriage return → \r

Common uses

  • Embedding multi-line text or HTML inside a JSON config or API payload.
  • Debugging why a JSON value won't parse (usually an unescaped quote or newline).
Advertisement