JSON Schema Generator

Generate JSON Schema from JSON data in your browser.

Infer object, array, and primitive types from sample JSON and generate JSON Schema Draft 2020-12.

How to use

  1. Paste JSON that represents the real data shape.
  2. Generate the Schema.
  3. Add formats, enums, ranges, and business validation rules.

Examples

Object to Schema

Input

{"id":1,"name":"demo"}

Output

{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"]}
Privacy
May contact server Avoid sensitive data Uploads only when needed

Sample JSON and generated Schema stay in your browser.

Frequently asked questions

No. Only basic types are inferred from sample values; enums, lengths, formats, and ranges require review.

The output declares Draft 2020-12.
Next steps

Related tools

After finishing this task, continue with these related tools.