Treat it as a first draft
Inferring from a real response is closer to production than inventing a Schema. It cannot see optional fields that were absent, or business enum ranges.
JSON Tools for AI Developers · Runs locally
Natural language generation · Schema · Zod · OpenAPI · Function Calling · MCP · 30+ tools
Generate JSON Schema from a real JSON sample. Types and fields are inferred locally — good for validating APIs and writing Structured Output.
When the response exists and the docs come later, writing properties by hand is slow. Paste a sample, click Generate Schema, and keys that appeared become string, number, boolean, array, or object.
The auto draft often marks every sample key required and writes no descriptions. Before you ship, check nullable fields and extra fields yourself.
Inference runs in the browser. User data in the sample never leaves the device.
Inferring from a real response is closer to production than inventing a Schema. It cannot see optional fields that were absent, or business enum ranges.
Check required, whether numbers are number or integer, and whether objects need additionalProperties: false. Get those wrong and Validate plus Structured Output go wrong together.
Not as the final draft. Add descriptions, check number types, and accept it with another real payload.
Inference only sees keys that appeared in the sample. Missing fields are not marked optional — you change that for the business.
This page produces generic JSON Schema. The Structured Output page wraps it for OpenAI / Gemini / Claude / MCP.
No. Generation stays local.
Common nesting and arrays, yes. Very deep or cyclic structures should be split into multiple definitions.
Some strings look like emails or links. Still add format yourself — don't rely on the guess.
A null sample does not carry enough type info. Generate from a real value, or write a type array by hand.
Get the core Schema here, then export doc YAML on the OpenAPI page.