Minified JSON is unreadable to humans by design — it's built for the wire, not the eye. Formatting it back into indented form is the first thing you do when a response misbehaves, because structure you can see is structure you can reason about.
Formatting reveals structure
Compare the same object minified and formatted:
{"user":{"id":1,"roles":["admin","editor"]},"active":true}{
"user": {
"id": 1,
"roles": ["admin", "editor"]
},
"active": true
}Indentation makes nesting depth, array contents, and a missing brace obvious at a glance. It changes nothing about the data — same bytes of meaning, just readable.
Validation points at the exact break
A good validator does more than say "invalid" — it gives you the line and column. Take this:
{
"name": "Ada",
"roles": ["admin",],
"active": true,
}Two problems hide here: the trailing comma after "admin" inside the array, and the trailing comma after true. JSON — unlike JavaScript — forbids both. A parser will stop at the first and report a position, so you fix it, re-run, and find the next. Other frequent culprits: single quotes instead of double, unquoted keys, and a stray byte-order mark at the start of a file that makes the very first character invalid.
Minifying for the wire
Minifying strips whitespace to shrink payloads for transport or storage. It never changes meaning, so you can format to read and minify to ship freely. The size difference is mostly indentation and newlines — real on large responses, negligible on small ones.
Where you paste it matters
Here is the part people skip: many online JSON formatters send your text to a server to process it. If that text is a real API response, you may have just posted access tokens, customer email addresses, or internal IDs to a stranger. Prefer a tool that runs in your browser and uploads nothing. The PayloadIQ JSON Formatter parses with the same engine your runtime uses and never sends the payload anywhere — see browser-local tools for how to verify that claim yourself.
When to use it
Format and validate when a response won't parse in your code, when you're prepping a test fixture, when cleaning a log line that embedded JSON, or just to read a dense payload. It's the cheapest debugging step there is.
Common mistakes
- Trailing commas. Legal in JS, illegal in JSON — the single most common parse error.
- Single quotes or unquoted keys. JSON requires double-quoted keys and string values.
- Assuming a 200 means valid JSON. An error page or HTML can return 200; always parse before trusting.
- Hidden characters. A BOM or a non-breaking space pasted from a doc can break parsing invisibly.
- Pasting secrets into unknown formatters. Treat real payloads as sensitive and keep them local.
Format to understand, validate to locate, minify to ship — and keep the data in your browser while you do it.