Why Format JSON?
APIs often return minified JSON — all on one line with no whitespace. While compact, this is nearly impossible for humans to read. Formatting (pretty-printing) adds indentation and line breaks to make the structure visible.
Minified vs Formatted JSON
Minified: {"user":{"id":1,"name":"Alice","email":"alice@example.com"}}
Formatted:
{
"user": {
"id": 1,
"name": "Alice",
"email": "alice@example.com"
}
}
Step-by-Step: Format JSON Online
- Open JSON Parser.
- Paste your minified JSON.
- Click Format or Pretty Print.
- Copy the formatted output.
JSON Validation Rules
- Keys must be quoted with double quotes (not single)
- No trailing commas after the last item
- Strings must be double-quoted
- Numbers are not quoted
- Null, true, false are lowercase and not quoted