JSON Formatter
Pretty-print, validate and minify JSON locally in your browser.
Related Tools
0 comments
How it works
Input is parsed with JSON.parse(). On success the parsed value is re-serialised with JSON.stringify(value, null, indent) for pretty output, or JSON.stringify(value) for minified output. Errors from JSON.parse() are surfaced verbatim — they include the position of the offending character so you can jump straight to the problem. The whole process is local; your payload never leaves the page, which matters when you are inspecting API responses with auth tokens.
Common use cases
- Beautifying a single-line JSON response from a curl command for human inspection.
- Minifying a large JSON config before embedding it in a string literal.
- Quickly validating that a hand-edited JSON config is still parseable.
Frequently asked questions
Does it support comments or trailing commas?
No. Standard JSON does not allow either, and the tool uses the standard parser. Use a JSON5 parser if you need those features.
Will it sort keys?
Not currently — order is preserved as parsed. JSON does not specify object-key order, but most engines (V8, SpiderMonkey) preserve insertion order.
How big can my JSON be?
Anything your browser can parse. Multi-megabyte payloads work; tens of megabytes may freeze the tab briefly.
Is my JSON sent to a server?
No. Everything runs in your browser using JSON.parse() and JSON.stringify().