JSON Schema Validator

Your data never leaves your browser

Validate JSON data against a schema. See detailed error paths instantly. Supports draft-07, 2019-09, and 2020-12.

JSON Schema
JSON Data to Validate
Ctrl+EnterValidateCtrl+KClear

Share this tool

Found it useful? Help a fellow developer discover it.

https://developertoolkit.dev/tools/json-schema

Why JSON Schema validation matters

JSON Schema is the standard way to define what valid JSON looks like for an API contract, configuration file, or data pipeline. It describes the expected shape: which fields are required, what types they must be, what string patterns or numeric ranges are acceptable, and whether additional fields are allowed. Validating JSON against a schema catches errors before they reach production. An API that accepts arbitrary input will eventually receive malformed data. A schema that runs at the edge rejects bad input immediately with a specific error message rather than a cryptic 500. This validator runs entirely in your browser. Paste your schema on the left and your data on the right. Errors are shown with the exact path to the failing field, so you can fix the problem without guessing. Click Load Example to see a working schema and valid data set.

Frequently Asked Questions

What is JSON Schema?

JSON Schema is a vocabulary that lets you annotate and validate JSON documents. It defines the expected structure, types, required fields, and constraints for a JSON object. It is widely used in REST APIs for request/response validation, in configuration files, and in code generation tools.

Which JSON Schema draft versions are supported?

This tool supports draft-07, draft 2019-09, and draft 2020-12. The version is auto-detected from the $schema field at the top of your schema. Draft-07 is the most widely used in practice. If your schema does not declare a $schema version, draft-07 semantics are used by default.

My data has extra fields not listed in the schema, but validation passes. Is this a bug?

No. JSON Schema is open by default. The "properties" keyword only defines constraints for the named fields if they appear. It does not prevent other fields from existing. A schema with "properties": { "name": ..., "age": ... } will happily accept { "name": "Alice", "age": 30, "role": "admin" } because "role" is simply unspecified, not forbidden. To reject extra fields, add "additionalProperties": false to your schema. This tells the validator that no property outside the listed ones is allowed. For the 2019-09 and 2020-12 drafts, "unevaluatedProperties": false is the stricter equivalent that also covers properties introduced by "allOf", "anyOf", and "if/then" branches.

What do "required" and "additionalProperties" do?

"required" is an array of property names that must be present in the object. If a required property is missing, validation fails with a clear error. "additionalProperties": false means the object must not contain any properties not listed in the "properties" keyword. This is useful for strict API contracts.

What format validators are available?

This validator supports format keywords including: email, uri, date, date-time, time, ipv4, ipv6, uuid, hostname, and json-pointer. For example, setting format: "email" will validate that the value looks like a valid email address.

Can I use this in my CI/CD pipeline?

This browser tool is for interactive validation and prototyping. For CI/CD pipelines, use a JSON Schema validation library in your Node.js scripts or a standalone CLI validator. The schema you build and test here can be copy-pasted directly into those tools without modification.

Related Tools