← Tools

JSON Schema Generator

Describe your JSON with a schema you can validate against.

Private: your files never leave your device.

Tip: paste an array of several samples. Keys missing from some of them become optional, and numbers that are always whole become integers. Nothing you paste is uploaded.

How it works

  1. Choose your files.
  2. Adjust the settings if you like.
  3. Download the result, or send it to another device with BroAllDone.

Frequently asked questions

How do I create a JSON Schema from JSON?

Paste sample JSON and press Make schema. You get a JSON Schema you can use to validate data, for example with Ajv or in OpenAPI.

Which keys are marked as required?

Keys found in every sample. Paste an array of several samples: keys missing from some of them become optional.

Does it detect formats like email and dates?

Yes. Text that is always an email, a date, a date-time, a URI, a UUID or an IPv4 address gets the matching format.

Which version of JSON Schema does it use?

Draft 2020-12, the latest, or draft-07, which most tools support.

What does Reuse repeated objects do?

An object shape that appears more than once is defined once in $defs and referenced with $ref, so the schema stays short.

Is my JSON uploaded?

No. The schema is made in your browser, so your data never leaves your device.

More free tools