JSON Schema Validator Online

Validate JSON data against a JSON Schema and see detailed error messages instantly.

JSON SCHEMA
JSON DATA

When a JSON Schema validator is the right tool

APIs and config files often come with a schema that describes required fields and types. This page is for checking one JSON document against one schema in the browser. Paste the schema on the left, the instance on the right, and click Validate. You get either a success message or a list of Ajv error paths.

The engine is draft-07. It will not fetch remote $ref URLs, and it will not apply format keywords such as email. If you only need to fix syntax, use the JSON Formatter first.

Use cases

Checking a payload before you send it

Paste the schema your API publishes and a sample body, then click Validate. Missing required keys, wrong types, and unexpected properties (when additionalProperties is false) show up as separate error lines.

Learning what a keyword does

Load Sample inserts a small person object and a schema with required, minLength, numeric bounds, and additionalProperties: false. Delete the format: "email" entry before you validate, or the compile step will fail for the reason in the FAQ. After that, try removing age or adding an extra key to see the error list.

Debugging a failed request

When a server rejects JSON, validating the same body locally can tell you whether the document itself disagrees with the schema, before you look at network or authentication problems.

How validation works

Both panes are parsed with JSON.parse. Invalid schema or data JSON shows a syntax error and stops. A successful parse is compiled with new Ajv({ allErrors: true }) and evaluated once. Compile failures (including unknown format values) appear as an error message. There is no live checking and no draft switch.

Example — a missing required property after a successful compile
{
  "type": "object",
  "required": ["name", "age"],
  "properties": {
    "name": { "type": "string", "minLength": 1 },
    "age": { "type": "integer", "minimum": 0, "maximum": 150 }
  },
  "additionalProperties": false
}

{ "name": "Alice" }

(root): must have required property 'age'

The path (root) means the instance as a whole is missing age. An error on a field uses a slash path such as /age.

What this tool does not do

It does not validate draft 2019-09 or 2020-12, apply format checks, or load schemas from a URL. It does not re-run when you type. Nothing is sent to a server. To inspect a value at a path without a schema, try the JSON Path Tester.

How to use JSON Schema Validator

  1. Paste a draft-07 JSON Schema on the left and the JSON data on the right, or use Load Sample and remove any format keywords.
  2. Click Validate.
  3. Read the success message or the list of path-and-message errors. Use Clear to empty both panes and the result.

Frequently asked questions

Which JSON Schema draft does this page use?

Validation runs through Ajv 8 with allErrors enabled, which implements JSON Schema draft-07 by default. A $schema value for draft 2019-09 or 2020-12 is not loaded, and those drafts’ keywords will not work here. There is no draft selector.

Why does the official sample fail with an unknown format “email” error?

Load Sample pastes a schema that includes format: email. Ajv is created without the ajv-formats package, and in this configuration an unknown format throws when the schema is compiled. Remove the format keyword (or any other unregistered format) and click Validate again. Type, required, minimum, and additionalProperties still work.

Is validation live as I type?

No. Nothing is checked until you click Validate, and both panes must be non-empty. Editing the schema or the data after a result does not refresh it; the previous valid or invalid panel stays until you validate again, load the sample (which clears the result), or clear both panes.

How are errors listed?

Each Ajv error is shown as a path and a message, for example (root): must have required property 'age' or /age: must be integer. The path is the instance path, or (root) when the error points at the whole document. Because allErrors is on, you usually see every issue from that run, not only the first.

Is my schema or data sent to a server?

No. Parsing and validation run in your browser when you click Validate. Closing the tab discards what you pasted. Do not paste documents that contain secrets if you would not be comfortable with them sitting in memory on this device.

Is there a file size limit?

There is no server-imposed limit, because nothing is uploaded. Typical API payloads are comfortable. A very large instance or a pathological schema can make the tab feel slow; in that case, validate a smaller excerpt.

Related tools and guides

References

  • JSON Schema draft-07 is the dialect Ajv 8 validates by default on this page.
  • Ajv is the validator. Format keywords require an extra package that is not loaded here, so format should be omitted unless you only need the other draft-07 keywords.