JSON Schema Validator
Validate JSON against a JSON Schema: every error at once with its path, line and a hint. Catches field name typos and schema mistakes, drafts a schema from a sample.
Your data and schema never leave this page: parsing and validation run in your browser. The draft version is taken from the $schema field; if it is missing, 2020-12 is used.
Result
Data
Schema
Schema compliance
Caveats
What gets checked
Both fields are first parsed as JSON, and a parse error comes back with the line, column, and a hint: single quotes, a trailing comma, an unquoted key, a comment. Then the document is validated against the schema, and all errors are collected, not just the first one.
Each error carries a path to the value such as /items/1/price, the line number in the document, and an explanation of what is wrong: "expected a number, but here is the string "12500.50" — the number is wrapped in quotes, remove them".
Typos in field names
The most common cause of a "missing required field" error is a field that exists but is spelled slightly differently: custmer instead of customer. When a required field is missing but a similar one sits nearby, the validator names it. The same works for enum values: "Paid" instead of "paid" differs only in case, and the message says so.
Errors in the schema itself
A schema can be wrong too, and then validating a document against it makes no sense. An unknown type, a regular expression that cannot be read, a $ref pointing nowhere, minimum greater than maximum, required not given as a list — all of this is reported in a separate list, and the document is checked against the part of the schema that does read.
Drafts of the standard
Draft-04, draft-06, draft-07, 2019-09, and 2020-12 are supported. The draft is taken from the $schema field or chosen manually: it determines how items, prefixItems, exclusiveMaximum, and $ref are read.
What is not checked is listed in the caveats: unevaluatedProperties, $dynamicRef, references to other files, and rare formats. Everything else is checked.
A schema from your document
If you do not have a schema yet, a button builds its draft from your example: value types, nested objects, fields shared by array elements, date and email formats guessed from how the strings look. Every field from the example becomes required — it is a starting draft to refine, not the truth.
JSON Formatter
To turn a compact JSON document into a readable one, use JSON Formatter.
Rate this tool
Help us get better
Tell us what was missing.
Other tools
JSON Formatter
Format and repair JSON in the browser, flagging duplicate keys and long numbers
Regex Tester
Regex testing with a plain-language breakdown and hang protection
JWT Decoder
JWT parsing with fields explained and signature verification
CSV to JSON
A table to JSON with honest types and a reverse check
JSON to CSV
JSON to a table for Excel, with verification and formula protection
SQL Formatter
A readable query layout, verified against the source, with risky spots flagged
XML Formatter
Readable XML, errors explained with a hint, verified against the source
XML Validator
Markup, XSD schema, sitemap, YML and RSS rules, with the path to each error