π§Ύ JSON String Escape and Unescape
Use this when a log, prompt or config needs a JSON-safe string. Escape wraps the text in quotes and escapes special characters. Unescape expects a JSON string literal.
Input
Result
Private by design. This tool runs entirely in your browser β nothing you enter or add is uploaded to any server.
How it works
- Escape uses JSON.stringify so quotes, backslashes and newlines become JSON escapes.
- Unescape runs JSON.parse and requires a quoted JSON string, not a full object.
- The conversion stays in the page; the input is not sent anywhere.
Examples
- Hello "world" escapes to a quoted string with a backslash before the quote.
- A newline becomes the two-character escape \n inside the JSON string.
- Unescape of "caf\u00e9" returns cafΓ©.
Frequently asked questions
Can I paste a whole JSON object?
Unescape expects one JSON string literal. For objects, use the JSON formatter instead.
Does escape add surrounding quotes?
Yes. The output is a valid JSON string token, including the wrapping quotes.
Related tools
More JSON tools βJSON Formatter & Validator
Format, validate and minify JSON instantly. Precise error location with line and column, key sorting, 2/4-space or tab indent, and file download. Free.
JSON Minifier
Compact valid JSON by removing insignificant whitespace after a real parse.
Background Remover
Remove the background from a photo and save a transparent PNG β free, private, no sign-up.
QR Code Generator
Make QR codes for links, Wi-Fi, UPI, WhatsApp and more β free PNG and SVG downloads.