Developer Tools
JSON Escape / Unescape
Escape text for a JSON string value or unescape valid JSON string content locally.
About this tool
Escape text for a JSON string value or unescape valid JSON string content locally.
What is it?
JSON escaping prepares string contents for a JSON value; escaped content alone is not a complete JSON object or document.
How to Escape or Unescape JSON Text
Choose Escape or Unescape, enter the text, and copy the result. Unescape accepts valid JSON string contents.
- Enter the values or text required by the tool.
- Choose an option or calculation mode when one is available.
- Run the tool and review the result panel.
- Copy the result if you need to use it in another application.
Examples
- Hello "World" → Hello \"World\"
- Line\nbreak → Line\\nbreak
Common use cases
- Preparing quoted text for JSON string literals.
- Reading escaped content from logs or payload examples.
- Comparing how backslashes, quotes and line breaks are represented.
Technical details
- Escaping uses JSON string serialization rules and unescaping parses a JSON string literal.
- The result is string content, not a complete JSON object.
Related concepts
JSON string
Backslash escaping
Unicode escape
What Is JSON String Escaping?
JSON escaping prepares string contents for a JSON value; escaped content alone is not a complete JSON object or document.
Frequently Asked Questions
Is escaped text a JSON object?
No. The output is the content inside a JSON string; wrap it in quotes when constructing a JSON string value.
Are malformed escapes accepted?
No. Invalid JSON string escapes show an error.