About this tool
Writing a JSON Schema by hand from scratch is slow and easy to get wrong, especially for deeply nested API responses with many fields. This tool inspects a real JSON example you paste in and infers a matching JSON Schema — detecting types (string, number, boolean, object, array), nested structures, and required fields based on what's actually present — so you get a working starting point instead of a blank page. The generated schema is useful for documenting an API's response shape, validating incoming requests in a backend, or configuring form or data-validation libraries that consume JSON Schema. As with every tool on this site, the inference runs entirely in your browser rather than sending your sample data to a server.
Frequently asked questions
What JSON Schema draft does it target?
The generated schema follows standard JSON Schema conventions (type, properties, required, items) compatible with common validators like Ajv.
Does it mark all fields as required?
Fields present in your sample JSON are marked required by default, since the schema is inferred from a single example — you may want to manually relax fields that are actually optional.
Can it handle arrays of objects?
Yes — array items are inspected and their structure is inferred into the schema's items definition.
Will it detect number vs. integer types?
Yes — whole numbers are typically inferred as integer while decimal values are inferred as number, following JSON Schema's type conventions.
Can I use the output directly for API validation?
Yes, the generated schema is standard JSON Schema and can be plugged directly into common validation libraries, though reviewing it for edge cases your one example didn't cover is recommended.