JSON TOOLS

JSON Schema Generator & Validator

Infer a Draft 2020-12 schema from sample JSON, then validate a JSON instance locally with readable errors.

GENERATE A SCHEMA

Start from sample JSON

Browser-only

The sample is used to infer JSON types, object properties, required keys, nested structures and array item variants. Review the schema before using it.

VALIDATE AN INSTANCE

Check JSON against a schema

Draft 2020-12 subset

Validation scope warnings

JSON stays in your browser. External references are not fetched.

JSON Schema guide

Generate a starting schema from representative JSON, edit it to add rules the sample cannot reveal, then paste a schema and instance into the validator. Generation and validation stay on this device.

Inference is a starting point, not a contract

A single sample can show observed types and keys, but it cannot reliably reveal optional properties, allowed value ranges, formats or every valid array shape. The generated schema marks observed object keys as required. Review and adjust those choices to match your real data contract.

The validator supports a Draft 2020-12 subset: common type, object, array, string and numeric constraints; enum and const; allOf, anyOf, oneOf, not and conditional checks; and local JSON Pointer references. It reports unimplemented keywords as warnings instead of silently claiming full standards coverage. It does not fetch external references or perform official meta-schema validation.

Frequently asked questions

Which JSON Schema version does the generator produce?

Generated documents declare the Draft 2020-12 meta-schema URI. The generator infers types and required properties from the sample you provide; it cannot infer every business rule from one example.

Does validation implement the entire JSON Schema specification?

No. This browser tool validates a documented Draft 2020-12 keyword subset, including types, properties, references to local JSON Pointers, common constraints and composition keywords. Unsupported keywords are reported as warnings.

Can the validator fetch external $ref URLs?

No. External references are not fetched. This avoids unexpected network requests and keeps your data local; use local # JSON Pointer references such as #/$defs/item.

Is my JSON uploaded?

No. Schema generation and validation run entirely in your browser. The page does not send sample data, schemas or instances to a server.

Sources

  1. JSON Schema Draft 2020-12
  2. JSON Schema — Getting started

Privacy and scope: processing is local. This validator implements a documented subset of Draft 2020-12; inspect warnings and verify production contracts with a full JSON Schema implementation.