How to use the json formatter
- Paste your JSON into the box, or drop a .json file on it.
- Click Format to indent it, or Minify to put it on one line. It is validated as you type.
- If there is a mistake, the exact line and column are shown and the cursor jumps there. Copy or download the result when it is valid.
Frequently asked questions
Is my JSON sent to a server?
No. Parsing and formatting happen in your browser, so API keys, tokens and customer data in your JSON stay on your machine.
What are the most common JSON errors?
A trailing comma after the last item, single quotes instead of double quotes, keys without quotes, comments (JSON does not allow them), and unescaped line breaks inside strings.
What is the difference between formatting and minifying?
Formatting adds line breaks and indentation so people can read it. Minifying removes all unneeded spaces, making the file smaller for sending over a network. Both contain exactly the same data.
Can it sort keys?
Yes. Tick “Sort keys” to order object keys alphabetically at every level — handy for comparing two JSON documents.