Escape a string so it can sit inside JSON, or unescape a JSON string.
When you embed a sentence in JSON, quotes, backslashes and line breaks must be escaped. This page does that to the text you paste, or it undoes those escapes. It does not pretty-print an object. For that, use JSON formatter. The general escape string page is for source code in several languages, not specifically a JSON string.
\n.Double quotes and backslashes are escaped. Line breaks become \n, and a carriage return becomes \r. Characters outside the usual ASCII range can be left as themselves, because JSON allows UTF-8. Unescape reads a JSON string. If you leave the surrounding quotes on, they are part of the JSON string. If the text is not a valid JSON string, unescape fails instead of returning a partial line.
\n and not as a broken line in the file.Unescape expects one JSON string, not an object. Format the object on the JSON formatter.
“Keep the surrounding quotes” is on. Turn it off if you wanted only the escaped interior.