How to use it
- Paste your JSON into the box, open a file, or press “Try an example” to see an error report.
- Read the result: a green message for valid JSON, or the first error with its line, column and a marker under the problem.
- Fix the error the hint describes and check again; the result updates as you type.
- For valid JSON, read the statistics: root type, number of keys, nesting depth and size in bytes.
How it works
The validator checks syntax against the JSON standard (RFC 8259 / ECMA-404) using the browser's own JSON parser, so a document that passes here is accepted by JavaScript's JSON.parse and by standard-conforming parsers in other languages. When parsing fails, a strict checker written for this tool walks the text once to find the first error and its exact line and column, then shows that line with a ^ marker under the problem.
The hints focus on the mistakes people actually make when JSON is written by hand or copied from JavaScript: a comma after the last item, single-quoted strings, unquoted keys, // or /* */ comments, values like NaN, Infinity or undefined, raw line breaks inside strings, and two JSON documents pasted one after another (as in JSON Lines files). Only the first error is reported, because one mistake often confuses everything after it.
The tool checks syntax only. It does not validate against a JSON Schema, so it cannot tell you whether a required field is missing. It also does not warn about duplicate keys: the standard allows them, and most parsers keep the last value. Statistics count keys in every object at every level; depth is 1 for a flat object or array and grows by one for each level of nesting.
Examples
Config copied from JavaScript
{name: 'demo', debug: true,} fails at line 1, column 2 with “Object keys must be in double quotes”. After quoting the key, the next run points to the single-quoted string, then to the trailing comma.
A log file with one object per line
Pasting two lines such as {"id":1} and {"id":2} reports “more content after the end of the JSON value” at line 2. Each line is valid JSON on its own (JSON Lines), but together they need to be wrapped in [ ] and separated by a comma.
Checking an API payload
A 2 MB response validates in a moment and shows Root type: Array, 1,500 top-level items and a nesting depth of 4, a quick sanity check before writing code against it.
Frequently asked questions
Does this validate against a JSON Schema?
No. It checks that the text is well-formed JSON. Checking required fields, types or formats needs a JSON Schema validator, which this tool does not include.
Why is only one error shown?
After the first syntax error a parser cannot know what the author meant, so later “errors” are often side effects of the first. Fix the reported problem and the next one, if any, appears immediately.
Are comments or trailing commas ever valid?
Not in JSON. Formats such as JSON5 and JSONC (used by some editors' settings files) allow them, but standard JSON parsers reject them, so they are reported as errors here.
Is a single value like 42 or "hello" valid JSON?
Yes. Since RFC 7159 any JSON value can be the root, not only objects and arrays. Some older tools and APIs still expect an object or array at the top level.
Why can the column differ from my editor's column?
Columns are counted in UTF-16 code units, the way JavaScript counts string length. Emoji and some rare characters count as two, and a tab counts as one column, while editors may display it wider.
Privacy
Validation runs entirely in your browser. The JSON you paste or open is not uploaded, stored or included in analytics.