Auto-generate a JSON Schema from a sample object. Type inference detects integers, numbers, strings, booleans, arrays and nested objects, and marks all keys as required.
100% Local
How to Use the JSON Schema Generator
Paste a representative sample JSON object into the input box. Click Generate Schema and the output panel shows a complete JSON Schema with the $schema field set to the 2020-12 draft, inferred types and a required array.
Type inference rules
Integers map to "integer"
Floats map to "number"
Objects map to "object" with nested properties
Arrays map to "array" with items inferred from the first element
Strings, booleans and null are preserved
Features
Auto-detects all JSON primitive types
Recursively builds schemas for nested objects
Populates the required array from observed keys
Uses the JSON Schema 2020-12 draft
All processing runs locally in your browser. Your data is not uploaded to any server.