JSON Formatter
Pretty-print or minify JSON, with inline error reporting.
Formatted JSON appears here
Common questions
Is my JSON sent to a server?
No. Formatting, minifying, and validation all run in your browser, so nothing you paste leaves your machine.
What is the difference between format and minify?
Format (pretty-print) adds indentation and line breaks so the JSON is easy to read. Minify strips every optional space and newline into one compact line, which is handy for payloads and storage.
Why does it show an error while I type?
The validator parses your input live and points out the first syntax problem it finds, such as a trailing comma or a missing quote, so you can fix it before copying.
What happens to duplicate keys?
A JSON object cannot hold the same key twice. The parser keeps the last value for a repeated key and drops the earlier ones, which is standard JavaScript behaviour.
Can I collapse large objects?
Yes. The formatted tree view has fold toggles on every object and array, so you can collapse parts of a large document and read just the part you care about.