JSON for Beginners: Format, Validate and Fix Errors
What JSON is, the mistakes that break it, and how to use a formatter and validator to find them quickly.
JSON is how most websites and apps exchange data. It looks simple, and it is, until a single missing comma stops everything from working.
The basics
JSON is made of objects in curly braces, arrays in square brackets, and values like strings, numbers, true, false and null. Keys must be in double quotes. Single quotes are not allowed, and neither are comments.
The usual suspects
Most broken JSON has one of four problems: a trailing comma after the last item, single quotes instead of double, a missing quote on a key, or unescaped quotes inside a string. The JSON validator points to the position of the first error so you can fix it.
Make it readable
An API often returns everything on one line. Paste it into the JSON formatter and it becomes an indented tree you can actually read. When you need to send it back compactly, the JSON minifier removes the whitespace.
Compare two responses
When a bug depends on a changed field, the JSON compare tool shows exactly what differs between two versions, ignoring the key order.
Find a value inside a big file
For deeply nested data, the JSON path finder lets you pull out one value with a path such as users[0].email.
Everything is processed in your browser, so it is safe to paste real API responses, though you should still hide secrets such as tokens before sharing them anywhere.