JSON formatter and validator
Paste JSON to format it, minify it or find the exact line where it breaks. Everything runs in your browser.
Result
Formatted JSON appears here.
The four mistakes that break most JSON
- Trailing commas.
[1, 2, 3,]is fine in JavaScript but invalid JSON. - Single quotes. Strings and keys must use double quotes:
"name", not'name'. - Unquoted keys.
{ name: 1 }must be{ "name": 1 }. - Comments. JSON has no comments. Remove
//and/* */lines.
Working with tokens too? Try the JWT decoder.
Frequently asked questions
Is my JSON sent to a server?
No. Formatting and validation run entirely in your browser with JavaScript's built-in JSON parser. Nothing is uploaded or stored.
Why does it say my JSON is invalid?
The most common causes are a trailing comma after the last item, single quotes instead of double quotes, unquoted keys, and comments. JSON allows none of these, even though JavaScript does.
What's the difference between formatting and minifying?
Formatting adds line breaks and indentation so people can read it. Minifying removes all unnecessary whitespace so the file is as small as possible for sending over a network.
New games, tools and tutorials
About one short email a week. No spam, one-click unsubscribe.