Overview
The JSON formatter parses pasted JSON, prints a prettified version and also returns a minified output. It is useful for debugging payloads, cleaning copied data and sharing readable JSON during development.
How it works
- 1
Paste JSON and choose an indentation size.
- 2
The parser validates the input and throws an error if the JSON is invalid.
- 3
When valid, the tool returns prettified output, minified output and line count.
Examples
API payload cleanup
Input: {"status":"ok","items":[1,2]}
Output: Pretty-printed JSON
Makes logs and payloads easier to inspect during debugging.
Share compact output
Input: Formatted JSON
Output: Minified JSON
Useful when you need the smallest payload representation.
FAQ
Does it change key order?
No. The formatter preserves the parsed object's key order as returned by JavaScript.
Can it fix broken JSON automatically?
No. The formatter validates valid JSON and shows an error when the input is broken so you can fix it safely.
