JSON formatter and validator
JSON Formatter beautifies messy JSON with your choice of indentation, validates it and points to the exact line and column of any error, minifies it for production and can sort keys alphabetically — with syntax highlighting and size statistics.
- Free
- No sign-up
- Runs in your browser
- Nothing uploaded
- Size
- —
- Keys
- —
- Max depth
- —
- Root type
- —
Runs entirely in your browser — nothing you enter is uploaded.
How to use JSON Formatter
Three steps, about a minute.
-
1
Paste JSON
Paste or drop a .json file.
-
2
Format or minify
Errors are pinpointed if the JSON is invalid.
-
3
Copy or download
Use the result in your code or API call.
JSON Formatter questions
Why is my JSON invalid?
Common causes are trailing commas, single quotes instead of double quotes, unquoted keys and comments — none are allowed in standard JSON. The error message shows the line and column.
Is my JSON uploaded?
No. Everything happens in your browser, so it is safe for API keys and private data.
What does sort keys do?
It orders object keys alphabetically at every level, which makes two JSON documents easy to compare.