Escape JSON before embedding in <script> tags or .js source files. The escaped string avoids breaking the JavaScript parser with unescaped quotes or newlines — use JSON.parse() to read it back.
Pass JSON data in URL query strings by escaping it first. Escaped JSON can be safely embedded without breaking URL encoding — combine with encodeURIComponent for full URL safety.
Store JSON as a plain string column in SQL databases by escaping it first. The escaped format preserves the structure and avoids issues with quotes in SQL queries — unescape when reading back.
When an API returns backslash-ridden JSON, paste it here and click Unescape. You'll see the actual data structure clearly — no more squinting at raw escape sequences.
No need to pick Escape or Unescape manually. Paste any input — the tool detects whether it's raw JSON or an escaped string and converts accordingly. Just paste and see the result.
Switch between Escape and Unescape with one click. The output updates instantly — perfect for round-trip validation. Toggle back and forth to verify your escaped string restores correctly.
Type or paste and see the result immediately. No "Convert" button required — changes appear as you type, with a smooth 300ms debounce. See the character count for both input and output at a glance.
JSON escaping converts special characters (quotes, backslashes, newlines) in a JSON string into backslash-prefixed sequences like \" for " and \\ for \. This makes the JSON safe to embed in JavaScript code, HTML attributes, or URL parameters without breaking syntax.
Paste your JSON into the left panel. The tool auto-detects your input and shows the escaped string in real time on the right. Click Copy to copy it to your clipboard, or Download to save as a .txt file. All processing happens in your browser — no uploads, no signup.
Escape converts {"key":"value"} into {\"key\":\"value\"} — a safe string for embedding in code. Unescape reverses the process, converting the backslash-escaped string back to valid, readable JSON. Use the direction toggle or let auto-detect handle it for you.
Escaped JSON is needed when embedding JSON data in JavaScript or HTML <script> tags, URL query parameters, or configuration files. It is also useful for storing JSON as a plain string in database columns or sending JSON in environments that require string encoding.
Yes. All processing is 100% browser-based using JavaScript's native JSON.stringify and JSON.parse methods. Your data never leaves your computer — no uploads, no server storage, no tracking.
Yes. Paste any backslash-escaped JSON string into the left panel, switch to Unescape mode (or let auto-detect handle it), and the readable JSON appears instantly in the right panel. Use Copy or Download to get the result.