JSON Schema validate

Client

Paste a JSON Schema and an instance, or infer a draft-07 schema from sample JSON. Validation runs locally with Ajv.

Learn more: JSON Schema in the browser

Validate a JSON document against a schema, pretty-print the schema, or infer a draft-07 sketch from sample data—useful before wiring Ajv or OpenAPI in a project.

Validation

The validator compiles your schema with Ajv (draft-07 and common keywords supported via formats). Errors list JSON Pointer–style paths when something fails.

Infer schema

Inference builds a minimal object/array schema from one example—treat it as a starting point, not a proof of every future payload.

Schema & instance

?

Paste a JSON Schema (draft 07 or newer features Ajv supports) in the left panel and a JSON instance on the right, then validate. Use Infer schema to build a draft-07 sketch from the instance—adjust types before production.

Complex schemas may need manual review; this is a browser-side check only.

Nearby workflows on Toolcore

Common use cases

  • Check an API response against the schema your team publishes before merging client code.
  • Infer a draft schema from one or two sample payloads to bootstrap documentation—then tighten types by hand.
  • Format messy schema text so reviews focus on rules instead of indentation.
  • Iterate on request/response examples while keeping a single schema panel aligned with failing instances from QA.

Common mistakes to avoid

  • Treating inferred schemas as exhaustive

    Inference only sees the samples you paste. Rare fields and edge cases still need explicit rules.

  • Assuming remote `$ref` URLs are fetched and inlined here

    In-browser validation uses what you paste. Bundle or dereference external references first, or use the schema bundle tool for multi-file packages.

  • Mixing draft versions or keywords from different spec years

    Keywords and behavior changed across drafts. Keep your `$schema` URL and draft keywords aligned with what Ajv compiles on this page.

FAQ

Are JSON or schema documents sent to Toolcore?

No. Validation and inference run locally with Ajv in your browser.

When should I use the schema bundle tool instead?

Use bundles when multiple files or fragments must resolve together. This page is ideal for a single pasted schema plus instance pairs.

Does validation fix or transform my JSON?

No—it only reports errors. Use formatters, codegen, or your API layer when you need coercion or defaults applied automatically.

Common search terms

Phrases people search for that match this tool. See the full long-tail keyword index.

  • json schema validator online
  • validate json against schema

Related utilities you can open in another tab—mostly client-side.