JSON → JSON Schema

Infers a JSON Schema (draft 2020-12) from a JSON sample: types, required keys, nested objects under $defs, integer vs number. A starting point for API validation and OpenAPI.

In
JSON
Out
schema
Options
Input · JSON
Output · schema

Waiting for input

Runs in this tab. The text is not sent anywhere.

Related

Questions

Which keys are required?

Those present in every object of the sample. Paste several records, so that optional fields show up as optional.

↑ ↓ move · Enter open · Esc close