JSON Schema Generator
Paste a sample JSON document and get a JSON Schema that describes its structure. The generator infers types, required properties, array item schemas, and handles nested objects. The output follows the draft 2020-12 specification, so it works with any compliant validator.

What it does
- ▸Infers JSON Schema (draft 2020-12) from sample JSON data
- ▸Detects types: string, number, integer, boolean, null, array, object
- ▸Identifies required properties (properties present in all objects)
- ▸Generates array item schemas by merging item types across the array
- ▸Handles deeply nested objects and arrays of objects
- ▸Optional strict mode that makes all properties required
Use cases
- ▸Generating a schema for an API that doesn't provide one
- ▸Creating validation schemas for configuration files
- ▸Documenting the structure of JSON data for a team
- ▸Generating schemas for use with form generators or validators
How it works
Paste your sample JSON into the input pane
The tool analyzes the structure and infers types for each property
A JSON Schema document is generated in the output pane
Copy the schema for use with a validator, documentation, or form generator
Frequently asked questions
1Which JSON Schema draft does it use?
The generator produces draft 2020-12 schemas, which is the latest standard. The output uses the $schema keyword to declare the draft, so validators know which specification to follow.
2How does it handle arrays with mixed item types?
When an array contains items of different types or shapes, the generator merges them into a single schema with multiple possible types. If all items have the same structure, it generates a clean single-item schema.
3Can I make all properties required?
Yes. Toggle strict mode to mark every property as required, regardless of whether it appears in all objects. This is useful for generating strict validation schemas where no fields should be omitted.
Related tools

JSON Formatter & Validator
Format, validate, repair, and minify JSON

JSON Patch (RFC 6902)
Apply, generate, or validate JSON Patch operations per RFC 6902

JSON Diff
Structural comparison of two JSON documents — key order and formatting ignored

JSON to Code
Generate typed models from JSON (TypeScript, Swift, Kotlin, Go…)
Use JSON Schema Generator offline in Devinity
All 95 tools run locally on your Mac. No internet required, no data sent to servers.
Download Devinity →