JSON formatter & validator
Tidy it, check it, or squash it flat — and get told exactly where the problem is when it will not parse.
Your JSON
Paste anything. It is checked as you type.
Result
The four things that break JSON
Almost every invalid JSON file fails for one of these reasons:
| Wrong | Right | Why |
|---|---|---|
{"a":1,} | {"a":1} | No trailing commas allowed |
{'a':1} | {"a":1} | Double quotes only |
{a:1} | {"a":1} | Keys must be quoted |
{"a":undefined} | {"a":null} | There is no undefined in JSON |
JavaScript object syntax allows all four of the wrong ones, which is exactly why people write them by mistake. JSON is stricter than it looks.
Formatted or minified?
- Formatted while you are reading or editing. Indentation is what makes a nested structure comprehensible.
- Minified for anything that travels — an API response, a config embedded in a page, a schema block. The whitespace is pure weight.
On a large file, minifying often removes 20–30% of the bytes, all of it whitespace.
A note on structured data
If you are pasting a JSON-LD schema block, remember to keep the surrounding
<script type="application/ld+json"> tags out of the box — those are HTML, not
JSON, and will fail validation here even though the page is correct.
Nothing is uploaded
The parsing happens in your browser. This matters because JSON pasted into a formatter is very often an API response containing keys, tokens or customer records. None of it leaves your machine.
Common questions
Why does my JSON say "unexpected token"?
Nearly always a trailing comma after the last item in an object or array, or a single quote where a double quote is needed. The error message above gives you the line and column.
Can it handle very large files?
It handles a few megabytes comfortably. Beyond that your browser may slow down, since everything runs locally rather than on a server.
Does sorting the keys change the meaning?
No. Key order carries no meaning in JSON, so sorting is safe and makes two versions of the same data much easier to compare.
Is my JSON sent anywhere?
No. Nothing is uploaded, stored or logged.
Want this checked on your real account?
A tool can only work with the numbers you give it. If you want someone to look at what is actually happening in your ad account, the first conversation is free.
Book a free consultation