Skip to content

JSON Schema from a JSON example

Runs only in your browser. Nothing is sent to our servers.

Paste a JSON example and get a JSON Schema (draft 2020-12) that describes it. Use it as a starting point and tighten it by hand.

JSON Schema

How the schema is built

  • All items in an array are merged into one items schema. A field is required only if it is present in every item.
  • Whole numbers become integer. If an array mixes whole and decimal numbers, the field becomes number.
  • A value that is null in the example gets type null. Widen it, for example to ["string", "null"], if it can hold a value.
  • Detected formats are date-time, date, email, uuid and uri.

Want data that matches the schema? Paste it into Test data from schema.