JSON Escape & Unescape

Escape JSON strings for embedding in other JSON or code, or unescape previously escaped JSON strings back to their original format.

Input

Output

What is JSON Escape & Unescape?

JSON escaping converts special characters in strings (like quotes, backslashes, and newlines) into escape sequences so they can be safely embedded in JSON or source code. Unescaping reverses this process. JSONKit handles both directions instantly, useful when working with nested JSON strings or embedding JSON in code.

How to use

  1. Paste the text or JSON you want to process into the input editor.
  2. Click Escape to turn it into a JSON string literal, with quotes, backslashes and line breaks escaped.
  3. Click Unescape to turn an escaped string back into readable JSON.
  4. Copy the result into your code, configuration file or API request.

Features

  • Escapes double quotes, backslashes, newlines, tabs and other control characters.
  • Unescapes strings copied from logs, databases or nested JSON fields.
  • Useful for embedding JSON inside another JSON value, an environment variable or source code.
  • Processing happens locally in your browser.

Frequently asked questions

Why do I need to escape JSON?
When JSON is stored as a string inside another JSON document or a programming language string, its quotes and backslashes would end the string early. Escaping prefixes them with backslashes so the outer document stays valid.
My log shows JSON full of \" characters. How do I read it?
That JSON was escaped, often more than once. Paste it into the input and click Unescape. If the result still contains escaped quotes, unescape it again.
Is escaping the same as URL encoding?
No. JSON escaping uses backslash sequences such as \" and \n, while URL encoding uses percent sequences such as %22. Use the method that matches where the text will be placed.