JSON Formatter and Validator
Paste JSON to format it, check it for errors, sort its keys or squeeze it into one line. Errors show the exact line and column. Your data stays in your browser.
How to use the json formatter and validator
- Paste your JSON into the input box.
- Click Format / Validate to make it readable, or Minify to compress it.
- Copy the result or download it as a .json file.
The most common JSON mistakes are a trailing comma after the last item, single quotes instead of double quotes, unquoted keys, and comments, none of which are allowed in JSON. The error message and the line number point you to the spot.
Frequently asked questions
Is my JSON sent to a server?
No. It is parsed by your browser and never leaves your computer.
Why is my JSON invalid?
Typical causes: a trailing comma, single quotes, an unquoted key, a missing bracket or a comment. The error shows where the parser stopped.
What does sort keys do?
It orders the keys of every object alphabetically, which makes two JSON files easier to compare.
