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.
Please enter some input.
How to use
- Paste a JSON sample.
- Set optional title, $id, required and additionalProperties options.
- 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.
Related tools
JSON Formatter
Format, validate and minify JSON in one place.
XML Formatter
Pretty-print and indent XML documents.
YAML Formatter
Format YAML and convert between YAML and JSON in both directions.
CSV to JSON
Convert CSV tables into JSON data.
JWT
Encode, decode and verify JSON Web Tokens locally.
Hash Generator
Generate SHA-1, SHA-256, SHA-384 and SHA-512 hashes.
Rate this tool
Your rating