JSON Schema Validator - Validate JSON Online
Developer Tools
Validate JSON documents against a JSON Schema Draft-07 subset in your browser. Check types, required fields, formats, references, and more.
How to use this tool
- Enter a schema and JSON document. Edit either pane or paste your own schema and JSON document. The verdict updates as you type, and all parsing and validation happen in this browser.
- Format or minify valid JSON. Use Format to indent a valid pane or Minify to compact it. If a pane contains invalid JSON, its formatting buttons are disabled and the text stays available for correction.
- Review the verdict and supported rules. Check the live Valid or Invalid result and read each error path and message. This engine checks only the Draft-07 subset listed below; unsupported keywords and formats are ignored.
- Copy errors or either input. Copy errors writes a JSON array of path and message objects (or [] when the document is valid). Use Copy schema or Copy document to reuse the text in another editor.
What is JSON Schema?
JSON Schema is a vocabulary for annotating and validating JSON documents. It lets you describe the structure of your data (which fields are required, what types they must be, what constraints apply) and then validate any JSON document against those rules.
This page uses a small custom Draft-07 subset engine, not Ajv. A schema can still produce a
valid result when it contains keywords this engine does not evaluate. In particular,
if/then/else, contains, and
dependentRequired are not implemented; other unknown keywords and unsupported
format values are ignored. Use a full JSON Schema implementation when you need comprehensive
draft conformance.
Supported keywords (Draft-07 subset)
The table lists what the browser engine checks. Recognized format checks are deliberately lightweight: for example, email and IPv6 use basic patterns rather than complete standards parsers. A format name omitted from the list is not checked.
| Keyword | Description |
|---|---|
type | string, number, integer, boolean, null, array, object |
enum | Allowed values list |
const | Single allowed value |
required | Required object keys |
properties | Per-key sub-schemas |
patternProperties | Sub-schemas selected by matching property names |
additionalProperties | Allow / deny / schema for extra keys |
minimum / maximum | Numeric range (inclusive) |
exclusiveMinimum / exclusiveMaximum | Numeric range (exclusive) |
multipleOf | Number must be divisible by the given positive value |
minLength / maxLength | String length |
pattern | String regex pattern |
format | Basic checks for date-time, date, email, uri, ipv4, ipv6, and uuid |
minProperties / maxProperties | Object property count |
items | Homogeneous item schema or tuple schemas |
additionalItems | For tuple schemas, false rejects items beyond the tuple |
minItems / maxItems | Array length |
uniqueItems | No duplicate array items |
allOf / anyOf / oneOf / not | Combining schemas |
$ref | Local JSON Pointer references such as #/definitions/… and #/$defs/…; external references are not fetched |
Common validation patterns
| Pattern | Schema snippet |
|---|---|
| Non-empty string | {"type":"string","minLength":1} |
| Positive integer | {"type":"integer","minimum":1} |
| ISO 8601 date | {"type":"string","format":"date"} |
| Email address | {"type":"string","format":"email"} |
| Required object field | {"required":["id","name"]} |
| Nullable field | {"anyOf":[{"type":"string"},{"type":"null"}]} |
| Enum values | {"enum":["draft","published","archived"]} |
Draft version history
- Draft 04 (2013): first widely adopted version; introduced
$schema,$ref,allOf - Draft 07 (2018): added
if/then/else,readOnly,writeOnly, moreformatvalues. This page explains those keywords for context, but its validator does not implementif/then/else. - Draft 2019-09: introduced
$anchor, deprecateddefinitionsin favor of$defs - Draft 2020-12: current standard; improved
$ref, addedprefixItemsfor tuples andunevaluatedProperties
When to use JSON Schema
- Validating API request and response payloads at runtime
- Enforcing configuration file structure across teams
- Documenting data contracts between microservices
- Generating forms and UI dynamically from schema definitions
-
Enabling IDE autocomplete in JSON/YAML config files (via
$schemaproperty)
Frequently asked questions
Which JSON Schema draft does this validator support?
It checks a custom subset of Draft-07 and is not Ajv or a complete Draft-07 implementation. The Supported keywords table lists the checks that run here. Keywords such as if/then/else, contains, and dependentRequired are not evaluated, so use a full JSON Schema implementation when those rules matter.
What happens to unknown keywords or format values?
Unknown keywords and unrecognized format values are ignored. The listed formats have lightweight checks; email and IPv6 checks, for example, are not complete standards parsers. A green result only covers the rules this page implements.
Can I use external $ref references?
No. References must be local JSON Pointers such as #/definitions/Person or #/$defs/Person in the schema you pasted. The page does not fetch remote schemas.
How can I reject extra object properties?
Set additionalProperties to false alongside properties. For example, a schema with properties.name and additionalProperties:false accepts name but reports any other object key as an error.
Are my schema and JSON uploaded?
No. Parsing and validation run in this browser. The page has no file picker and does not fetch remote references; the text you enter is not sent to a server.
What do the error paths look like?
Paths use a dollar-sign root with dot properties and bracketed array indexes, such as $.profile.name or $.items[0]. They are not RFC 6901 JSON Pointers.
Related tools
- JSON FormatterUse JSON Formatter to format, validate, and minify JSON instantly in your.
- JSON Path TesterUse JSON Path Tester to test JSONPath expressions against any JSON document in.
- JSON -> TSUse JSON -> TS to paste JSON and instantly generate TypeScript interfaces with.
- JSON Diff ViewerUse JSON Diff Viewer to compare two JSON objects side-by-side. Instantly see added,.