WHAT IT DOES
A schema for what the sample shows, with no invented certainty.
Drop or paste representative JSON and get a JSON Schema using the 2020-12 dialect. Object properties, required keys, arrays, numeric kinds, nullability, and mixed sample values are inferred from the document. Objects remain open because one response cannot prove that another property is forbidden, and empty arrays receive an unconstrained item schema because no element type was observed. The result is a reviewable starting contract rather than a claim that one example described every future value.
Why use it?
Use a sample to start a validation contract when writing every property by hand would be repetitive. Inference records observations, not the complete business rules.
How to use this tool
- Paste representative JSON and infer the schema.
- Review required properties and item types. For example, if only one of two records contains a nickname, that property should not become required.
- Add rules that samples cannot establish, such as allowed values, bounds, or whether extra properties are forbidden.
- Test the edited contract in JSON Schema Validator with both acceptable and deliberately invalid documents.
Details and limitations
- The generated document declares the official Draft 2020-12 meta-schema and uses anyOf when the sample demonstrates more than one value kind.
- Multiple objects inside an array are merged, with only the keys present in every observed object included in required.
- additionalProperties is deliberately omitted, which leaves objects open until a human who knows the contract chooses to close them.