What this validator does
Paste JSON, or open a file, and the validator checks it as you type. When something is wrong, it says what, in plain words, and where: the line, the column, and the place marked in an excerpt. For the most common mistakes, a Repair button fixes them and tells you exactly what it changed. Valid JSON can be formatted, compacted, sorted, copied or downloaded, and its structure explored.
Everything happens in your browser: nothing is uploaded, saved or added to the page address, and closing the page forgets the text. That is also why the tool does not load JSON from a web address: that would go through a server.
How to read an error
- The explanation names the mistake, such as “There is a comma after the last item”.
- The place gives the line and column; the excerpt shows the line with a caret (^) under the spot. “Show me” selects it in the field.
- For a bracket or brace left open, the validator also tells where it was opened, which is usually where to look.
The place is where the reader noticed the problem. Sometimes the real mistake is just before it, such as a missing comma at the end of the previous line.

On the screenshot, with an example:
- Whether the JSON is valid, and what is wrong in plain words.
- Where: the line and the column.
- The line itself, with a caret under the spot.
- Repair, for the most common mistakes.
The most common JSON mistakes
- A comma after the last item:
[1, 2, 3,]or{"a": 1,}. Allowed in JavaScript, not in JSON. - Single quotes:
{'name': 'Ada'}. JSON only accepts double quotes. - Names without quotes:
{name: "Ada"}. Every name needs double quotes. - Comments:
// noteor/* note */are not part of JSON. - Values JSON does not know:
NaN,undefined,Infinity, or Python’sTrue,FalseandNone. JSON hastrue,falseandnull. - Numbers written differently: leading zeros (
007), a plus sign, or a lone dot (.5). - A line break inside a text: write it as
\n. - A missing comma or bracket, often after copying part of a larger file.
Repair, format, compact, sort
- Repair fixes trailing commas, comments, single quotes, unquoted names and values JSON does not allow, then lists what it changed. Check the result: replacing
NaNwithnull, for example, keeps the JSON valid but changes its meaning. - Format lays the JSON out with 2 spaces, 4 spaces or tabs, one item per line.
- Compact removes all spacing, for the smallest size.
- Sort names A to Z orders the names in every object, which makes two JSON files easier to compare.
Large numbers and duplicate names
JavaScript, and many other programs, round whole numbers above 9,007,199,254,740,991. Most validators silently change such numbers when they format. This one keeps their exact digits and warns you, because the program that reads the JSON may still round them.
The same name twice in one object is allowed by the JSON rules but usually a mistake: most programs keep only the last value. The validator lists those names.
Frequently asked questions
Is my JSON sent anywhere?
No. The check, the repair and the formatting run in your browser, and nothing is kept: no history, no link.
How large a file can it handle?
Several megabytes work in a recent browser. The structure view shows the first 2,000 items so that the page stays responsive.
Does it check a JSON Schema?
Not yet: it checks that the text is valid JSON, not that it matches a schema.