Escape a JSON object into a string value (with backslash-escaped quotes and newlines), or unescape back to readable JSON. Load sample
Escape a JSON object into a compact escaped string — useful when you need to embed JSON inside another JSON field, pass JSON as a query parameter, or store it as a string in a database. Unescape does the reverse: paste an escaped JSON string and get readable, formatted JSON back. All processing happens in your browser with no data sent anywhere.
When a JSON object needs to become a string value inside another structure. For example, some APIs accept a body parameter that must be a stringified JSON object. Or you're embedding a config object inside a shell script where quotes need escaping. Or you received a response where JSON was double-encoded and you need to unwrap it.
Double quotes become \", backslashes become \\, newlines become \n, tabs become \t, and other control characters get their proper escape sequences. The result is a single-line string that can safely be embedded anywhere a JSON string value is expected.