Skip to content
migration.tools
JSON to JSON Schema

JSON to JSON Schema converter

A JSON Schema lets you validate data on both sides of a migration — the export from the old system and the import into the new one. Paste a representative document to get a schema you can tighten by hand.

Options

JSON

JSON Schema

The result appears here as soon as there is input.

Processed on this device. Nothing you paste or drop is uploaded.

How to use it

  1. 1Paste your JSON or drop a file onto the input panel.
  2. 2Adjust the options — the result updates as you type.
  3. 3Copy the JSON Schema or download it. Drop several files to convert a batch into one ZIP.

What is inferred

Types for every value, required lists made of the keys present in every sample object, item schemas merged across all array elements, and format hints for dates, datetimes, emails, URIs and UUIDs.

additionalProperties is set to false so the schema catches unexpected fields — loosen it if the source system adds fields over time.

Questions

Which draft does it target?

Draft 2020-12, which is what OpenAPI 3.1 uses. The generated keywords are also valid in draft-07 if you change the $schema URL.