Published 2026-07-22
Step-by-step guide to pretty-printing minified JSON API responses and config files. Learn indentation, sorting keys, and common errors before you paste.
Why pretty print?
Minified JSON removes whitespace to save bytes on the wire. That is great for production traffic and terrible for human debugging. Pretty printing adds consistent indentation and line breaks so you can scan nested fields, compare two responses side by side, or drop a snippet into documentation.
Pretty printing does not change meaning: the parsed data is identical. It only changes presentation. That is why formatters are safe for debugging as long as you avoid pasting credentials.
Quick workflow
Copy the raw JSON from your terminal, browser devtools, or log file. Open a JSON Formatter, paste into the input area, and choose Format or Pretty Print. Copy the output into your ticket, README, or diff tool.
If formatting fails, the text is not valid JSON. Run it through a JSON Syntax Checker first - the error message usually points at a missing quote, bracket, or illegal trailing comma.
Indent size and key order
Two-space indentation is the de facto standard in JavaScript ecosystems; four spaces appear in some Java and Python repos. Pick one style per project and stay consistent. Some formatters let you minify again when you are done inspecting.
Sorting keys alphabetically makes diffs stable in code review. Use a JSON Sort Keys tool when order does not matter semantically but you want cleaner git diffs.
Common pitfalls
Single-quoted strings are invalid in JSON (JavaScript allows them; JSON does not). Comments are not allowed. NaN and Infinity are not valid JSON numbers. If your source is JavaScript object literal syntax, fix it before formatting.
Large payloads can freeze slow machines when pretty printed in the browser. For multi-megabyte files, consider command-line tools or split the document. FindMeTool is optimized for everyday API-sized snippets, not entire database dumps.
When to minify again
After debugging, minify before embedding JSON in HTML data attributes or sending over slow mobile links. The JSON Minifier strips whitespace without altering values.
Keep both formatter and minifier in your workflow: expand to read, compress to ship. Everything on FindMeTool runs locally in the browser for typical paste workflows.
Team conventions
Document whether your org prefers two- or four-space indentation in API examples. Consistent samples reduce noise in documentation PRs and help new hires onboard to your style guide quickly.
For public SDK docs, pretty-printed JSON with sorted keys reads cleaner in static site generators and PDF exports. Generate samples from tests when possible so docs never drift from reality.
When pairing with non-developers, formatted JSON in tickets avoids back-and-forth about which field failed validation. Screenshots of collapsed trees in devtools are harder to search later - paste text instead.
Related tools
More guides
Browse the full Learn hub or open a related tool above to try the workflow in your browser.