JSON Schema Generator

Paste sample JSON and get a draft 2020-12 JSON Schema with types and required fields. Runs locally in your browser.

About this tool

Infers types (string, integer, number, boolean, null, object, array) from your sample. Every key seen is marked required; arrays of objects merge their properties and only keys present in every item stay required. Treat the result as a starting point and tighten it (formats, enums, min/max) by hand. Nothing is uploaded.

Related: JSON Formatter & Validator · Base64 Encode & Decode · URL Encoder & Decoder · SHA-256 / SHA-1 Hash Generator · Unix Timestamp Converter

Frequently asked questions

What does this produce?

A draft JSON Schema inferred from the sample JSON you paste in.

Is the schema final?

No, it infers types from one sample; tighten required fields, formats and enums by hand.

Which types are detected?

string, number, integer, boolean, null, object and array.