How to use JSON Schema Validator
The JSON Schema Validator checks a JSON document against a JSON Schema definition and lists every validation error with the exact data path and a human-readable reason. JSON Schema (json-schema.org) is the standard way to define the shape, types, and constraints of JSON APIs and configuration files. This tool supports Draft-07 and Draft 2020-12 keywords and runs entirely in your browser — sensitive payloads never leave your machine.
- Paste or upload your JSON Schema (the definition document) into the Schema panel on the left.
- Paste or upload the JSON data you want to validate into the Data panel on the right.
- Click Validate to run the validator — all errors appear instantly with their JSON Pointer paths.
- Click on any error to highlight the offending data node in the data panel.
- Fix the data or schema and re-validate until the result shows "Valid".
- Use the Schema draft selector to switch between Draft-07 and Draft 2020-12 if your schema uses draft-specific keywords.
Your data never leaves your device — 100% private processing.
Core JSON Schema keywords
JSON Schema uses keyword assertions to constrain data. The type keyword restricts values to one or more JSON types (string, number, integer, boolean, array, object, null). For strings: minLength, maxLength, pattern (regex), and format (email, uri, date-time). For numbers: minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf. For arrays: items (schema for each element), minItems, maxItems, uniqueItems. For objects: properties (per-key schemas), required (list of required keys), additionalProperties (allow or forbid extra keys), and patternProperties (regex-keyed property schemas).
| Keyword | Applies to | Purpose |
|---|---|---|
| type | Any | Constrain to one or more JSON types |
| required | Object | List of keys that must be present |
| properties | Object | Per-property schema definitions |
| additionalProperties | Object | Allow or forbid undeclared properties |
| items | Array | Schema each element must satisfy |
| enum | Any | Restrict value to a fixed set |
| $ref | Any | Reference a schema definition by URI |
| allOf / anyOf / oneOf | Any | Combine multiple schemas with AND/OR/XOR logic |
JSON Schema drafts and compatibility
JSON Schema has evolved through several published drafts. Draft-04 introduced the $schema meta-schema URI and the definitions keyword for reusable sub-schemas. Draft-07 added the if/then/else keywords for conditional validation and the readOnly and writeOnly keywords for documentation generators. Draft 2019-09 renamed definitions to $defs and added $recursiveRef. Draft 2020-12 is the current stable specification and introduced prefixItems for tuple validation and the unevaluatedProperties keyword. When sharing schemas, always declare "$schema" at the root so validators know which draft to apply.
Worked examples
Missing required field
Inputs: schema requires "email"; data {}
Result: error at / : must have required property "email"
Wrong type
Inputs: age expects integer; data {"age":"x"}
Result: error at /age : must be integer
Valid document
Inputs: data satisfies every keyword
Result: Valid — 0 errors
Glossary
- JSON Schema
- A JSON-based vocabulary for describing the structure and validation constraints of JSON documents.
- $ref
- A JSON Schema keyword that substitutes the current schema with another schema identified by a URI or JSON Pointer.
- JSON Pointer
- A string syntax (RFC 6901) like /address/city that identifies a specific value within a JSON document.
- anyOf
- A JSON Schema keyword that requires data to be valid against at least one of the listed sub-schemas.
- additionalProperties
- A JSON Schema keyword controlling whether object properties not listed in "properties" are permitted.
Related reading
Frequently Asked Questions
Why use JSON Schema Validator?
- Validate a JSON document against Draft-07 or Draft 2020-12 schemas with full keyword support
- See every validation error with its JSON Pointer path and a human-readable description
- Click any error to highlight the offending data node in the data panel for fast location
- Test your schema definition by deliberately submitting invalid data to confirm it catches errors
Common use cases
- Validate an API response payload against its OpenAPI component schema before writing tests
- Catch a missing required field in a Kubernetes manifest after converting it from YAML to JSON
- Test that additionalProperties: false correctly rejects undeclared keys in a config schema
- Validate a nested schema using allOf and if/then keywords before publishing a client SDK
- Debug a CI failure by pasting the offending JSON payload into the validator to read the errors
Get weekly tool tips & updates
New tools, power-user tips, and productivity hacks — delivered free every Friday.
No spam, ever. Unsubscribe with one click.
Related Developer Tools
Bcrypt Hash Generator & Checker
Generate bcrypt password hashes and verify a password against a hash online. Adjustable cost factor. Free, private bcrypt tool in your browser.
TOTP / 2FA Code Generator
Generate time-based one-time passwords (TOTP) from a secret key online. Compatible with Google Authenticator and 2FA. Free, private TOTP generator.
User Agent Parser
Parse any user-agent string to identify the browser, engine, operating system, and device. Detects your own UA too. Free and private.
JSON Formatter & Validator
Format, validate, and minify JSON instantly. Includes syntax highlighting, error detection, and a collapsible tree view — free, private, in-browser.
JSON to TypeScript Types
Convert JSON to TypeScript interfaces online. Infers types, nested objects, and arrays automatically. Free, private JSON-to-TS generator in your browser.
Regex Tester
Test and debug regular expressions online. See live matches, capture groups, and replace output. Free, private, instant.
Explore all Developer Tools.