Escape any text into a valid JSON string literal, or take an escaped JSON string and turn it back into raw, readable text. When you need to embed a multi-line snippet, a block of HTML, or text containing quotes inside a JSON value, every double quote, backslash, newline and tab has to be escaped correctly or the JSON breaks. This tool does that for you, wrapping the escaped result in quotes ready to paste into a config file or payload, and it also reverses the process to reveal what an escaped string really contains. Paste your input, choose escape or unescape, and copy the result. Everything runs locally in your browser, so sensitive strings and payloads are never transmitted anywhere.
It turns raw text into a safe JSON string literal by escaping characters like double quotes, backslashes and newlines so it can be embedded inside JSON.
Newlines become backslash-n and other control or non-ASCII characters are escaped as needed so the result is a valid JSON string.
Yes. Paste an escaped JSON string and it returns the original raw text with escapes resolved.
Escape any text into a valid JSON string literal, or take an escaped JSON string and turn it back into raw, readable text. When you need to embed a multi-line snippet, a block of HTML, or text containing quotes inside a JSON value, every double quote, backslash, newline and tab has to be escaped correctly or the JSON breaks.
Yes. JSON String Escape / Unescape is completely free, with no sign-up and no usage limits.
Yes. JSON String Escape / Unescape runs in any modern web browser. There is nothing to download or install.
Yes. JSON String Escape / Unescape runs entirely on your device in your browser, so nothing you enter is uploaded to a server.
Link this tool from a README, doc or site. The badge links back to this page.
[](https://yourhack.ai/json-escape)