Skip to content
Toolcroft

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.

Valid - JSON matches the schema.

How to use this tool

  1. 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.
  2. 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.
  3. 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.
  4. 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.

KeywordDescription
typestring, number, integer, boolean, null, array, object
enumAllowed values list
constSingle allowed value
requiredRequired object keys
propertiesPer-key sub-schemas
patternPropertiesSub-schemas selected by matching property names
additionalPropertiesAllow / deny / schema for extra keys
minimum / maximumNumeric range (inclusive)
exclusiveMinimum / exclusiveMaximumNumeric range (exclusive)
multipleOfNumber must be divisible by the given positive value
minLength / maxLengthString length
patternString regex pattern
formatBasic checks for date-time, date, email, uri, ipv4, ipv6, and uuid
minProperties / maxPropertiesObject property count
itemsHomogeneous item schema or tuple schemas
additionalItemsFor tuple schemas, false rejects items beyond the tuple
minItems / maxItemsArray length
uniqueItemsNo duplicate array items
allOf / anyOf / oneOf / notCombining schemas
$refLocal JSON Pointer references such as #/definitions/… and #/$defs/…; external references are not fetched

Common validation patterns

PatternSchema 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, more format values. This page explains those keywords for context, but its validator does not implement if/then/else.
  • Draft 2019-09: introduced $anchor, deprecated definitions in favor of $defs
  • Draft 2020-12: current standard; improved $ref, added prefixItems for tuples and unevaluatedProperties

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 $schema property)

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.

Browse all developer tools