Contact

Tools  /  JSON  /  JSON Schema Validator

JSON Schema Validator

Validate a JSON document against a JSON Schema -- type/required/enum/const, min/max/exclusive/multipleOf, length/pattern/format, array constraints, additionalProperties, local $ref, and oneOf/anyOf/allOf/not composition -- with batch mode and a sample-data generator.

What this tool does

Paste a JSON document and a JSON Schema, and it checks the document against every rule the schema states, reporting exactly which ones failed and why — not just whether the document passed or not.

What is covered

  • Valuestype, const, enum.
  • Numbersminimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf.
  • StringsminLength, maxLength, pattern, and format (email, UUID, date-time, date, IPv4, IPv6, URI).
  • Objects and arraysrequired, properties, additionalProperties, minProperties/ maxProperties, minItems/ maxItems, uniqueItems.
  • CompositionallOf, oneOf, anyOf, not, and local $ref pointing elsewhere in the same schema document.

This is a broad, practical subset of JSON Schema rather than a complete implementation of every keyword across every draft — for full spec compliance across all draft versions, a dedicated implementation like Newtonsoft's validator or Hyperjump is the more rigorous choice.

Validating many documents at once

When the document is an array, batch mode validates each item against the same schema individually and reports how many passed out of the total, with the specific issues for whichever ones failed — useful for checking a whole batch of records against one schema in a single pass instead of one document at a time.

Generating a sample from a schema

Working the other direction, a schema alone can generate a matching sample document — required properties filled in with realistic placeholder values for each detected format (an actual email-shaped string for format: email, and so on). Useful for a quick example to hand someone, or a starting point to edit toward a specific test case.

Privacy

Both validation and sample generation happen in your browser. Nothing you paste, drop, or load from a file is sent to a server.

Frequently asked questions

Is my data uploaded anywhere?
No. Validation and sample generation both run locally in the browser — nothing is sent to a server.
Does it support the complete JSON Schema specification?
It covers a wide, practical subset — type checks, required and enum, numeric and length constraints, pattern and format, additionalProperties, local $ref, and oneOf/anyOf/allOf/not composition — but not every keyword across every draft. For full specification compliance, a dedicated implementation such as Newtonsoft or Hyperjump is the more rigorous choice.
What is batch mode, and when does it turn on automatically?
When the document being validated is an array and the schema itself is not written to expect an array, batch mode is detected automatically and validates each item individually, reporting how many of them passed and the specific issues for any that failed.
Can it generate a sample document instead of validating one?
Yes — given only a schema, it produces a matching document with required fields filled in using realistic placeholder values for each detected format, useful as a quick example or a starting point for a specific test case.
Does it support $ref and schema composition like oneOf, anyOf and allOf?
Yes — local $ref pointing elsewhere within the same schema document is resolved, and allOf, oneOf, anyOf and not are all evaluated as part of validation, not treated as unsupported keywords.
How much detail does it give when validation fails?
Every failing rule is reported with the exact path in the document it applies to and what was expected, rather than a single pass or fail result with no further explanation.
Theme Accent