Pretty-print JSON by parsing your input and re-serializing it with two-space indentation. Ideal when reading minified API responses, single-line config exports, or compressed log lines.
When to use it
- Inspect nested objects from REST or GraphQL responses
- Prepare readable JSON for code reviews or documentation
- Verify that a string is valid JSON before committing to a repo
Limitations
Key order follows JavaScript object enumeration after parse—it may differ from the original file. Very large documents are processed entirely in memory in your browser. Invalid JSON returns an error message instead of partial output.
Example
Minified input {"user":{"id":7,"name":"Ada"},"ok":true} pretty-prints with two-space indentation so nested objects and arrays are easy to scan:
{
"user": {
"id": 7,
"name": "Ada"
},
"ok": true
}
Invalid JSON returns an error instead of a partial tree, which helps catch typos before you commit a config file.