JSON Schema Generator
Create JSON Schema from sample JSON data.
1
Upload
2
Configure
3
Convert
4
Download
Create JSON Schema from sample JSON data.
Choose a file to get started
Drag and drop a supported file here, or press Enter to browse your device.
Related tools
Ready tools are shown first.
Tool guide
Free Online JSON Schema Generator
Generate a draft 2020-12 JSON Schema from sample JSON in your browser. The tool maps the sample's objects, arrays, and primitive values into a readable starter schema that you can copy, download, and refine.
Steps
How it works
- Paste JSON or choose one JSON or plain-text file.
- Parse the sample and infer a schema from its observed values.
- Review the generated properties, required fields, and array item schema.
- Copy or download the JSON Schema output.
Highlights
Key features
- Declares the JSON Schema draft 2020-12 metaschema.
- Builds nested properties for sample objects.
- Marks every property present in a sample object as required.
- Infers array items from the first array value.
- Recognizes object, array, string, number, boolean, and null values using JSON runtime types.
- Accepts pasted input or one uploaded JSON or text file.
Use cases
Common uses
- Create a starter schema for an API payload.
- Document the observed structure of example JSON.
- Draft validation rules before refining them manually.
- Inspect nested sample data as a schema hierarchy.
Notes
Limitations to know
- The schema reflects one sample and cannot discover optional fields or values that are absent.
- Every observed object property is marked required.
- Only the first array item determines the item schema; empty arrays receive an unspecified item schema.
- Formats, enums, numeric constraints, titles, descriptions, and additionalProperties rules are not inferred.
- The generated schema should be reviewed before it is used for production validation.
FAQ
Frequently asked questions
Which JSON Schema draft does the generator use?
The output declares https://json-schema.org/draft/2020-12/schema.
How are required properties chosen?
All properties found in each sample object are listed as required.
Are nested objects and arrays supported?
Yes, although an array's item schema is inferred only from its first value.
Does the tool infer email, URI, or date-time formats?
No. Strings remain strings, and format rules must be added manually.
Should I review the generated JSON Schema?
Yes. One sample cannot define every valid type, optional field, constraint, or edge case.