Skip to content
TinySolve

JSON Validator

Find out exactly where your JSON breaks — and what is most likely causing it.

Runs in your browser — nothing you type is sent anywhere

Your JSON

Paste some JSON above

It is checked as you type. If something is wrong you get the line, the column and, where possible, what to do about it.

About the JSON Validator

JSON error messages are famously unhelpful. "Unexpected token } in JSON at position 847" tells you where the parser gave up, which is often a line or two after the thing that is actually wrong, and says nothing about what to do next.

This shows the failure in context: the line and column, the surrounding lines with the offending one marked, and a caret under the exact character the parser stopped at. Seeing it in place is usually enough on its own.

Underneath that it lists the likely causes. A trailing comma before a closing brace, single quotes instead of double, an unquoted key, a comment, a NaN, or braces that do not balance — those six account for the overwhelming majority of invalid JSON, and each is checked for directly. The checks deliberately ignore anything inside a string, so a comma in a sentence or an apostrophe in a name is never reported as a problem.

When the document is valid you get more than a green tick: the number of objects, arrays and keys, and how deeply it nests. That is often the real question — whether the structure is what you expected, not merely whether it parses.

Everything runs in your browser. API responses and configuration files routinely contain keys, tokens and customer data, and none of it is transmitted, stored or logged here.

How to use the JSON Validator

  1. Paste your JSON

    It is checked as you type. A byte order mark from a copied file is handled rather than reported as a mystery error at position 0.

  2. Read the location

    The line and column, with the surrounding lines shown and a caret under the character the parser stopped at.

  3. Check the likely causes

    The handful of mistakes that account for most invalid JSON are tested for directly and named.

  4. Fix and paste again

    When it is valid you get the structure summary — objects, arrays, keys and nesting depth.

Frequently asked questions

Why does the error point at the wrong place?
Because a parser reports where it could no longer continue, not where the mistake was made. A missing comma on line 12 is usually only detected on line 13. That is why the likely-causes list exists — it looks at the whole document rather than the stopping point.
Can JSON have comments?
No. The specification has no comments at all, which surprises people coming from JavaScript. If you need them, JSON5 and YAML both allow them, and many tools that read configuration accept one of those.
Why is a trailing comma not allowed?
Because JSON was defined before JavaScript permitted it, and the format never changed. It is the single commonest cause of invalid JSON, since most editors and languages accept it everywhere else.
Does this check against a schema?
No, it checks syntax only — whether the document is valid JSON, not whether it has the fields something expects. Schema validation needs the schema, which is a different tool.
Is my JSON uploaded?
No. It is parsed in your browser. API responses and configuration files often contain keys, tokens and customer data, so nothing is transmitted, stored or logged.