JSON Validator

Check JSON syntax against RFC 8259 with exact line/column error reporting.

Input
1
2
3
4
5
6
7
Result
click Validate to check

Related Tools

Documentation

What is JSON Validator?

It checks whether a JSON document is syntactically valid against RFC 8259, and if it fails, tells you exactly where.

How it works

Your input is passed to JSON.parse(). On success, the tool walks the resulting object to count keys and measure nesting depth. On failure, the raw error offset is converted into a line and column.

Common errors

Trailing commas, single-quoted strings, unquoted keys, and comments are the four most frequent reasons hand-written JSON fails to parse.

Spec

RFC 8259 — The JSON Data Interchange Format

Frequently Asked Questions

What does a JSON validator check?

It runs your input through a strict RFC 8259 parser and reports whether the syntax is valid — double-quoted keys and strings, no trailing commas, no comments, correctly matched brackets.

Why does it say invalid when my JSON looks fine?

The most common causes are a trailing comma after the last item, single quotes instead of double quotes, or an unquoted key. The error message includes the exact line and column.

What are "Total Keys" and "Max Depth"?

On valid input, the tool reports the total number of object keys across the whole document and the deepest level of nesting — useful for quickly gauging how complex a payload is.

Is this different from the JSON Formatter?

The formatter validates as a side effect of formatting. This tool is for when you only want a pass/fail answer plus structural stats, without also reformatting the text.

Does it support JSON5 or JSONC (comments)?

No — it validates strict JSON per RFC 8259, since that's what browsers, servers, and virtually every JSON.parse implementation actually expects.

Is my data uploaded anywhere?

No. Validation runs entirely in your browser via the native JSON.parse. Nothing is sent to a server.