JSON Schema Generator
Generate JSON Schema from sample JSON data. Supports Draft-07, 2019-09, and 2020-12. Validate JSON, detect formats, and export schemas. Free developer tool.
Embed This Tool
Add this tool to your website with customizable styling
How to Use
- 1 Paste sample JSON — Paste a sample of your JSON data into the input area. The tool will analyze its structure to generate a schema.
- 2 Configure options — Choose your schema version, enable format detection for emails/dates, and optionally make all properties required.
- 3 Review the schema — The generated schema appears with proper types, nested object definitions, and format annotations.
- 4 Validate your data — Use the Validate tab to test JSON data against your schema with detailed error messages.
- 5 Export the schema — Copy to clipboard or download as a .json file for use in documentation or validation libraries.
Frequently Asked Questions
What JSON Schema versions are supported?
The tool supports three versions: Draft-07 (most widely compatible), 2019-09, and 2020-12 (latest). Draft-07 works with most validators and libraries.
How does format detection work?
When enabled, the tool analyzes string values and adds format annotations for emails, URIs, dates, times, UUIDs, and IP addresses automatically.
What does "Make all required" do?
It marks every property in your sample JSON as required in the schema. Any JSON missing these properties will fail validation.
Can I validate JSON against my schema?
Yes! Use the Validate tab to test JSON against any schema. The tool shows which rules failed with property paths and error messages.