DevTulz Online

JSON Schema Validator


What is JSON Schema?

JSON Schema is a vocabulary that allows you to annotate and validate JSON documents. It defines the structure, data types, and constraints that valid JSON must conform to. For example, a schema can specify that a 'user' object must have a 'name' string, an 'age' integer between 0 and 150, and an optional 'email' that must match an email format. JSON Schema is used to validate API request and response bodies, validate configuration files, generate documentation, and drive form validation. This tool validates JSON against schemas defined using JSON Schema Draft-07, Draft 2019-09, and Draft 2020-12.

How to Use the JSON Schema Validator

  1. Paste your JSON Schema into the Schema panel on the left.

  2. Paste the JSON document you want to validate into the JSON panel on the right.

  3. Validation results appear automatically β€” green for valid, red for errors.

  4. Click on any error to see which JSON path failed and why.

  5. Fix validation errors and re-validate until the document conforms to the schema.

Frequently Asked Questions

What is a JSON Pointer? A JSON Pointer (RFC 6901) is a string that identifies a specific value within a JSON document, like /user/address/city. Validation errors are reported with JSON Pointers so you can locate the exact failing field in nested documents.

What is the difference between Draft-07 and Draft 2020-12? Draft 2020-12 introduced significant changes: $ref can now appear alongside other keywords, items was renamed to prefixItems for tuple validation, and several new keywords like unevaluatedProperties and unevaluatedItems were added. Use Draft-07 for maximum compatibility with existing tools; use 2020-12 for new projects.

Can I validate arrays of objects? Yes. Use type: array with an items keyword that contains the schema each element must conform to. You can also specify minItems, maxItems, and uniqueItems constraints on the array itself.

Keywords: JSON schema validator, validate JSON online, JSON schema checker, AJV validator, JSON schema draft-07, JSON validation tool, JSON schema tester