How to use this tool
- Paste JSON or load a file or public CORS HTTPS URL.
- Generate JSON Schema.
- Review before copying or validating.
Infer types, required keys, and array items; then review.
Generate a Draft 2020-12 JSON Schema from sample JSON with inferred types, required keys, and array items.
Infer types, required keys, and array items; then review.
{
"users": [
{"id": 1, "name": "Ada"},
{"id": 2, "active": true}
],
"values": [1, "two", null, true],
"metadata": {
"createdAt": "2026-08-18T08:00:00Z",
"page": 1
}
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"metadata": {
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"page": {
"type": "integer"
}
},
"required": [
"createdAt",
"page"
]
},
"users": {
"type": "array",
"items": {
"type": "object",
"properties": {
"active": {
"type": "boolean"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
},
"required": [
"id"
]
}
},
"values": {
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "integer"
},
{
"type": "null"
},
{
"type": "string"
}
]
}
}
},
"required": [
"metadata",
"users",
"values"
]
}Object: all keys required. Object array: shared keys only.
Empty: items: {}. Mixed: anyOf. Integer + decimal: number. Object-array fields merge.
No. Add formats, ranges, patterns, and business rules.
Use JSON Schema Validator on valid and invalid samples (local Draft 2020-12 subset).
Paste and files stay in-browser. URL import makes your browser request the entered public HTTPS address.