JSON validator
About JSON Validator
This JSON validator checks a document against RFC 8259 and points to the first syntax error by line and column. You get the exact spot and the parser's reason instead of a vague "invalid JSON".
Use it on a broken payload: a missing comma, an unquoted key, a stray trailing comma or a truncated response. Valid input gets a summary with its key and line counts.
Runs in your browser. Nothing is uploaded.
How it works
Strict RFC 8259 mode
Strict mode is on by default. Keys and strings need double quotes, comments are not allowed, and numbers follow the spec's grammar. This is how servers, databases and standard parsers read your data.
Allow trailing commas, or go lenient
Turn on Allow trailing commas to accept a comma before a closing bracket or brace. Turn Strict off to also allow // and /* */ comments. Both help with config-style files.
Line and column error markers
When parsing fails, you get the line and column of the first bad character and a snippet of the text around it. Jump straight there instead of scanning the whole document.
What counts as valid
A valid JSON document is one value: an object, array, string, number, boolean or null. Brackets must balance, keys must be quoted, and nothing may follow the value.
Frequently asked questions
What does RFC 8259 strict validation reject?
Comments, trailing commas, single-quoted or unquoted keys, and number formats like hexadecimal or a leading plus sign. JavaScript object literals allow these, but JSON does not.
Should I allow trailing commas?
Only for a config-style file that uses them on purpose. For data a standard parser will read, keep strict mode on so you catch commas that would fail on the server.
The validator points to a line but it looks fine. Why?
The real mistake is usually just before the marker. A missing comma or an unclosed string on the previous line makes the parser fail at the next token. Check the character right before the flagged spot.
Is it safe to validate sensitive JSON here?
Yes. Validation runs in your browser and the input never leaves the tab.
Does valid JSON mean my data is correct?
It means the syntax is well-formed. It does not check values against a schema or your business rules. Use the JSON Schema generator's validate mode for that.
Learn more
Sources & last verified
We checked this tool's behavior and the claims on this page against the specifications below on . The tool runs in your browser, so the output you see is exactly what the engine produced.
Found a wrong result or an outdated claim? Report an error and we will check it again.