QiLing Tools

✅JSON Schema Generator & Validator Online

API docs, form validation and config files all benefit from a JSON Schema, but writing one by hand is slow and easy to get wrong. In Generate mode, paste a sample JSON document and the tool infers every field’s type (telling integer from number), nested objects and arrays, merges the fields of objects inside arrays (a field is required only if every object has it), turns mixed types into type arrays such as ["string", "null"], and detects string formats such as email, date-time, date, uri, uuid and ipv4. Optionally suggest enums for low-variety strings, include examples or disallow extra properties, and output draft 2020-12 or draft-07. In Validate mode, check JSON data against a schema with a hand-written validator that supports type, properties, required, additionalProperties, patternProperties, items and prefixItems (including draft-07 tuple syntax), enum, const, length and count limits, pattern, format, minimum / maximum / exclusive bounds, multipleOf, allOf / anyOf / oneOf / not, if / then / else, dependentRequired and $ref to #/$defs or #/definitions, including recursive references. Every error shows the JSON Pointer path in the data, a plain-language message and the schema location. Everything runs locally in your browser.

Free · No sign-up · Runs in your browserLast updated:

Loading tool...

How to use JSON Schema Generator & Validator

  1. 1In Generate, paste sample JSON and choose the draft and options
  2. 2Copy or download the schema, or click Use for validation
  3. 3In Validate, paste a schema and data to see every error with its path

FAQ

Can I use the generated schema as-is?
It is a solid starting point, inferred purely from your sample: fields that never appear are not in the schema, and fields present in only some array items are not required. Generate from a varied sample, then add constraints such as minLength, pattern or enum and description text for your use case.
What is the difference between draft 2020-12 and draft-07?
Most keywords are the same. The main differences are tuple syntax (prefixItems in 2020-12 versus array-form items plus additionalItems in draft-07), where definitions live ($defs versus definitions) and the $schema URI. OpenAPI 3.1 and most new tools use 2020-12, while some older libraries and editor plugins only understand draft-07. The validator accepts both styles.
Are formats validated?
By default common formats are checked — email, date, date-time, time, uri, uuid, ipv4, ipv6, hostname and regex — and dates must actually exist (February 30 is rejected). The specification treats format as an annotation by default, so if your backend validator ignores formats, untick Check formats to match it.
What is not supported?
Remote $ref (references to other files or URLs), $dynamicRef, unevaluatedProperties / unevaluatedItems and custom keywords are not supported; an unresolvable $ref is reported clearly. Your schema and data are processed only in the browser and never uploaded.