JSON Schema Validator Online
This tool validates JSON against a schema: you paste the schema that describes the shape of your data, paste the document you want to check, and it tells you whether the two agree. When they do not, it lists each problem with the path it sits at, the message from the validator, what the schema asked for and what the data actually contained, so the fix does not have to be hunted down by hand.
It is built for the moments when a payload is not what the consumer expects: an API response missing a field a client depends on, a configuration file that will not load, a form export whose types drifted, or a test fixture written before the schema changed. Checking the structure against the schema turns "something is wrong with this JSON" into a specific list of what and where.
If a document does not parse at all, that is reported first as a syntax error with its line and column, before any schema rule is applied.
How to Validate JSON Against a JSON Schema
The whole workflow is five steps, and both editors start already filled with an example so the first click shows a real result.
- Enter or paste your JSON Schema in the JSON Schema panel.
- Enter the JSON data you want to test in the JSON Data panel.
- Click Validate, or press Ctrl+Enter.
- Review the validation result: Valid, or a list of every problem the schema found.
- Fix the reported errors in your JSON data and validate again.
Both editors start with a working example, so pressing Validate once shows what a passing and a failing result look like before you paste your own.
Example: a value with the wrong type
The schema below requires an object with a string name and an integer age. The first document satisfies it:
{
"type": "object",
"properties": {
"name": { "type": "string" },
"age": { "type": "integer" }
},
"required": ["name", "age"]
}{
"name": "John",
"age": 25
}The data matches the schema, checked against JSON Schema Draft-07.
The second writes the age as a string. It is valid JSON, but it does not satisfy the schema:
{
"type": "object",
"properties": {
"name": { "type": "string" },
"age": { "type": "integer" }
},
"required": ["name", "age"]
}{
"name": "John",
"age": "twenty"
}agemust be integerExpected: integer | Actual: string "twenty"
The reported path is age, the schema expects integer and the data holds string "twenty". Nothing else in the document is the problem — the name is fine and the required properties are all present, so the fix is one value.
What Is JSON Schema?
JSON Schema is a JSON document that describes other JSON data. Instead of carrying values, it carries rules: which properties an object must have, what type each value must be, which values are allowed, how long a string may be, whether a number has an upper bound, and how those rules nest when the data is deeply structured.
That makes the schema a contract written in a form both sides can read. A producer can check its output against it, a consumer can check its input against it, and neither has to translate the rules into code first. The same schema is also useful as documentation: it says what the data is supposed to look like in a way a person can scan.
Validation is what happens when a document is tested against those rules. The output is not a rewritten document — nothing is changed — only a verdict and, when it fails, the list of rules the document broke.
Common JSON Schema Validation Errors
Most failed validations come down to one of these. Each one is reported with the path of the offending value, so the message maps directly onto a place in your document.
Missing required properties
A schema lists the properties an object must have in "required". Leave one out of your data and the error names the property and the object it belongs to.
Incorrect data types
The most common failure. A value declared as integer, number, boolean or array has to arrive in that type: "25" is a string and will not satisfy type "integer", even though it looks like a number.
Values outside the allowed set
"enum" allows a fixed list of values and "const" allows exactly one. A status of "pending" fails a schema that only permits "open" and "closed".
String length restrictions
"minLength" and "maxLength" count characters, and "pattern" requires the string to match a regular expression such as ^[A-Z]{2}$.
Number restrictions
"minimum", "maximum", their exclusive variants and "multipleOf" bound numeric values, so a score of 120 fails a maximum of 100.
Array validation problems
"minItems" and "maxItems" bound the length, "uniqueItems" rejects duplicates, and "items" applies a schema to every element, so one bad entry makes the whole array fail.
Additional properties
When a schema sets "additionalProperties": false, any property it does not declare is reported by name instead of being ignored.
Format problems
Formats such as email, date-time, ipv4 and uri are checked where the schema asks for them, so an address that is not a valid email is reported.
Two failures sit outside that list because they happen before validation starts. A document that is not well-formed JSON is reported as a syntax error with a line and a column, and a schema that is itself malformed or declares a version this tool does not support is reported the same way. In both cases no verdict is produced, so a broken input can never be mistaken for a passing one. If you only need to confirm that a document parses, the JSON Validator does exactly that and nothing more.
Frequently Asked Questions
What is a JSON Schema Validator?
A JSON Schema Validator checks whether a JSON document follows the rules declared by a JSON Schema. You give it two things - the schema that describes the shape of your data, and the data itself - and it answers whether the data matches: valid, or a list of the properties and values that do not conform, each with its location in the document.
How do I validate JSON against a JSON Schema?
Paste the schema into the JSON Schema panel, paste the document you want to check into the JSON Data panel, and press Validate. The result appears directly below: a Valid panel when the data conforms, or a list of errors showing the location, the message, what the schema expected and what your data contained. Ctrl+Enter runs the same check from the keyboard.
What is JSON Schema validation?
JSON Schema validation is the process of testing a JSON document against the constraints a schema defines: types, required properties, allowed values, ranges, lengths, patterns and nested structure. It answers a different question from a syntax check. A document can be perfectly valid JSON and still fail validation because it does not hold the shape the schema describes.
Why is my JSON invalid against the schema?
Usually one of a handful of reasons: a required property is missing, a value has the wrong type - a string where the schema wants an integer, for example - a value falls outside an enum, a range or a length limit, or an extra property is present in a schema that sets "additionalProperties": false. The error list names the exact path and states what was expected, so you can go straight to the fix.
Can I validate JSON online?
Yes. This validator runs entirely in your browser, so there is nothing to install, no account to create and no upload step. Your schema and data are never sent anywhere, which also makes it suitable for internal payloads you would rather not paste into a third-party service.
Which JSON Schema versions does this validator support?
It supports JSON Schema Draft-07, 2019-09 and 2020-12. The version your schema declares in "$schema" is the one used, and a schema that declares nothing is treated as Draft-07, which is what the specification specifies. Draft-04 and Draft-06 are not supported and are reported as such rather than validated against the wrong rules.
What is the difference between JSON validation and JSON Schema validation?
JSON validation asks whether a document parses at all - whether its braces, quotes and commas follow the JSON grammar. Schema validation asks whether a document that already parses has the right shape for a particular application. This tool reports a syntax error with a line and a column before it validates anything, so the two failures are never confused. For syntax alone, use the JSON Validator.
What to do after validating
Once the data passes, the usual next steps are the ones around it in a JSON workflow. JSON Formatter makes a document readable when it is hard to review by eye, and JSON Tree Viewer shows the structure as collapsible nodes when you are trying to understand why a value sits where it does.