FREE BROWSER TOOLAI workflow
JSON to JSON Schema — Structured Output Starter
Turn a sample JSON response into an editable JSON Schema draft 2020-12 starting point. Use it to describe an extraction result, plan an API payload, or prepare a structured-output experiment.
Calculations run in your browser. No account or API key is needed.
Your result
- Root type
- object
- Sample values inspected
- 10
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"author": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"website": {
"type": "null"
}
},
"required": [
"name",
"website"
],
"additionalProperties": false
},
"published": {
"type": "boolean"
},
"readingMinutes": {
"type": "integer"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"title": {
"type": "string"
}
},
"required": [
"author",
"published",
"readingMinutes",
"tags",
"title"
],
"additionalProperties": false
}How to use this tool
Paste a representative JSON value, object or array.
Choose whether observed object fields are required and extra properties are allowed.
Generate the schema, review its assumptions, and test it with additional examples.
What the example can establish
The generator infers primitive types and nested properties. Arrays combine distinct observed shapes with anyOf; repeated shapes are deduplicated. An empty array leaves items unrestricted because it supplies no example. Strings remain strings: dates, enumerations, numeric ranges and business rules need your own decisions.
Review before integration
A missing field in one real response may be legitimate even if the sample includes it. Review required lists and null values carefully. Provider support varies across JSON Schema features, so check the target API documentation and validate returned data. The result is a schema draft, not proof that a model response is correct.
Common questions
Does it merge different object examples?
Different object shapes in an array become alternatives. It does not infer a single optional-field model across examples.
What are the input limits?
Use at most 50,000 text units, 5,000 JSON values and 24 nesting levels. Store integers outside JavaScript’s safe range as strings.