JSON Schema Generator
Paste a JSON payload to instantly generate JSON Schema, TypeScript interfaces, and Zod validation schemas. Detects common formats like email, URL, date-time, and UUID.
20 fields
4 nested objects
1 array
date-time
email
uri
uuid
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"data": {
"type": "object",
"properties": {
"order_id": {
"type": "string"
},
"amount": {
"type": "integer"
},
"currency": {
"type": "string"
},
"customer": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"email",
"name"
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sku": {
"type": "string"
},
"quantity": {
"type": "integer"
},
"unit_price": {
"type": "integer"
}
},
"required": [
"sku",
"quantity",
"unit_price"
]
}
},
"metadata": {
"type": "object",
"properties": {
"source": {
"type": "string",
"format": "uri"
},
"session_id": {
"type": "string",
"format": "uuid"
}
},
"required": [
"source",
"session_id"
]
}
},
"required": [
"order_id",
"amount",
"currency",
"customer",
"items",
"metadata"
]
},
"webhook_url": {
"type": "string",
"format": "uri"
},
"is_live": {
"type": "boolean"
}
},
"required": [
"id",
"type",
"created_at",
"data",
"webhook_url",
"is_live"
]
}JSON Schema
Generates a draft/2020-12 JSON Schema with type inference, required fields, nested objects, array items, and format detection for strings like email, URL, date-time, and UUID.
TypeScript
Produces typed interface declarations with proper nesting. Null values become optional fields. Array items are typed from the first element.
Zod Schema
Creates runtime-validated z.object() definitions with chainable validators for emails, URLs, UUIDs, integers, and datetime strings.
Want more? Try automatic webhook payload validation in Hookbase
Get started free with no credit card required.