What gets escaped
Inside a JSON string, a double quote must be written \", a backslash \\, and control characters (anything below U+0020) must be escaped — newline as \n, carriage return \r, tab \t, and the rest as \u00XX. Everything else, including emoji and accented letters, may appear as is.
The typical use is embedding one JSON document inside another as a string (message queues, a "payload" field in logs, GraphQL variables), or putting multi-line text such as an SQL query or a PEM certificate into a config file.
Frequently asked questions
Should forward slashes be escaped?
They may be (\/ is a valid escape) but do not have to be. It is only useful to avoid a literal </script> when JSON is embedded in HTML. It is off by default.
What does "Escape non-ASCII" do?
It writes every character above U+007F as a \uXXXX escape (emoji become a surrogate pair such as \ud83d\ude00). Useful for systems that only accept ASCII; otherwise leave it off.
Do I get the surrounding quotes?
Tick "Wrap in quotes" to get a complete JSON string literal ready to paste as a value; untick it for just the escaped contents.
How do I reverse it?
Use the JSON Unescape tool, which turns the escape sequences back into the original characters.