A JSON formatter takes JSON that arrived as one unreadable line and lays it out with consistent indentation, so you can actually see the structure. It also tells you whether the document is valid in the first place, which is usually the real question when you paste something in.
Most of the time you reach for this after copying a response out of a terminal, a log aggregator, or a browser's network tab. Those sources give you JSON with the whitespace stripped, and once a payload is more than a couple of hundred characters, finding the one key you care about by eye stops being practical. Formatting also makes structural mistakes obvious: a value that should be an object but is actually a string containing JSON, an array nested one level deeper than you expected, a null where you assumed a number.
When parsing fails, a generic "invalid JSON" message is close to useless on a large payload. This tool reports the position the parser gave up at, the line and column it maps to, and shows you the surrounding text, so you can go straight to the trailing comma or the unquoted key instead of bisecting the document by hand.
You can also minify in the other direction, which is handy for pasting a payload back into a config field, an environment variable, or a test fixture where newlines would be a nuisance.