JSON Validator

Check a document against RFC 8259 and get the exact line and column of the first error.

Runs in your browser — nothing is uploaded

Validation result

About the JSON Validator

Paste a document and it is parsed immediately. Valid input reports the top-level type, how many leaf values it contains and its size in bytes; invalid input reports what went wrong and where.

Native browser errors only give a character offset, which is useless on a 4,000-character single line. This tool converts that offset into a line and column you can jump to in your editor.

Validation is syntax-only. If you need to check that a document matches a contract — required fields, value types, enums — use a JSON Schema instead.

FAQ

JSON Validator — frequently asked

What standard does this validate against?

RFC 8259, the current JSON specification. That means double-quoted keys and strings, no trailing commas, no comments, and no unquoted identifiers. Documents that rely on JSON5 or JSONC extensions will be reported as invalid here even though some parsers accept them.

It says valid, but my API still rejects it. Why?

Syntax validity and schema validity are different things. This checks that the document parses; it does not know that your API requires a userId field, or that status must be one of three values. For that you need JSON Schema validation, which the JSON Schema toolkit on this site handles.

Why does the error only show the first problem?

JSON parsers stop at the first syntax error because everything after it is ambiguous — a missing bracket changes how the rest of the document should be read. Fix the reported position and re-run; subsequent errors will surface one at a time.

Are duplicate keys an error?

RFC 8259 says key names “should” be unique but does not forbid duplicates, so a document with them still parses. Most implementations, including JavaScript, silently keep the last occurrence. It is worth treating duplicates as a bug in whatever produced the document.

Does a bare string or number count as valid JSON?

Yes. Since RFC 7159 the top level may be any JSON value, so "hello", 42, true and null are all valid documents on their own. Older parsers that predate that change may require an object or array at the top level.

Is my data sent anywhere?

No. Validation uses the browser's own JSON parser and runs entirely on your device. No request carries your input off the page.

    Report an issue