Generate JSON Schema from JSON
Paste a JSON sample and get a JSON Schema that describes it. Turn on Strict for the rules AI structured outputs expect: every key required, optional ones nullable, no extra keys.
How to use the JSON to JSON Schema converter
- Paste JSON or drop a .json file on the editor.
- The schema appears on the right as you type.
- Turn on Strict if the schema is for an AI model's structured output.
- Copy it, or download it as schema.json.
What you get
- Types, nested objects and arrays described in full
- required lists built from keys present in every sample
- additionalProperties: false on every object
- Strict mode: optional keys required but allowed to be null
About the JSON to JSON Schema converter
Made for structured outputs
AI APIs can force a model to answer with JSON that matches a schema. Their strict modes usually require every property to be listed as required and extra properties to be forbidden. Strict mode writes the schema that way.
Standard JSON Schema
The output uses the 2020-12 draft, which current validators and OpenAPI 3.1 understand.
Frequently asked questions
- What does Strict change?
- Every key goes into required. Keys that were missing from some samples get null added to their type, so the model can still leave them empty.
- Can it validate JSON against a schema?
- Not yet. Schema validation is on our list for a future update.
- Is my data uploaded?
- No. The schema is generated in your browser.