Paste text, get a string literal that is safe to place inside JSON.
The tool applies the same escaping as JSON.stringify: double quotes become backslash quote, line breaks become the two characters backslash n, tabs and control characters are escaped, and backslashes are doubled. The result can be pasted inside a JSON document as a value.
Optional switches wrap the result in double quotes, escape every non-ASCII character as a backslash u sequence for systems that need pure ASCII, or stringify twice for JSON that has to be embedded inside another JSON string.
Use the JSON Unstringifier, which turns an escaped string back into the original text.
Some APIs expect a JSON string whose content is itself JSON. The first pass makes the inner document a string, the second makes that safe to embed in an outer document.
Only if the ASCII option is on. Then they become surrogate pairs, such as backslash uD83D backslash uDE00.