JSON Schema Validator Online

Check that your JSON matches a JSON Schema. See every problem with its location in plain English. Supports draft-07, 2019-09 and 2020-12.

JSON Schema

Empty

JSON Data

Empty
No schema yet? Generate one →

Result

The validation result will appear here.
Not checked yet

What Is a JSON Schema Validator?

A JSON Schema is a JSON document that describes what valid data must look like: required fields, types, allowed values, number ranges and text formats like email or date. A validator checks your JSON against that schema and tells you exactly what does not match.

How to Validate JSON Against a Schema

  1. Paste your JSON Schema on the left and your JSON data on the right, or click Sample.
  2. Click Validate JSON, or press Ctrl + Enter.
  3. Fix each problem shown in the result. The path, like /tags/1, shows where it is.

Features

  • Supports JSON Schema draft-07, 2019-09 and 2020-12 (picked from $schema).
  • Checks formats such as email, date, date-time, uri, uuid and ipv4.
  • Shows all problems at once, in plain English, with their location.
  • Powered by Ajv, the most widely used JSON Schema validator.
  • Runs in your browser. Your schema and data are never uploaded.

Example

Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "required": ["id", "email"],
  "properties": {
    "id": { "type": "integer", "minimum": 1 },
    "email": { "type": "string", "format": "email" },
    "age": { "type": "integer", "maximum": 130 }
  }
}
Data
{ "email": "emily@example", "age": 150 }
Problems found
(root)  is missing the required field "id"
/email  must match format "email"
/age    must be <= 130

The location on the left tells you where each problem is: (root) is the top-level object and /age is the age field. A path like /orders/0/total points to the total of the first order.

Most Useful Schema Keywords

  • type: string, integer, number, boolean, object, array or null.
  • required: fields that must be present.
  • minimum / maximum and minLength / maxLength: limits for numbers and text.
  • enum: a fixed list of allowed values.
  • format: email, date, date-time, uri, uuid, ipv4 and more.
  • pattern: a regular expression the text must match.
  • additionalProperties: false: reject fields that are not listed.

No schema yet? Create one from a sample in seconds with the JSON Schema Generator.

Frequently Asked Questions

Which JSON Schema versions are supported?

Draft-07, draft 2019-09 and draft 2020-12. The version is chosen from the $schema keyword; without it, draft-07 is used.

Are formats like email and date checked?

Yes. Common formats such as email, date, date-time, time, uri, uuid, hostname, ipv4 and ipv6 are checked.

Why does it say additionalProperties?

The schema has additionalProperties: false, which means fields that are not listed in properties are not allowed. Remove the extra field or add it to the schema.

Is my data sent to a server?

No. Validation runs in your browser with the Ajv library. Nothing is uploaded.

Related Tools