JSON Schema Validator — Draft 2020-12

Validate JSON against a JSON Schema (draft 2020-12, 2019-09, draft-07) with detailed error messages. Ideal for LLM structured output and API contracts.

JSON Schema Validator

JSON Schema
JSON Document

How it works

About JSON Schema Validator

JSON Schema is a declarative vocabulary for describing the structure and constraints of JSON documents — types, required fields, ranges, patterns, enums, nested objects, and conditional logic. Every major AI platform now supports JSON Schema natively for structured outputs: OpenAI's response_format.json_schema, Anthropic's tool definitions, and Gemini's genai.protos.Schema all expect valid JSON Schema. When you define a schema for an LLM response, this tool lets you validate both the schema itself and the actual output the model produces — catching missing fields, wrong types, and constraint violations before they reach production code.

This validator supports type, required, enum, const, properties, additionalProperties, patternProperties, allOf, anyOf, oneOf, not, if/then/else, minLength/maxLength, pattern, minimum/maximum/exclusiveMinimum/exclusiveMaximum/multipleOf, minItems/maxItems/uniqueItems/contains, items, and $ref (local references only). All processing happens in your browser — no document or schema is uploaded anywhere.

What a schema does and does not enforce

A JSON Schema describes the shape of a document: which keys are required, what type each value is, what pattern a string matches, what range a number falls in. It does not validate semantics — a schema can confirm an age is a non-negative integer and still have no opinion about whether it is plausible.

The validator here supports draft 2020-12, 2019-09 and draft-07, and reports failures with the instance path so you can jump straight to the offending value in a large document.

Validating LLM structured output

When a model is constrained to return a JSON object, the schema is the contract, and the failure mode is usually a mismatch between the schema you sent and the response you got. The presets on this page are shaped for the formats OpenAI, Anthropic and Gemini actually accept, including the strict-mode requirements those APIs impose.

Test with the worst realistic output, not a clean sample. The cases that break in production are optional fields omitted, an extra property added by a fine-tuned model, or a nested object returned as a string.

Next steps

Frequently Asked Questions

How do I validate JSON against a JSON Schema?
Paste your JSON document in the left panel and your JSON Schema in the right panel. Click Validate and the tool checks whether your document satisfies every rule in the schema, reporting all errors with JSON paths.
Which JSON Schema drafts are supported?
Draft-07, draft-2019-09, and draft-2020-12 are fully supported. This includes all core keywords: type, required, properties, patternProperties, additionalProperties, enum, const, format, $ref, allOf, anyOf, oneOf, if/then/else, and more.
Is my data sent to a server?
No. Every tool on jsonversal runs entirely in your browser using the Web Crypto API, File API, and Clipboard API. Nothing is ever uploaded — not even the JSON you paste in.
Do I need an account or API key?
No signup, no email, no API key. All tools are free to use with no signup required.
Can I use these tools offline?
Yes. Once the page loads, all tools work offline. There are no external API calls or CDN dependencies at runtime.
🔒
Your data never leaves your device

All processing happens in your browser. No uploads, no tracking, no servers. Your API keys, configs, and private payloads stay private — 100% client-side.

esc
↑↓ navigate ↵ open esc close