What counts as valid JSON
This format holds objects, arrays, strings, numbers, true, false, and null. It looks like a slice of JavaScript, and that resemblance causes most of the failures people paste into a formatter. The JSON formatter on this site uses the browser’s parser. If that parser rejects the text, the page reports the message and does not invent a repair.
Keys and strings must use double quotes. A key written as name without quotes is JavaScript, not JSON. Single quotes are also rejected. A trailing comma after the last item in a list is a frequent copy-from-code mistake. Comments that start with // or /* are not part of JSON, even when a config file at work allows them.
Numbers are decimal digits, with an optional fraction and exponent. Values such as Infinity or NaN are not JSON. A bare new Date() or a function is not JSON. Binary data does not belong in the text unless you first encode it, for example as Base64 inside a string — and that encoding is still not encryption.
Format and minify do not change the value. They parse, then write the value again. Format inserts a two-space indent, so a person can read the tree. Minify removes that spacing, so a file or a header can stay small. If two formats of the same paste look different only in spaces and line breaks, the data is the same.
The tool will not fetch a URL, will not “fix” broken JSON, and will not send the paste to a server. If you need a language with comments, trailing commas, or unquoted keys, you need a different parser than this page.