JSON validator
Check JSON syntax and find errors fast.
Runs in your browser. Nothing you type is sent anywhere.
- Exact error location
- Jump straight to the error
- Nothing uploaded
How to validate JSON
- Paste or upload your JSON.
- Read the pass or fail banner.
- Fix the line and column shown, if any.
Valid vs invalid JSON
| Example | Valid? | Why |
|---|---|---|
| {"a": 1} | Yes | Double-quoted key, plain number |
| {'a': 1} | No | Single quotes are not allowed |
| {"a": 1,} | No | Trailing comma before the closing brace |
| {a: 1} | No | The key is not quoted |
| // note\n{"a": 1} | No | JSON has no comment syntax |
What JSON validation does not check
- Whether the data matches an expected shape or schema.
- Whether required fields are present, or that a field holds the type you expect.
- Anything about how the JSON was produced, only whether the text itself is well-formed.
Where a JSON validator helps
- Checking an API response before writing code against it.
- Confirming a config file edited by hand is still syntactically correct.
- Sanity-checking JSON generated by a script or a language model before you use it.
JSON validator FAQ
What kinds of errors does this catch?
Syntax errors such as missing commas, unquoted keys, trailing commas and mismatched brackets. It does not check your data against a schema.
Why does it say my JSON is invalid but it looks correct?
JSON does not allow trailing commas, single quotes or comments, even though JavaScript object literals do. Those are the most common causes.
Can I check JSON from an API response?
Yes. Paste the raw response body, or upload it as a .json or .txt file.
Does it validate against a JSON Schema?
No, only that the text is syntactically valid JSON. Use a schema validator separately for structure and type rules.
Does a green "Valid JSON" result mean my data is correct?
It means the text follows JSON's grammar exactly, nothing more. A valid JSON document can still be missing fields or hold the wrong values for whatever you plan to do with it.
Can I validate a JSON Lines (NDJSON) file, with one object per line?
Not directly, since this validator expects one JSON value for the whole input. Wrap the lines in an array and add commas between them, or check one line at a time.
Can I check JSON pasted from a chat with an AI assistant?
Yes, that is a common source of a stray trailing comma or single quotes. Paste the raw text and the validator flags the exact line and column to fix.
Does whitespace or indentation affect whether JSON is valid?
No. JSON allows any amount of whitespace between tokens. Indentation is only a style choice; validity depends only on structure and syntax.