JSON (JavaScript Object Notation) looks simple enough that it's easy to assume small mistakes don't matter, a stray comma here, a single quote there. In practice, JSON parsers are deliberately unforgiving: unlike a browser rendering slightly broken HTML, a JSON parser either accepts a document exactly as valid or rejects it entirely, with no partial credit and no guessing at what you probably meant.
The rules that actually matter
Every key in a JSON object must be a string wrapped in double quotes, not single quotes, and not left unquoted the way JavaScript object literals allow. Commas separate items in an object or array, but unlike some languages, JSON does not allow a trailing comma after the final item, a habit carried over from JavaScript that silently breaks JSON. Every opening brace `{` needs a matching closing brace, every opening bracket `[` needs a matching closing bracket, and strings must use double quotes, never single quotes, with special characters like newlines or literal quote marks escaped with a backslash.
Numbers can't have leading zeros or a trailing decimal point, and JSON has no concept of comments, dates, or `undefined`, values are limited to strings, numbers, booleans, null, objects, and arrays. Whitespace outside of strings doesn't matter to the parser (you can minify or pretty-print freely), but every other rule above is enforced exactly.
Why whitespace still matters for humans
Even though a parser doesn't care whether JSON is indented, humans debugging a broken payload absolutely do. A deeply nested object crammed onto one line makes it nearly impossible to spot which bracket is unmatched, while consistent indentation makes the structure visible at a glance and turns a five-minute bug hunt into a five-second one. This is exactly what pretty-printing does, and it's why running suspect JSON through the JSON Formatter before debugging it by eye is almost always faster than staring at a single dense line.
If your JSON needs to move between systems that expect different formats, the YAML/JSON Converter and JSON to CSV Converter handle the structural translation without you needing to hand-edit brackets and commas.
Common failure points in real payloads
The most frequent JSON errors in practice are trailing commas left over from editing an array or object, unescaped double quotes inside a string value, and mismatched brackets after a large paste or copy-edit. API responses that look fine visually but fail to parse are almost always hiding one of these three issues, and because the error message from a strict parser often just says something like "unexpected token" at a character position, finding the actual spot by eye in a large file is tedious. A dedicated validator that highlights the exact line and character, like the JSON Formatter, turns that search into an instant fix.

