JSON Schema Validator

Validate JSON data against a JSON Schema online. Supports Draft-07 and Draft 2020-12. Shows error paths (e.g. $.items[0].name) and detailed messages. Free, 100% client-side — data never leaves your browser.

100% Client-Side Your data never leaves your browser Free · No Sign-Up

How to Use

  1. Paste your JSON Schema on the left and your JSON Data on the right.
  2. Select the schema draft (Draft-07 or Draft 2020-12) from the dropdown.
  3. Click Validate (or press Ctrl+Enter).
  4. If valid, a green message confirms the data matches the schema.
  5. If invalid, each error is listed with its JSON path, error message, and additional parameters.

Click Load Example to populate both panels with a sample User schema and matching JSON for a quick demo.

Reading the Error Output

Each validation error shows three things:

  • Path — the JSON Pointer to the failing value (e.g. /items/0/price or (root) for the top level).
  • Message — a plain-English description from AJV (e.g. must be integer, must have required property ‘name’).
  • Parameters — additional context such as the allowed types, minimum value, or pattern that was required.

Common JSON Schema Keywords

  • type — restrict to a JSON type: string, number, integer, boolean, array, object, null.
  • required — array of property names that must be present in an object.
  • properties — define constraints for each named property of an object.
  • additionalProperties: false — reject any property not listed in properties.
  • minimum / maximum — numeric range constraints.
  • minLength / maxLength — string length constraints.
  • pattern — validate a string against a regex (e.g. ”^[a-z]+“).
  • enum — restrict to a fixed set of values.
  • items — define the schema for array elements.

Example Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "required": ["name", "age"],
  "properties": {
    "name":  { "type": "string", "minLength": 1 },
    "age":   { "type": "integer", "minimum": 0 },
    "email": { "type": "string" }
  },
  "additionalProperties": false
}

Valid data: {"name":"Alice","age":30}
Invalid data: {"name":"","age":-1,"extra":true} — would produce three errors.

FAQ

What JSON Schema drafts are supported?

Draft-07 (the most widely used, compatible with OpenAPI 3.0 and many validators) and Draft 2020-12 (the latest spec). Use the draft dropdown to switch before validating.

What does an error path like /user/age mean?

Error paths follow JSON Pointer syntax (RFC 6901). /user/age means the age property inside the user object failed validation. The root object is /. Array items appear as /items/0, /items/1, etc.

What is JSON Schema?

JSON Schema is a vocabulary for annotating and validating JSON documents. It lets you define the expected structure, types, required fields, value ranges, and patterns of a JSON object. It is widely used for API request/response validation, configuration file validation, and data pipelines.

Can I validate a JSON array as the root?

Yes. Set your schema to describe an array, e.g. {"type": "array", "items": {"type": "string"}}, and paste a JSON array like ["a", "b"] as the data.

Is any data sent to a server?

No. Validation runs entirely in your browser using the AJV library. Your schema and JSON data never leave your machine.