Toolora

JSON to JSON Schema

Generate a JSON Schema draft 2020-12 definition from sample JSON.

The JSON Schema Generator infers types, properties, required fields and array items from a sample JSON document and outputs a Draft 2020-12 schema that can be used for validation and documentation.

How to use

  1. Paste a JSON sample.
  2. Set optional title, $id, required and additionalProperties options.
  3. Read or copy the generated schema.

Frequently asked questions

Which schema version is produced?

Draft 2020-12 with a $schema declaration.

How are types inferred?

Each value is inferred from the first non-null sample value in the document.

Can it handle arrays?

Arrays produce an items schema inferred from the first non-null element.

Rate this tool

Your rating