JSON Schema Validator Online - Validate JSON Against Schema
Validate your JSON data against a JSON Schema. Supports draft-04, draft-07, and 2020-12 schemas.
schema JSON Schema
data_object JSON Data
Click Validate to check JSON data against the schema.
Key Features
Schema Compliance
Validate JSON data against any JSON Schema draft-04, draft-07, or 2020-12.
Detailed Error Messages
Get precise error messages with the exact path to each validation failure.
Instant Feedback
Validation runs instantly in your browser with no server roundtrips.
Privacy Protected
Your schema and data never leave your browser. Zero data upload.
Common JSON Schema Validation Errors
Type Mismatches
Expected type: string, found: integer | The value must match the type specified in the schema. Check the property's "type" keyword. |
Expected type: array, found: object | Ensure array fields use square brackets [] and object fields use curly braces {}. |
Expected type: number, found: string | Numeric values should not be quoted. Remove quotes around numbers unless they are meant to be strings. |
Missing Required Fields
Missing required property: "name" | The JSON is missing a field listed in the schema's "required" array. Add the missing field or adjust the schema. |
Required properties are: ["id", "name"] | All required properties must be present at the same level. Check nested objects for their own required fields. |
Constraint Violations
Value 150 must be <= 100 | The value exceeds the schema's "maximum" or "maxLength" constraint. Reduce the value or update the schema. |
Value must match pattern: ^[a-zA-Z]+$ | The string does not match the regex pattern defined in "pattern". Check the format and allowed characters. |
Value must be one of: ["A","B","C"] | The value is not in the schema's "enum" list. Use only the allowed values specified in the schema. |
Format & Additional Properties
Format validation failed: "email" | The string does not match the expected format (email, date-time, uri, etc.). Check the "format" keyword in the schema. |
Additional property "foo" is not allowed | The schema has "additionalProperties": false and the JSON contains properties not defined in "properties". Remove extra keys or update the schema. |
Frequently Asked Questions
Getting Started
What is JSON Schema validation?
JSON Schema validation checks whether a JSON document conforms to a predefined schema structure, including required fields, data types, and value constraints.
Which schema drafts are supported?
The validator supports draft-04, draft-07, and 2020-12 schema formats automatically.
Features & Usage
Can I validate large JSON files?
The tool handles files up to a few MB. Performance depends on the complexity of both the schema and the data.
Is my data safe?
Yes. All validation runs locally in your browser. Your data never leaves your device.
How accurate is the validation?
The tool performs structural validation including type checking, required fields, and array item validation. Some advanced constraints like pattern matching and numeric ranges have basic support.
Troubleshooting
What happens if my schema or data is invalid JSON?
The tool will display a parse error message. Ensure both the schema and data are valid JSON before validating.
Can I use this tool offline?
Yes. Once the page is loaded, all functionality works offline thanks to local processing.
What is the difference between JSON validation and JSON Schema validation?
JSON validation checks if a string is valid JSON syntax. JSON Schema validation checks if valid JSON data conforms to a predefined structure and constraints defined in a JSON Schema document.
Advanced Topics
Why does my valid JSON fail with "no schema found for ref"?
This error occurs when a $ref reference cannot be resolved, typically because the referenced definition doesn't exist or the JSON Pointer path is incorrect. Ensure local references start with "#/$defs/" for 2020-12 schemas or "#/definitions/" for draft-07 and earlier. For remote references, verify the URL is accessible and returns a valid schema.
How does the validator handle recursive or self-referential schemas?
The validator supports recursive schemas that reference themselves via $ref, commonly used for tree structures like organizational hierarchies or nested comment threads. The validator enforces a maximum recursion depth to prevent infinite loops during validation. If you encounter stack overflow errors, check for unintended circular references in your schema definitions.
What is the difference between format validation and pattern validation?
Format validation checks predefined semantic types like email, date-time, URI, and IPv4 using the "format" keyword, with validation depth varying by implementation. Pattern validation uses JavaScript regular expressions via the "pattern" keyword for custom string matching. Format validation is often assertion-based (basic structure check) while pattern can enforce any regexable constraint.
Can JSON Schema enforce property counts or array length limits?
Yes, use minProperties and maxProperties for object property count validation, and minItems with maxItems for array length constraints. For example, minProperties: 1 ensures an object cannot be empty, while maxItems: 10 limits an array to a maximum of 10 elements. Combine these with uniqueItems: true to also enforce element uniqueness within arrays.
How do I validate JSON against multiple schemas or a schema registry?
To validate against multiple schemas, you can either use allOf to compose schemas into a single validation pass, or validate sequentially against each schema. For schema registries, each schema should have a unique $id that can be referenced via $ref from other schemas. This tool validates one schema at a time against your JSON data for focused error reporting.
Last updated: July 14, 2026
JSON Schema validation is specified by the JSON Schema organization. See also Understanding JSON Schema and MDN JSON Glossary.