Generate a Draft-06 JSON Schema from a sample to document structure and validation rules.
Local processing
Workspace
Output is a JSON Schema Draft-06 starting point, with no guarantee of OpenAI Structured Outputs compatibility. Adjust it for your validator and business rules.
0 characters
Read only
Ready. Enter your content, then choose an action.
◇ Content is processed in this browser onlyInput is not saved automatically
HOW TO USE
How to use
Paste valid JSON to generate types, properties, required fields and a $schema declaration. Object arrays are inferred together. Use the result with a Draft-06 validator and add business ranges, formats and optional fields.
Example
{"count":2} infers an integer count. Business constraints such as a minimum value need to be added afterwards.
GOOD TO KNOW
Keep in mind
Inferred required fields and additionalProperties can be restrictive; review them. Unseen types cannot be inferred. No remote $ref is fetched and generated schemas are not executed. Limits: 100,000 characters, 40 levels and 20,000 values.
Common questions
Can this be used directly for model structured output? Providers support different schema subsets. Adjust it for the target service; this tool generates a general Draft-06 starting point.