JSON Schema Validator
Paste a JSON Schema and some JSON data and see at once whether the data is valid. Every problem is listed in plain words, with the place in your data and a link to its line, so you can fix it fast. It supports drafts 2020-12, 2019-09 and draft-07, checks formats such as email and date, and can make a first schema from your own data. It runs in your browser, so nothing is uploaded.
Checking…
Everything runs in your browser. The check stops after 4 seconds, in case a schema contains a very slow pattern.
How to use it
- Paste your schema on the left and your JSON data on the right, or press “Load sample” to see how it works.
- Read the result under the boxes. A green message means the data is valid. Otherwise each problem is listed with a plain message.
- Press “line 3, column 10” on a problem to jump to it in your data.
- No schema yet? Paste data and press “Make a schema from my data”, then tighten the rules by hand.
Frequently asked questions
What is JSON Schema?
JSON Schema is a standard way to describe what valid JSON looks like: which properties are required, what type each value has, allowed ranges, patterns and more. It is used to check data sent to an API, to validate configuration files and forms, and in OpenAPI descriptions. This tool checks a piece of data against a schema, like the validators used in code.
Which versions of JSON Schema are supported?
Drafts 2020-12 (the newest), 2019-09 and draft-07. By default the tool reads the $schema line in your schema to choose one, and uses 2020-12 when there is none. You can pick a draft yourself. Older drafts (draft-06 and draft-04) are checked with the draft-07 rules and the tool tells you when that may matter.
What does “The schema itself is not valid” mean?
The problem is in the schema, not in your data. For example a type is misspelled (“strin”), a limit has the wrong kind of value (minimum: “five”), or a $ref points at a part of the schema that does not exist. The message says which keyword is wrong. Fix the schema first, then the data is checked.
What are formats, and why can a format check fail?
A format such as email, date, date-time, uri, uuid or ipv4 asks for a particular shape of text. Newer drafts treat formats as hints by default, but most tools check them, and so does this one. Turn off “Check formats” if you only want the structure checked. “Strict schema” does something different: it reports keywords the schema language does not know, which helps you catch typos such as “requried”.
How does “Make a schema from my data” work?
It looks at your data and writes a schema that describes it: the types, which properties are always present (required), the shape of array items, and common text formats when every value has them. It is a starting point. Add the rules you really need, such as minimum and maximum values, and remove required properties that are only sometimes present.
Is my data uploaded? Why does it stop after 4 seconds?
Nothing is uploaded. The check runs in your browser, in a background worker. A schema can contain a pattern (regular expression) that takes forever on some text, and schemas copied from the internet are not always safe. The 4-second limit stops such a check so your page keeps working.
Related tools
JSON Formatter & Validator
Format, validate and minify JSON in your browser. Shows the exact line and column of any error.
JSON to TypeScript Converter
Turn any JSON into TypeScript interfaces or types, with optional keys, unions and nested types worked out for you.
JSON, YAML & CSV Converter
Convert JSON to YAML, YAML to JSON, JSON to CSV and CSV to JSON, with nested data, delimiters and type detection handled.
These tools run entirely in your browser and are provided free, without warranty. Check important results before using them in production.