Pretty printing turns compact JSON into a readable structure with line breaks and indentation.
Minified JSON:
{"user":{"id":42,"name":"Asha","active":true},"roles":["admin","editor"]}
Pretty printed JSON:
{
"user": {
"id": 42,
"name": "Asha",
"active": true
},
"roles": [
"admin",
"editor"
]
}
If formatting fails, the JSON is likely invalid. Start here:
Validate JSON (common errors & fixes)
Related: Minify JSON · Sort JSON keys