Developer Tools

JSON Validator

Instant strict JSON syntax checking with the exact error line and column, a marked editor gutter, and one-click jump to the mistake.

100% browser-side processing — nothing is uploaded

Validate: Check syntax and show the exact error line. Output updates live as you type — or press Ctrl/Cmd + Enter.

Results update live as you type.
14 lines · 0.29 KB
1 lines · 0.00 KB

Related tools

How to validate JSON

  • Paste JSON

    Drop the suspect JSON into the editor. Validation runs live on every keystroke.

  • Read the error

    Invalid input shows the parser message with line and column; the gutter marks the line in red.

  • Jump and fix

    Click "Go to line" to select the offending line, fix it, and watch the status flip to valid.

The five mistakes behind almost every invalid JSON

Strict JSON rejects several things JavaScript happily accepts, and the same five account for most failures: a trailing comma after the last item of an object or array; unquoted or single-quoted keys; single-quoted string values; comments (JSON has none, by design); and literal undefined or NaN, which the spec does not define. If a payload came from copy-pasting a JS object literal out of code, expect at least one of these. The fix is usually mechanical once the validator points at the right line.

How to read the line and column the parser reports

Parsers report the first position where the text stopped making sense — which is usually one token after the actual mistake. A missing comma between two properties is reported at the start of the second property; an unclosed string often surfaces at the end of the file. So when the message says line 12, read line 11 and the start of 12 together. The gutter marker and "Go to line" button select the whole reported line to make that scan fast.

JSON Validator FAQ

What does this validator check?

Strict syntax per RFC 8259 — the same rules as JSON.parse in every browser and Node.js. If it passes here, it will parse anywhere. It does not check against a JSON Schema; it validates syntax, not shape.

Are trailing commas really invalid?

Yes. JavaScript and JSON5 allow them, but strict JSON does not. A trailing comma after the last array element or object property is the single most common validation failure.

Why is the reported error position slightly off?

Parsers fail at the first character that no longer fits the grammar, which typically sits just after the real mistake. If line 12 column 5 looks fine, check the end of line 11 — a missing comma or quote there is the usual culprit.

Can I validate JSON with comments?

Not as-is — comments are not part of the JSON specification. Files like tsconfig.json use JSONC, a superset. Strip the comments first, or expect the validator to flag them.

Is anything uploaded?

No. Validation runs locally in your browser, so payloads containing secrets or personal data never leave your machine.