Playground

Validate JSON against a JSON Schema, right in your browser

Paste a schema and a JSON payload, pick a preset, and see exactly which keywords pass or fail. Powered by Ajv with ajv-formats — nothing leaves your tab.

  • Client-side only
  • JSON Schema draft-07
  • ajv-formats included

Why JSON Schema validation matters

JSON Schema describes the shape of a JSON document — required fields, types, enums, formats, and combinations like oneOf. Validation turns informal API documentation into an automated, machine-checkable contract.

This page never sends your schema or data anywhere. Validation runs inside your browser using Ajv compiled to JavaScript at runtime.

When Ajv is useful

  • Enforcing API request/response contracts at the edge and between microservices.
  • Driving complex form validation without scattering ad-hoc if/else checks across the codebase.
  • Validating configuration files (CI, infra, feature flags) before they ship to production.
  • Gating data pipelines so malformed records fail fast with explicit, structured errors.

Try it

Edit the schema or data, click Validate, and inspect the structured error list below.

Schema

Must be a valid JSON Schema document (draft-07 by default).

Data

The JSON value you want to validate against the schema above.

Click Validate to run Ajv against the inputs above.

FAQ

Does this page send my schema or data to a server?
No. Validation runs in-browser with Ajv. The page works offline once loaded and the inputs never leave your tab.
Which JSON Schema draft does the playground use?
Ajv defaults to draft-07 here. Schemas with $schema set to a newer draft still validate the instance, but draft-specific keywords may need an Ajv build that opts into them.
Why do I sometimes see multiple errors for the same field?
Ajv is configured with allErrors: true, so it reports every violation instead of stopping at the first one. That makes it easier to see the full picture when fixing a payload.
How are formats like email or uuid checked?
Formats are provided by the ajv-formats package, which is loaded together with Ajv. The list includes email, uri, uuid, date, date-time, ipv4, ipv6, regex, and a few more.

Edge cases worth knowing

  • $ref to remote schemas is not loaded by the playground — keep schemas self-contained or paste referenced definitions inline.
  • oneOf and anyOf can produce many errors at once because Ajv reports each branch that fails — read errors top-down.
  • Formats are advisory in JSON Schema; ajv-formats opts you in, but custom string formats still need a custom registration.
  • Large schemas compile once per validate() call here for simplicity; in production you should cache the compiled validator.

How Ajv compares to other validators

LibrarySupported draftsRuntimeNotes
AjvDraft 7 / 2019-09 / 2020-12Browser & NodeFast, JIT-compiled validators, mature ecosystem, ajv-formats and ajv-keywords add-ons.
jsonschema (Python)Draft 4 → 2020-12Server-sideReference-quality Python implementation, slower than Ajv but easy to integrate in Python pipelines.
JSON Schema Validator (Java)Draft 4 → 2020-12JVMWidely used in Java backends, supports multiple drafts but compiles slower than Ajv for similar schemas.