Free · No sign-up · Private

JSON Validator

Validate JSON and pinpoint syntax errors with a friendly message.

Quick answer

Paste JSON and the validator tells you at once whether it is valid. If it is not, it shows the parser’s error message, such as an unexpected token or an unterminated string, with its position, so you can jump straight to the mistake.

JSON ValidatorRuns in your browser
Result
✓ Valid

Valid JSON.

Step by step

How to use the JSON Validator

01

Paste your JSON.

02

See whether it is valid and any error details.

Worked examples

Valid and invalid examples

InputValid?Why
{"a": 1}YesKeys and strings in double quotes
{'a': 1}NoSingle quotes are not allowed
{"a": 1,}NoTrailing comma
[1, 2, 3]YesArrays are valid top-level values
{a: 1}NoKeys must be quoted

Good to know

Syntax versus schema

This checks that the text is well-formed JSON. It does not check that the data has the fields your application expects; that needs a JSON Schema validator.

Fixing errors quickly

Errors usually appear just after the real mistake. If the message points to a closing bracket, look at the line before it for a missing or extra comma.

JSON rules in brief

Keys and strings use double quotes; values are strings, numbers, true, false, null, objects or arrays; items are separated by commas with no comma after the last one; and the whole document is a single value. Numbers cannot have leading zeros or a trailing decimal point, and special values such as NaN or undefined are not allowed.

FAQ

Frequently asked questions

Is a single number valid JSON?

Yes. A string, number, true, false or null is valid JSON on its own.

Does it support JSON with comments?

No. Standard JSON has no comments.