JSON Schema Validator

Check JSON against a JSON Schema and get every error with its exact instance and schema path.

runs in your browserno uploadno sign-up

Paste JSON or load the sample to start.
Paste JSON or load the sample to start.

Validation result

Paste a schema and data (or load the sample) to validate.

What a JSON Schema checks

A JSON Schema describes the shape data must have: which keys are required, each value's type, and constraints like minimum, pattern or enum. This validator uses Ajv, the reference-grade validator for drafts 2020-12 and 07, entirely in your browser — nothing is uploaded. Each error reports two paths: instancePath points at the offending value in your data, schemaPath points at the rule in the schema that rejected it.

No schema handy? Paste example data on the right and click "Generate schema from this JSON" — it infers types, required keys and basic string formats (email, date-time) from your sample. Treat the result as a starting point, not a final contract.

How the check works

A JSON Schema is itself JSON that describes required keys, types, and constraints like minimum, pattern or enum. This tool compiles your schema with Ajv — the reference validator used by most JavaScript tooling — and runs it against your data client-side, supporting both the current draft 2020-12 and the still widely used draft-07 (detected from the schema’s $schema field).

Every failure lists the keyword that rejected it (required, type, pattern…), a plain message, the instancePath pointing at the value in your data, and the schemaPath pointing at the rule in the schema, so you can fix either side quickly.

No schema yet?

"Generate schema from this JSON" infers a basic schema from your sample data: object shapes with required keys, array item types, integer vs number, and a couple of common string formats (email, date-time). It is a starting point for hand-tuning, not a replacement for a schema you design deliberately.

Frequently asked questions

Which JSON Schema drafts are supported?

Draft 2020-12 (the current version) and draft-07 (still common in older tooling). The draft used is detected from the schema’s $schema keyword; if it is missing, 2020-12 rules are used.

What do instancePath and schemaPath mean?

instancePath is a JSON Pointer into your data (for example /total/amount) showing where the invalid value is. schemaPath is a JSON Pointer into the schema showing which rule failed (for example #/properties/total/properties/amount/minimum).

Does the generated schema include validation like minimum or pattern?

No — it infers types and required keys plus email/date-time string formats only. Add numeric ranges, regex patterns or enums by hand once you have the shape.

Is my data uploaded to check it?

No. Ajv runs entirely in your browser; the schema and data never leave your device.

Can I validate an array of records?

Yes — give the schema a top-level type: "array" with an items schema, and paste the array as your data.