A key in some items
retries appears in one job, so it is a property of the job schema but not in its required list.
{"jobs": [{"name": "a"}, {"name": "b", "retries": 3}]}Paste a JSON sample. A JSON Schema that describes it is written beside it.
The schema describes the sample, so it accepts the sample and little else. Add formats, enums, and limits before using it to validate real data.
Ctrl+Enter or ⌘+Enter runs this tool immediately.
Waiting for input.
Parsing stays in this browser. Input is not uploaded or saved.
retries appears in one job, so it is a property of the job schema but not in its required list.
{"jobs": [{"name": "a"}, {"name": "b", "retries": 3}]}An array of numbers and null gets items with "type": ["integer", "null"].
{"scores": [3, null]}Check a JSON document against a JSON Schema in the browser. Draft-07 and 2020-12 are supported, and remote $ref values are not fetched.
Generate TypeScript interfaces from a JSON sample in the browser. Array items are merged, and keys missing from some items become optional.
Generate Zod schemas and inferred TypeScript types from a JSON sample in the browser. Optional keys use .optional() and null values use .nullable().