Pretty-print an API JSON response
Minified API responses are hard to audit. Format them locally to inspect nesting, duplicate keys and oversized numbers — without uploading the body.
When pretty-print helps
Support tickets, webhook logs and gateway traces often store a single-line JSON body. Pretty-printing adds whitespace so you can compare keys, spot nulls and see nested arrays without shipping the payload to a third-party viewer.
{"ok":true,"items":[{"sku":"00127","qty":2},{"sku":"00904","qty":1}],"cursor":"abc"}Local workflow
- Copy the raw response body (not a screenshot).
- Paste into JSON Formatter and format.
- Use the tree view for deep nests; keep the original text if integers may exceed
Number.MAX_SAFE_INTEGER. - Minify again only when you need a compact fixture.
Limits to remember
YAML/XML conversion views are reading aids, not lossless archives. Trailing commas and comments still fail strict parse — see fix trailing commas. Close the tab to clear the working buffer.