use case
How to pretty-print a JSON API response
Convert a minified or compact JSON API response into human-readable, indented output for inspection.
When you fetch a JSON API in the browser or with curl, the response usually arrives as a single compressed line that's nearly impossible to read. Pretty-printing adds indentation and line breaks so you can immediately see the structure, find the field you need, and spot unexpected values. This guide shows how to format any JSON API response in seconds using the quickhelp.dev JSON Formatter — no terminal, no jq, no installation required.
Step-by-step guide
- Copy the raw response: In Chrome DevTools open the Network tab, click the API request, select the Response tab, and copy the body. Or copy the output of: curl https://api.example.com/endpoint.
- Paste and format: Open quickhelp.dev/json-formatter, paste the raw JSON, select 'Pretty' mode with 2-space indentation, and click Run. The formatted output appears immediately.
- Inspect and copy: Use the tree view to expand nested objects. Click the Copy button to paste the formatted JSON into your editor, log file, or documentation.
Frequently asked questions
- Does pretty-printing change the data?
- No. Formatting only affects whitespace — the underlying data, field order, and values are unchanged.
- What if the API returns invalid JSON?
- The formatter shows a parse error with the line and column number. Enable 'Repair' mode to automatically fix common issues like trailing commas and single-quoted strings.
Try it now
Use the JSON Formatter to complete this task — free, no sign-up, runs in your browser.
Open JSON Formatter →