JSON Validator
Find out whether your JSON is valid and, if it is not, exactly where and why. Errors are explained in plain language and the faulty line is highlighted.
- Runs in your browser
- No sign-up
- Free to use
Waiting for JSON
Paste or type some JSON to validate it.
Structure
How to use JSON Validator
- Paste JSON into the editor or open a .json file. Validation runs automatically as you type.
- If the JSON is invalid, read the message and look at the highlighted line number.
- Fix the problem; the result updates immediately.
- When the JSON is valid, review the structure summary and any duplicate-key warnings.
JSON Validator features
Plain-language errors
Messages such as “Trailing comma: remove the comma before }” instead of a cryptic parser token error.
Exact position
The line and column of the first error are reported and the line is marked in the gutter.
Duplicate key detection
Warns when the same property name appears twice in one object, which parsers accept silently.
Structure summary
Shows root type, number of keys, arrays, values and nesting depth.
Strict RFC 8259 rules
Rejects comments, single quotes, trailing commas and other non-standard extensions.
Private
Validation happens in your browser, so API responses and config files stay confidential.
When to use JSON Validator
- Finding the syntax error that makes an API request body or config file fail.
- Checking hand-edited JSON such as package.json, tsconfig.json or a translation file.
- Verifying a payload from a third party before importing it.
- Teaching or learning what strict JSON does and does not allow.
JSON Validator FAQ
What makes JSON invalid?
The most frequent causes are a trailing comma after the last item, single quotes instead of double quotes, property names without quotes, comments, missing commas between items, and values such as undefined, NaN or dates written without quotes.
Why are duplicate keys only a warning?
The JSON specification says names should be unique but does not forbid duplicates, and most parsers simply keep the last value. That behaviour hides mistakes, so the validator flags it without declaring the document invalid.
Does it validate against a JSON Schema?
No. This tool checks syntax: whether the text is well-formed JSON. Schema validation, which checks that the data has the expected fields and types, is a separate step.
Is JSON with comments (JSONC) valid?
Not as standard JSON. Some tools, such as VS Code settings files, accept comments as an extension, but strict parsers reject them. Remove comments before sending the data to an API.
Is my data sent anywhere?
No. Everything runs locally in the browser.
The rules of valid JSON
JSON has a deliberately small grammar. A document is a single value: an object in curly braces, an array in square brackets, a string in double quotes, a number, or one of the literals true, false and null. Object members are a double-quoted name, a colon and a value, separated by commas. Whitespace is allowed between tokens and nowhere else matters.
What trips people up is that JSON looks like JavaScript but is stricter. JavaScript tolerates trailing commas, single-quoted strings and unquoted keys; JSON does not. Numbers cannot have leading zeros or a leading plus sign, and strings cannot contain raw line breaks. A validator applies these rules mechanically and stops at the first violation, which is why fixing one error sometimes reveals another further down.