Search for a command to run...
Turn any JSON sample into a ready-to-use JSON Schema with types, formats, and required fields.
Accepts up to 200000 characters.
Controls the $schema keyword written at the root.
Inference options
Adds format only when every sampled string matches, such as email or uuid.
Marks a key required only when it appears in every merged object.
Writes additionalProperties: false on every object.
Adds an examples array with the first value seen for each scalar.
Turns repeated strings into an enum when there are 10 distinct values or fewer.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
},
"active": {
"type": "boolean"
},
"loginCount": {
"type": "integer"
},
"deletedAt": {
"type": "null"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"website": {
"type": "string",
"format": "uri"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"ratings": {
"type": "array",
"items": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"profile": {
"type": "object",
"properties": {
"birthDate": {
"type": "string",
"format": "date"
},
"timezone": {
"type": "string"
},
"lastIp": {
"type": "string",
"format": "ipv4"
}
},
"required": [
"birthDate",
"timezone",
"lastIp"
]
},
"orders": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sku": {
"type": "string"
},
"quantity": {
"type": "integer"
},
"status": {
"type": "string"
},
"total": {
"type": "number"
},
"note": {
"type": "string"
}
},
"required": [
"sku",
"quantity",
"status",
"total"
]
}
},
"labels": {
"type": "array",
"items": {}
}
},
"required": [
"id",
"name",
"email",
"active",
"loginCount",
"deletedAt",
"createdAt",
"website",
"tags",
"ratings",
"profile",
"orders",
"labels"
]
}What
JSON Schema is a vocabulary that describes the shape of JSON data so it can be validated automatically. This generator reads a sample payload and infers types, required keys, string formats, and nested structures for Draft 2020-12 or draft-07.
Cases
Bootstrap request and response validation for a REST API.
Document the payload shape of a third-party webhook.
Generate OpenAPI component schemas from real sample data.
Add contract tests that catch breaking changes in a response.
Validate configuration files in CI before a deploy runs.
Define strict argument schemas for LLM tool calls.
How To
Paste a representative JSON sample, tune the inference options, and copy the schema.
Paste a sample payload that represents the real structure into the input area.
Choose Draft 2020-12 or draft-07 so the $schema keyword matches your validator.
Toggle format detection, required keys, additionalProperties, examples, and enum.
Copy the result into your validator, OpenAPI document, or test suite.
Knowledge
FAQ