JSON Pretty Print
Pretty-print reprints valid JSON with indentation so a person can read it. Minify reprints the same value as one line. Neither changes what the document means.
Pretty-print vs minify
Both start with a successful parse. Pretty-print (also called beautify) writes whitespace so nested objects and arrays are obvious. Minify writes the smallest usual JSON for that value.
{"items":[1,2],"ok":true}Pretty-printed with two spaces:
{
"items": [
1,
2
],
"ok": true
}Minify of the same object is the compact line at the top. APIs treat them as the same document.
When to use which
- Pretty-print to read an error payload or edit a fixture.
- Minify to paste into a log line or shrink a config blob.
- Validate first if you are not sure the text is JSON — how to validate JSON.
The MultiConvers JSON formatter exposes Format, Minify and Validate on one page. Indent choices and trailing-comma failures are covered in how to format JSON.
FAQ
- Is pretty-print different from format?
In practice, no. Both parse and reprint with indent. “Format” is the usual button label; “pretty-print” is the search phrase.
- Should I commit pretty-printed JSON to git?
Yes if humans will diff it. Use minify only when size or a single-line log field matters.
Related guides
How to Format JSON
Formatting JSON means parsing it, then reprinting the same value with consistent indentation. Invalid text cannot be formatted — fix the syntax first.
How to Validate JSON
Valid JSON is text that JSON.parse accepts. Validation does not pretty-print or minify; it only reports whether the document is legal JSON.
Related tools
See all guides.