Skip to main content
WorkUtilities
← All GuidesDeveloper Tools

JSON Schema Validator β€” How to Validate JSON in 2026

James Mitchell Β· 9 min read Β· Last updated June 2026


JSON Schema lets you define the expected shape of JSON data and catch structural errors before they reach production. Use our free JSON Schema Validator to test schemas and data in real time with plain-English error messages. Part of our Complete Developer Tools Guide.


What Is JSON Schema?

JSON Schema is a JSON-based format for describing JSON documents. It specifies types, required fields, string formats (email, date, URI), numeric ranges, array lengths, and nested object structures. APIs use it to validate incoming requests and outgoing responses automatically.


Common Use Cases

  • API development β€” validate request bodies against OpenAPI schemas before deployment.
  • Configuration files β€” ensure CI/CD configs and app settings have all required keys.
  • Form validation β€” share one schema between frontend and backend for consistent rules.
  • Schema design β€” test schemas with sample data before publishing to consumers.

Draft 7 vs Draft 2020-12

Our validator supports both drafts. Draft 7 works with most existing schemas and OpenAPI 3.0 specs. Draft 2020-12 adds $dynamicRef for complex recursive schemas and prefixItems for tuple validation. Select the draft that matches your schema's $schema declaration.


Reading Validation Errors

When validation fails, the tool shows the JSON path (e.g. data.email), the raw AJV message, and a plain-English explanation β€” like "The value must be a valid email address" or "The 'name' field is required but missing." This makes debugging faster than parsing cryptic parser output.


Valid JSON vs Valid Schema Data

A common mistake is assuming well-formed JSON automatically passes validation. {"age": "28"} is valid JSON but fails a schema requiring age to be an integer. Always check both JSON syntax (with our JSON Formatter) and schema conformance separately.


JSON Schema in API Development

REST APIs often return structured error responses with HTTP status codes. Pair schema validation with our HTTP Status Codes reference when designing API contracts and error payloads.


Frequently Asked Questions

What is JSON Schema used for?

JSON Schema is a vocabulary for describing and validating the structure of JSON data. It is used in REST API request/response validation, configuration file linting, form validation, and OpenAPI/Swagger documentation to ensure data conforms to expected types, formats, and constraints.

What is the difference between Draft 7 and Draft 2020-12?

Draft 7 is the most widely supported version and is compatible with OpenAPI 3.0. Draft 2020-12 is the latest standard with improved keywords like $dynamicRef for recursive schemas. Use Draft 7 for maximum compatibility; use 2020-12 for new projects that need advanced features.

Why does valid JSON fail schema validation?

Syntax-valid JSON can still fail validation if the data does not match the schema β€” wrong types (string instead of integer), missing required fields, values outside allowed ranges, or format mismatches (invalid email). The validator pinpoints exactly which field and rule failed.

How do I mark a field as required in JSON Schema?

Add a required array at the same level as properties. Example: { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"] }. Fields not listed in required are optional.


Validate JSON Schema Free β†’

Ready to try it yourself?

JSON Schema Validator β€” Free & Private

No signup. No upload to server. Runs in your browser.

Try JSON Schema Validator β†’