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

checklist

Schema Compliance

Validate JSON data against any JSON Schema draft-04, draft-07, or 2020-12.

error

Detailed Error Messages

Get precise error messages with the exact path to each validation failure.

bolt

Instant Feedback

Validation runs instantly in your browser with no server roundtrips.

lock

Privacy Protected

Your schema and data never leave your browser. Zero data upload.

Common JSON Schema Validation Errors

Type Mismatches

Expected type: string, found: integerThe value must match the type specified in the schema. Check the property's "type" keyword.
Expected type: array, found: objectEnsure array fields use square brackets [] and object fields use curly braces {}.
Expected type: number, found: stringNumeric 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 <= 100The 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 allowedThe 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?expand_more
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?expand_more
The validator supports draft-04, draft-07, and 2020-12 schema formats automatically.
Features & Usage
Can I validate large JSON files?expand_more
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?expand_more
Yes. All validation runs locally in your browser. Your data never leaves your device.
How accurate is the validation?expand_more
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?expand_more
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?expand_more
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?expand_more
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"?expand_more
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?expand_more
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?expand_more
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?expand_more
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?expand_more
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.