What formatting does
Formatting (pretty-print) inserts indentation and line breaks so nesting is visible. API responses often arrive as one line. That is legal JSON and miserable to read by eye.
{
"name": "HiJSON",
"version": "1.0",
"features": ["format", "minify", "tree"]
}
The minified form {"name":"HiJSON","version":"1.0","features":["format","minify","tree"]} is equivalent.
What minification does
Minify strips insignificant whitespace. Use it for request bodies, logs you store at volume, or embedding JSON in a bundle. Do not minify files you expect to diff in Git unless the team agreed on that.
When to do which
| Situation | Prefer |
|---|---|
| Debugging an API response | Format |
| Reviewing a config in a PR | Format |
| Production HTTP body | Minify |
| Git history you want to read | Format |
In HiJSON
- Paste JSON or drop a file on the home page.
- Format adds 2-space indent in the editor.
- Minify collapses it to one line.
- Parse (Ctrl+Enter) builds the tree. The detail panel can copy formatted or minified text for a node.
Syntax has to be valid first
Format will not save an illegal document. Trailing commas, single quotes, and comments are the usual failures. See syntax errors.