A JSON validator that explains what is wrong
This JSON validator checks your text against the strict JSON grammar defined in RFC 8259, the same rules that JSON.parse, Python's json module and most API frameworks enforce. When the document is broken, you get a message that describes the actual mistake, such as a trailing comma or a single-quoted string, along with its line and column. It checks syntax, not JSON Schema: to test a document against a schema, use the JSON Schema Validator.
Browsers phrase parse errors differently and sometimes omit the position altogether. The validator runs its own scanner over failing input, so the wording is consistent no matter which browser you use.
Example: finding a trailing comma
This snippet looks fine at first glance:
{
"id": 7,
"name": "Ana",
"tags": ["a", "b",]
}
Validating it stops at Trailing comma before ']' is not allowed (line 4, column 21). Remove the comma after "b" and the result becomes Valid JSON ✓ (1 objects, 1 arrays, 3 keys, depth 2).
Error messages and what they mean
The validator reports the first problem it meets, then stops. Fix it and the next one, if any, will surface.
| Message | Typical cause |
|---|---|
| Strings must be wrapped in double quotes, not single quotes | 'Ana' copied from JavaScript or Python |
| Expected a property name in double quotes | Unquoted key such as {id: 7} |
| Comments are not allowed in JSON | // or /* */ left in a config file |
| NaN and Infinity are not valid JSON numbers | Output from a program that serialized a failed calculation |
| 'undefined' is not a valid JSON value | A JavaScript variable that was never set |
| Literals must be lowercase: true, false, null | True, None or NULL from Python or SQL |
| Unescaped line break inside string (use \n) | A multi-line value pasted into a string |
| Invalid number format (leading zeros, hex and trailing dots are not allowed) | 007, 0x1F or 1. |
| Unexpected '{' after the end of the JSON data | Two documents pasted back to back |
| Unterminated string: missing closing double quote | A truncated file or a quote that was deleted |
Two positions are worth knowing. A comment directly after a value is reported as Expected ',' or '}' but found '/', because the scanner was expecting a separator there. And an error at the very end of the file, such as an object that is never closed, usually points to a missing bracket much earlier.
Reading the success summary
Valid input produces a line like Valid JSON ✓ (2 objects, 1 arrays, 4 keys, depth 3). Objects and arrays are counted at every level, keys is the total number of properties across all objects, and depth is how far the deepest value sits below the root. A bare value such as "hello" is valid on its own and reports zero for everything. The summary is a quick sanity check: if an export should hold 500 records but the array count looks wrong, you know before importing it.
A few inputs pass that people do not expect. A UTF-8 byte order mark at the start is ignored, and duplicate keys are accepted, with the last value winning.
Syntax validation vs schema validation
This page answers one question: is the text well-formed JSON? It does not know whether price should be a number or whether email is required. That kind of check needs a JSON Schema. You can generate a starting schema from a sample document with the JSON to JSON Schema tool and then tighten the rules by hand.
If the file is broken in many places, the JSON fixer or the Repair button here usually handles quotes, commas and comments in a single pass. For files that are meant to contain comments, validate them as JSON5 with the JSON5 formatter instead.
Privacy
Validation is done by JavaScript in your browser and the document is not uploaded. Only Load URL, which fetches the file through our server, and Save & Share, which stores the input for the link, involve the server.