{
"color": "red",
"count": 2
}JSON unescape is the reverse of JSON escape. The paste has to be a JSON string literal: a quote, the contents, and a closing quote, with escapes written the way JSON writes them. The page parses that literal and returns the characters inside. Newlines stored as \n become real line breaks. \" becomes a quote.
Pasting {"color":"red","count":2} without the wrapping quotes fails with Expected a JSON string literal, because that text parses as an object. Paste the escaped result instead, quotes included, and the characters of the compact object come back. The page returns text, not a re-parsed document. If the inside happens to be JSON, it is still text until you pass it to the formatter or the validator.
Paste the literal produced by JSON escape, including the quotes: "{\"color\":\"red\",\"count\":2}"
{"color":"red","count":2} Pasting the object without those outer quotes returns Expected a JSON string literal.
One string layer comes off, which is the step you need when a payload was stored inside a JSON string and you want the text it held.
The object parses as an object. This page accepts only a string. The sample error is Expected a JSON string literal. Wrap it with JSON escape first, or add the quotes and escapes yourself.
The characters {"color":"red","count":2}, which is the compact object as text, 25 bytes, quotes around the keys included.
Yes. They are JSON escapes, so they become newline characters in the result. \\ becomes a single backslash.
Only far enough to require a string. The contents are returned as text even when they look like an object or an array.
JSON escape runs JSON.stringify on whatever you paste, and its output is a legal input for this page.