What is this tool?
A JSON formatter and validator takes JSON that's crammed onto one line and indents it so it's readable, and when there's a syntax error it points to the exact line and column that's wrong. Beyond pretty-printing, it can minify (strip whitespace to shrink the size), sort keys, show the structure as a collapsible tree, highlight syntax, and even load JSON from a web address (URL). All processing happens inside your own browser.
How to use it
1. Paste JSON into the input on the left, or load it from the URL of a public API or .json file. 2. Choose the indentation style and whether to sort keys. 3. The formatted result appears on the right, and any error is reported with its location. Copy the result or download it as a file, or minify it into a single line.
When to use it
Debugging an API response by expanding crammed JSON to see its structure, hunting down a typo or an unbalanced bracket in a config file (package.json, tsconfig, and the like), tidying JSON printed in a log, or sorting keys before sharing it with someone. It's also used to minify JSON down to reduce transfer size.
Tips and gotchas
The error message gives a line and column — start there. The usual culprits are a missing comma, an unclosed quote or bracket, or a stray trailing comma after the last item. Loading from a URL needs the server to allow CORS; if it's blocked, just copy the content and paste it in. Sorting keys makes changes easier to compare (diff) in version control.