← Back to tool

Validate · Locate errors · Fix

JSON Validator

Updated: June 2026

A JSON validator answers one urgent question: is this text actually valid JSON, and if not, exactly where is it broken? Instead of a vague "parse error", a good validator points you to the line and column where the problem starts so you can fix it in seconds.

Validate My JSON →

Free · No upload · Instant in the browser

What makes JSON valid

JSON has a small, strict grammar, and most errors come from forgetting its rules. Keys must be double-quoted strings. Strings use double quotes, never single quotes. There are no trailing commas after the last item in an object or array. Comments are not allowed. Numbers cannot have leading zeros or a trailing dot. The only literals are true, false and null, all lowercase. Break any of these and the document is rejected as a whole.

The validator parses your text against exactly these rules and reports the first violation it finds, including a human-readable message and the position in the document.

The most common errors

MistakeFix
Trailing comma before } or ]Delete the last comma
Single-quoted stringsUse double quotes
Unquoted object keysWrap keys in double quotes
Comments (// or /* */)Remove them — JSON has no comments
Missing comma between itemsAdd the separator

If you are dealing with almost-JSON that uses these conveniences on purpose — say, a config in JSON5 style — turn on the Repair option and the tool will fix the common cases automatically before validating.

Reading the error position

When validation fails, the tool shows a message such as Unexpected token } in JSON followed by the line and column. The column counts characters from the start of the line, so column 14 means the fourteenth character. Jump to that spot in your editor and you will almost always find the real cause one token earlier — a missing comma, an unclosed string or an extra bracket. Fixing it and re-validating until the document turns green is the fastest way to clean up machine-generated or hand-edited JSON.

Validate before you ship

Invalid JSON fails loudly and late: an API rejects the request, a config loader crashes on boot, a data pipeline drops a record. Validating first turns those runtime failures into a two-second check. It is especially worth doing after hand-editing a config, after concatenating responses, or after a find-and-replace that might have unbalanced a bracket. The validator runs entirely in your browser, so you can paste sensitive payloads — tokens, credentials, customer data — and check them without anything being uploaded.

Frequently asked questions

How do I validate JSON?

Paste your JSON and select the Validate tab. The tool reports whether it is valid and, if not, the exact line and column of the first error.

Why does it say my JSON is invalid?

Common causes are trailing commas, single quotes, unquoted keys, comments or a missing comma. The error message and position point you to the spot.

Can it validate JSON with comments?

Strict JSON has no comments, so they fail validation. Enable Repair to strip comments and trailing commas automatically before checking.

Is the validator safe for private data?

Yes. Validation runs locally in your browser. Nothing is uploaded, so secrets and personal data never leave your machine.