JSON Formatter & Validator
Format, validate, and beautify JSON data with 2 or 4 space indentation.
About this tool
Turn compact JSON into readable, indented text, or minify it for production. Errors from the parser are shown so you can find a stray comma or quote. Your data stays on your device.
How to use it
- Paste your JSON.
- Press a format option, Minify or Validate.
- Fix any reported error and copy the result.
Frequently asked questions
Why is my JSON invalid?
The usual causes are trailing commas, single quotes instead of double quotes, unquoted keys and comments. None of these are allowed in JSON.
Does JSON allow comments?
No. Standard JSON has no comment syntax.
What is the difference between formatting and minifying?
Formatting adds indentation for people. Minifying removes it for smaller files. The data is the same.