JSON Validator
Check whether a string is valid JSON. Reports the line and column of any syntax error. Browser-only, free.
About JSON Validator
The JSON validator parses your input against RFC 8259 (the JSON standard) and tells you whether the document is syntactically valid. When it isn't, the validator pinpoints the line and column of the first parse error and explains what was expected. Because parsing happens locally in your browser via the built-in JSON.parse engine, no data ever leaves your device.
When to use it
- Quickly checking that a hand-edited JSON config still parses
- Verifying that an API response copied from the browser is complete (not truncated)
- Catching trailing-comma, unquoted-key, or mismatched-bracket errors before deploying
- Locating the exact character that broke a CI pipeline expecting valid JSON
- Confirming that escaped characters in strings are correctly formed
How it works
The input is fed to JSON.parse. If parsing succeeds, the document is reported as valid along with a summary of its top-level shape (object, array, scalar) and size. If parsing throws a SyntaxError, the error message is mined for a position offset which is then translated into a line and column for easier navigation.
Examples
{"name":"Ada","active":true}✓ Valid JSON Type: object 2 top-level keys
{"name": "Ada", "skills": [1, 2,]}✗ Invalid JSON Unexpected token ']' (line 1, column 33) Trailing commas are not allowed.
{name: 'Ada'}✗ Invalid JSON Unexpected token 'n' (line 1, column 2) Keys must be wrapped in double quotes.
Frequently asked questions
- What does 'valid JSON' mean?
- Valid JSON means the input conforms to RFC 8259: objects with double-quoted string keys, no trailing commas, no comments, no single quotes, and only the data types null, boolean, number, string, array, and object.
- Why does it reject single-quoted strings?
- JSON strings must use double quotes. JavaScript object literals accept single quotes, but JSON is a strict subset that does not. If you have JS-style data, convert it to proper JSON first.
- Are JSONC and JSON5 considered valid?
- No. JSONC (JSON with comments, used by VS Code) and JSON5 (which adds trailing commas, unquoted keys, and more) are not strict JSON and will be reported as invalid. Use a dedicated JSONC or JSON5 parser if you need that flexibility.
- Is my data sent anywhere?
- No. Validation runs entirely in your browser using the native JSON.parse function. The input is never uploaded.
- Does it validate against a JSON Schema?
- This tool only checks syntactic validity, not schema conformance. To validate against a JSON Schema (required fields, types, ranges, etc.) use a schema validator like Ajv.