Skip to content
TabKiwiTabKiwi

JSON Schema Generator

Infer a JSON Schema (draft 2020-12 or draft-07) from sample JSON, with required keys and formats.

DataRuns in your browser. Your files never leave this device.
Loading tool…

About this tool

Writing a JSON Schema by hand is tedious. Paste one or more sample documents and this tool infers types for every property, merges the shapes of all items in arrays, marks keys that appear in every sample as required, and detects common string formats such as date-time, email, URI and UUID. Use the result as a starting point for API validation, OpenAPI specs or form generation. Everything is generated locally.

How to use JSON Schema Generator

  1. Paste sample JSON, ideally an array with several typical records.
  2. Choose the draft version and options.
  3. Review the generated schema and tighten it where needed.
  4. Copy it or download schema.json.

Frequently asked questions

Why is a key not marked as required?

It was missing from at least one of the sample objects. Add more representative samples, or edit the required list by hand.

How are mixed types handled?

If a property holds different types across samples, the schema lists all of them, for example "type": ["string", "null"]. Integers and decimals together become number.

Is the schema final?

Treat it as a draft. Inference can only describe the samples it saw, so add constraints like minimum, maxLength or enum yourself.

More Data tools

View all 25 →