Skip to content

JSON Validator

Validate JSON syntax and find errors with line and column numbers

Is your JSON actually valid?

You hand-edited a config file and now your app throws Unexpected token at position 847. Something’s wrong, but the error message points to a byte offset, not a line number. Helpful.

Paste the JSON here and find out exactly what’s broken. The validator gives you the error type, line number, and column position. Trailing comma on line 15? Missing quote on line 23? You’ll see it immediately.

The mistakes everyone makes

Trailing commas. JavaScript tolerates them. JSON doesn’t. That "name": "John", right before the closing } will fail in every strict JSON parser.

Single quotes. 'hello' isn’t valid JSON. Has to be "hello". This trips up people coming from Python or JavaScript where both work.

Unquoted keys. {name: "John"} looks fine in JavaScript. In JSON, keys must be double-quoted: {"name": "John"}.

Missing commas. You added a new field and forgot the comma after the previous one. Easy to do in large files, easy to miss by eye.

Comments. // this is a comment breaks JSON. If you need comments, switch to JSONC or YAML.

Mismatched brackets. Deeply nested objects and arrays make it easy to lose track of a } or ].

When to validate

Before committing package.json, tsconfig.json, or .eslintrc.json. After hand-editing API responses for testing. When debugging a JSON.parse() error in your application. During data migrations when you’re transforming JSON and want to verify the output.

If the JSON is valid, you’ll see a green confirmation with a structure summary, how many keys in the top-level object, or how many items in the array. Then you can format it with the JSON Formatter if needed.

FAQ

What errors does it catch?

Everything the JSON spec defines as invalid: trailing commas, unquoted keys, single-quoted strings, missing commas, mismatched brackets, invalid escape sequences, and more.

Does it change my JSON?

No. The validator only checks for correctness. Your input isn’t modified. For formatting, use the JSON Formatter: it validates first, then formats.

Large files?

In-browser processing, no upload limits. Very large files (50MB+) depend on your device’s memory.

Validator vs Formatter?

The validator gives you detailed error information and stops there. The formatter validates, then adds indentation. Use the validator when you want diagnostics, the formatter when you want pretty output.

Client-side?

Yes, your JSON stays in your browser. Safe for sensitive data.

json validator syntax checker lint

Related Tools

More in Developer Tools