What the generator infers
- Types — string, integer, number, boolean, null, object and array.
- Objects — every property, with all properties marked
required(edit afterwards for optional fields). - Arrays — item schema inferred from the first element.
- Formats — strings that look like an email, ISO date-time or URI get a
formatkeyword.
Example
Input : {"name":"URLMode","tools":90,"site":"https://urlmode.com"}
Output: { "$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": { "name": {"type":"string"}, "tools": {"type":"integer"},
"site": {"type":"string","format":"uri"} },
"required": ["name","tools","site"] }
After generating
- Remove fields from
requiredthat are optional. - Add constraints:
minLength,maximum,enum,pattern. - Merge variations if items in an array can differ (
anyOf). - Validate real data against the schema with your language's validator (Ajv for JavaScript, jsonschema for Python).
Format or validate your sample first with the JSON Formatter. Everything runs in your browser.
Frequently asked questions
How do I create a JSON Schema from JSON?
Paste a representative JSON sample. The generator outputs a draft 2020-12 schema with types, properties, required fields and formats.
Which JSON Schema version is used?
Draft 2020-12, the current version, declared in the $schema keyword.
Why is every field required?
A single sample cannot show which fields are optional. Remove optional fields from the required list after generating.
Is JSON Schema the same as schema.org?
No. JSON Schema validates data structures; schema.org structured data describes web content for search engines.

