Developer tools
JSON validator.
Paste JSON to check it against the standard. You get a clear valid or invalid verdict, the line and column of the first error with a pointer to the character, and warnings for duplicate keys and numbers that lose precision.
Your JSON
Result
What counts as valid JSON
This page applies the grammar in RFC 8259, The JSON Data Interchange Format (December 2017), and ECMA-404, The JSON Data Interchange Syntax describes the same syntax: one value (object, array, string, number, true, false or null), double-quoted strings and property names, and only space, tab, line feed and carriage return as whitespace between tokens. A bare string or number is a valid JSON text; it does not have to be an object.
What this JSON validator checks
Syntax and nothing else: that the text is exactly one well-formed JSON value. It reports the first error with its 1-based line and column, a caret under the offending character, and a hint such as "Delete the comma" when the likely fix is clear. It also warns, without failing, about repeated property names, a leading byte order mark (section 8.1 of RFC 8259, The JSON Data Interchange Format (December 2017) says parsers may ignore one), and numbers a JavaScript double cannot hold exactly.
Syntax is not schema
A document can be valid JSON and still wrong for your API: a string where you need a number, a missing field. Checking that needs a schema, which is what the JSON Schema validator is for.
Big numbers and duplicate keys are flagged, not changed
Most tools run JSON.parse and then JSON.stringify, which silently turns 9007199254740993 into 9007199254740992 and drops all but the last copy of a repeated key. This page keeps every number and string exactly as you wrote it. When a number has more precision than an IEEE 754 double can hold, as JavaScript numbers do, it gets a warning, because RFC 8259, The JSON Data Interchange Format (December 2017) (section 6) says software that expects no more than that precision interoperates best. Repeated property names get a warning with the line and column, because section 4 says names should be unique and that many parsers keep only the last one.
Common JSON errors and how to fix them
- Trailing comma after the last item, as in
[1, 2,]. The grammar only allows a comma between two values. Delete it. - Single quotes or unquoted property names. JSON needs
"name"in double quotes; JavaScript object literals are more relaxed than JSON. - Comments (
//or/* */). JSON has no comment syntax. - Leading zeros such as
007, a leading+, or a bare.5. Write7and0.5, or quote an ID that needs its zeros. NaN,Infinityandundefined. None is a JSON value; usenullor a string.- Raw line breaks inside a string. Write
\ninstead; control characters below U+0020 must be escaped.
Frequently asked questions
What does a JSON validator check?
It checks that the text follows the JSON grammar: matching brackets and braces, double-quoted strings and keys, commas only between items, valid numbers and escapes, and exactly one top-level value. It does not check what the values mean.
Can JSON have comments or trailing commas?
No. Neither appears in the grammar in RFC 8259 or ECMA-404, so a strict validator rejects both. Formats like JSON5 and JSONC allow them, but they are different formats.
Is a plain string or number valid JSON?
Yes. RFC 8259 defines a JSON text as any serialized value, so "hello", 42 and null are valid on their own. Older specifications required an object or array at the top level.
How is this different from JSON Schema validation?
This tool checks syntax: is it JSON at all. JSON Schema validation checks structure and types against rules you supply. A document must pass the first before it can pass the second.
Sources
RFC 8259, The JSON Data Interchange Format (December 2017); ECMA-404, The JSON Data Interchange Syntax. All retrieved 2026-10. Parsing and formatting run entirely in your browser; this tool does not check your JSON against a schema or verify what the values mean.