JSON schema
generator
Paste any JSON and get three things at once: a draft 2020-12 JSON Schema, TypeScript interfaces, and a plain-English description of the shape - with required fields, enums and formats inferred from the data itself.
One paste, three answers
Yetty gives your AI a full picture of your website over MCP - pages, collections and fields it can safely edit.
How the shape
is inferred
Shapes are merged
An array of objects is not judged by its first item. Every object is merged into one shape, so a field that only shows up in item 40 still makes it into the schema - as optional.
Required from presence
A field present in every sampled object lands in required. Missing anywhere, even once, and it becomes optional - the honest reading of the evidence you pasted.
Enums from repetition
When a string field only ever takes a handful of values - status, plan, role - and those values repeat, the schema pins it as an enum instead of a loose string.
Formats from patterns
Values that consistently look like dates, date-times, emails, URLs or UUIDs get the matching format keyword, so validators can actually check them.
Three views, one truth
The JSON Schema, the TypeScript interfaces and the plain-English summary are all rendered from the same merged shape - they can never disagree with each other.
A sample is a sample
The schema describes the JSON you pasted, not every JSON your system could ever produce. Treat it as a strong first draft and loosen what you know varies.
People also ask
How do I generate a JSON Schema from an example JSON file?
Paste the example in this page and the schema appears instantly - draft 2020-12, with types inferred from the values, required listing the fields that are always present, and string formats like date, email, uri and uuid detected from the data itself. It runs entirely in your browser, so a config file or API response with secrets in it never leaves your machine.
How does it decide which fields are required and which are optional?
From presence. When your JSON is an array of objects, the shapes of all the objects are merged: a field that appears in every object lands in required, a field that is missing in even one becomes optional. In the TypeScript tab the same logic shows up as a question mark on the property, and the plain-English tab says "sometimes missing" - three views of one merged shape.
Can I get TypeScript interfaces from JSON without installing anything?
Yes - the TypeScript tab builds nested interfaces from the same inferred shape: objects become named interfaces, arrays become T[] types, fields that are sometimes absent get the optional marker, and mixed values become union types. Copy the tab straight into your codebase; there is no npm package, no signup and no upload involved.