Skip to content
← Code Tools

JSON Schema Validator

Validate JSON against a schema with full error reporting

JSON Schema Validator (Draft 7 / 2019-09 / 2020-12)

JSON Schema is the standard contract for JSON data: required fields, type constraints, value ranges, and format hints like email or uri. Validating against a schema catches issues at the edge of a system before they corrupt anything downstream. This tool runs the well-tested ajv 8 validator with the ajv-formats extension, supports all three modern draft versions, and reports every error with an exact instance path so you can pinpoint and fix issues fast.

What JSON Schema Validates

A JSON Schema describes the shape a JSON document must have: required properties, allowed types per property, value ranges for numbers, length limits for strings, pattern matches for identifiers, format checks for emails and URIs, conditional rules with if/then/else, and structural rules with oneOf/anyOf/allOf. Validating a document against a schema either confirms the document conforms or produces a list of errors, each with the exact path inside the instance (/items/0/price), the failed keyword (type, required, format), and a human-readable message.

Why ajv 8 in the Browser

ajv is the de-facto reference implementation of JSON Schema in the JavaScript world. It is the validator behind ESLint, OpenAPI tooling, Fastify, Express middleware, and most major Node.js libraries that care about validation. Version 8 supports JSON Schema Draft 7, Draft 2019-09, and Draft 2020-12 — the three modern versions — plus the ajv-formats extension which adds date, date-time, email, hostname, ipv4, ipv6, uri, uuid, and a dozen others. Running the same validator in the browser means the verdict you see here matches what your production validator will say.

How to Use the Tool

Paste the schema into the left panel and the document into the right. Pick the draft (Draft 7 is the most common for established projects; 2020-12 is the newest). Optional: enable strict mode, which rejects schemas with unknown keywords — useful to catch typos in custom keywords. Hit Validate and see one of two outcomes: a green pass with the schema title (if any), or a red fail with every error listed. Each error shows the instance path, the schema path, the failed keyword, and the message ajv generated. Fix the document or the schema and re-validate.

Use Cases for Browser Validation

Three patterns: First, debugging a failing API contract — paste the schema your service expects and a payload you cannot get accepted, and see exactly which field violates which rule. Second, schema authoring — write a draft schema and validate sample documents against it iteratively to make sure the rules say what you mean. Third, learning JSON Schema — the immediate feedback loop is more useful than reading the spec when figuring out how oneOf interacts with required. All three benefit from a tool that runs locally and lets you paste real (often sensitive) data without it leaving the tab.

Pair this validator with: JSON Schema Generator to draft a schema from a sample document, JSON Formatter for inspecting the document or schema, JSON to CSV (Deep) if the next step after validation is a flat CSV, and Schema.org Validator for the distinct case of validating JSON-LD against Schema.org types.

Frequently Asked Questions

Which JSON Schema draft versions are supported?+
Draft 7, Draft 2019-09, and Draft 2020-12. Pick the draft your schema targets from the dropdown. Most established projects use Draft 7; OpenAPI 3.1 and newer projects use Draft 2020-12. Draft 4 and 6 are legacy and not supported — if you have an old schema, upgrade it before validating.
Is the schema or document uploaded anywhere?+
No. Both inputs are validated locally in your browser using ajv 8, which is bundled into the page as a self-hosted script. Nothing is sent to any server. You can paste production secrets, internal APIs, or any other sensitive payload without it leaving the tab.
Which formats are recognized for the format keyword?+
All the standard formats from the ajv-formats extension: date, date-time, time, email, hostname, ipv4, ipv6, uri, uri-reference, uri-template, url, uuid, json-pointer, relative-json-pointer, regex, byte (base64), int32, int64, float, double, password, binary. Format validation is enabled by default; disable it in the options if your schema uses format values purely as documentation.
How are errors reported?+
Each error has four fields: instance path (the JSON Pointer to the failing value, like /items/0/price), schema path (the JSON Pointer inside the schema that failed, like #/properties/items/items/properties/price/minimum), keyword (the failed validator like required or type), and a message generated by ajv. Errors are reported all at once by default, so you can fix a batch in one pass; switch to fail-fast in the options to stop at the first error.
Does it support $ref to external schemas?+
Internal $ref within the same schema works. External $ref (pointing to a URL or another file) does not resolve, because there is no fetcher in this tool; if your schema uses external refs, inline them first using a schema bundler or ajv's own addSchema call. The validator surfaces an explicit error if it encounters an unresolved external ref.
What is strict mode?+
Strict mode (ajv option strict: true) rejects schemas that use unknown keywords, mix incompatible keywords, or violate other ajv heuristics. It is the safer default for production validators because it catches typos like requierd instead of required. Strict is off by default in this tool because pasted schemas often have minor issues that are not blockers; enable it when you want maximum confidence the schema is exactly what you think it is.
Can I validate JSON against Schema.org instead?+
Schema.org is a vocabulary, not a JSON Schema. If you are validating a JSON-LD document against Schema.org type expectations (required fields per type, value-type checks), use the Schema.org Validator tool instead — it has the type catalog and expectations baked in. This tool validates against a JSON Schema document you supply.
Does the validator handle large documents?+
ajv is fast — it compiles the schema to a JavaScript function and runs validation at near-native speed. Documents up to tens of megabytes validate in well under a second on modern hardware. The bottleneck is usually parsing the JSON itself, not the validation step.

Built by Derek Giordano · Part of Ultimate Design Tools

Privacy Policy · Terms of Service