JSON Schema Validator

Contact us
INPUT
JSON SCHEMA
VALIDATION RESULT
Enter a JSON Schema in the middle panel to validate…

What is JSON Schema?

JSON Schema is a declarative vocabulary for annotating and validating JSON documents. It describes the shape, types, and constraints a JSON value must satisfy — like a contract between a producer and consumer of data.

  • type — restricts the value type (string, number, object, array, boolean, null)
  • properties — defines expected keys and their schemas for objects
  • required — lists keys that must be present
  • items — defines the schema for each element in an array
  • $schema — declares the JSON Schema draft version
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": { "type": "string" },
    "age":  { "type": "integer", "minimum": 0 }
  },
  "required": ["name"]
}

Supported Draft Versions

This tool uses AJV under the hood and supports all major JSON Schema draft versions. The draft is auto-detected from the $schema field in your schema.

  • Draft-06 — adds const, contains, propertyNames
  • Draft-07 — adds if/then/else, readOnly, writeOnly
  • 2019-09 — adds $defs, $anchor, unevaluatedProperties
  • 2020-12 — prefix items replaced with prefixItems, improved $ref behavior

Tool Features

  • Format — formats JSON with 2-space indentation for readability
  • JSON Schema Validation — validates your JSON against a schema you provide, supporting Draft-06, Draft-07, 2019-09, and 2020-12
  • JSON Schema Inspection — automatically infers a JSON Schema from your JSON and displays it as an interactive tree; you can copy or download the result
  • Tree View — explore your JSON as a collapsible tree; nodes deeper than 2 levels start collapsed