Objects & required fields
Properties are inferred from observed object keys. When enabled, a field is required only if it appears in every object sample at that location.
Paste a JSON sample to infer a schema for its structure—objects, arrays, scalar types and field presence. Choose a JSON Schema draft and control required fields and unknown properties.
Turn the shape of a JSON sample into a schema you can review and refine.
Properties are inferred from observed object keys. When enabled, a field is required only if it appears in every object sample at that location.
Array item schemas are inferred across observed items. Mixed types become a type union; empty arrays are left open and reported in the warnings.
Choose the standard JSON Schema 2020-12 or Draft-07 URI. The inferred keywords used here—type, properties, required, items and additionalProperties—work in both.
A sample only shows what happened in that sample. It cannot reveal all valid values, numeric ranges, string formats, conditional rules, relationships between fields or whether an observed field is optional in other records.
For an array of objects, missing keys in any observed object stay optional when “required” is enabled. A single object sample marks each observed key as required because there is no second object to compare.
Use the additionalProperties: false option only when unknown object keys should be rejected. Leave it unchecked when your data may contain fields that were not present in the sample.
Input is limited to 1 MiB, schema depth to 128 levels and generated output to 8 MiB. Parsing and inference run in a local worker; no sample is uploaded or saved.
No. It reflects only the sample you supplied. Add rules for ranges, formats, business logic and unobserved cases yourself, then validate it against representative data.
When enabled, a property is required if it appears in every object sample at that location. With one object sample, all observed properties are marked required.
An empty array gives no evidence about its item type, so the schema leaves items unconstrained and adds a warning.
No. The sample is parsed and analyzed in a local browser worker. It is not uploaded or stored by this tool.