JSON Escape & Unescape Online

Escape quotes, newlines, tabs, and backslashes in JSON strings for inclusion in source code, or decode escaped JSON payload strings back to clean formatted JSON.

JSON Escape & Unescape Tool

Escape JSON special characters for code strings or convert escaped strings back to readable JSON.

Layout:
Editor Height:
Input Text1 lines
Result

Popular JSON Utilities

Explore Related JSON Tools

Why Escape JSON Special Characters?

When embedding JSON payloads inside string variables in languages like JavaScript, Java, Python, or shell cURL commands, special characters such as double quotes (`"`), newlines (`\n`), and backslashes (`\`) must be escaped with a leading backslash. Failing to escape quotes causes syntax errors or broken API payloads.

Need to format unescaped JSON?

Use our JSON Formatter to format and validate your JSON string.

JSON Escape / Unescape FAQ

Q:How do I escape a JSON string online?

Paste your raw JSON into the left box and click "Escape JSON". Quotes ("), newlines (\n), and backslashes (\\) are automatically escaped for programming language strings.

Q:How do I unescape an escaped JSON string?

Paste your escaped string (with \" or \n) into the input box and click "Unescape JSON" to restore clean, unescaped JSON text.

Q:Why do double quotes need to be escaped in JSON strings?

In programming languages, double quotes delimit string boundaries. Escaping quotes (`\"`) ensures the language parser treats the quote as literal text instead of closing the string.