Step 1
Paste a JSON sample
Add a representative object, array, webhook payload, API response, or config example.
Free developer schema tool
A JSON Schema generator turns sample JSON into a validation schema for APIs, docs, tests, and config files. Paste a representative payload, tune required fields, then copy or download a draft 2020-12 schema without uploading data.
Sample JSON
Draft 2020-12
object schema with 13 properties and 13 required fields.
Root type
object
Properties
13
Required
13
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Webhook Event",
"description": "Generated from a sample JSON payload for Webhook Event.",
"type": "object",
"properties": {
"id": {
"type": "string",
"examples": [
"evt_1024"
]
},
"type": {
"type": "string",
"examples": [
"invoice.paid"
]
},
"livemode": {
"type": "boolean",
"examples": [
false
]
},
"created": {
"type": "string",
"format": "date-time",
"examples": [
"2026-06-23T12:35:00Z"
]
},
"customer": {
"type": "object",
"properties": {
"id": {
"type": "string",
"examples": [
"cus_2048"
]
},
"email": {
"type": "string",
"format": "email",
"examples": [
"ada@example.com"
]
},
"plan": {
"type": "string",
"examples": [
"pro"
]
}
},
"additionalProperties": false,
"required": [
"id",
"email",
"plan"
]
},
"amount_due": {
"type": "integer",
"examples": [
4900
]
},
"tags": {
"type": "array",
"items": {
"type": "string",
"examples": [
"billing"
]
},
"examples": [
[
"billing",
"webhook"
]
]
},
"metadata": {
"type": "object",
"properties": {
"source": {
"type": "string",
"examples": [
"api"
]
},
"attempts": {
"type": "integer",
"examples": [
1
]
}
},
"additionalProperties": false,
"required": [
"source",
"attempts"
]
}
},
"additionalProperties": false,
"required": [
"id",
"type",
"livemode",
"created",
"customer",
"amount_due",
"tags",
"metadata"
]
}Workflow
Step 1
Add a representative object, array, webhook payload, API response, or config example.
Step 2
Set the title, required-field behavior, additionalProperties preference, and example values.
Step 3
Check nested properties, arrays, string formats, and required fields in the generated schema.
Step 4
Copy the schema or download it as a .schema.json file for validators, docs, and tests.
FAQ
A JSON Schema generator reads sample JSON and creates a validation schema that documents object properties, data types, required fields, and nested structures.
No. The schema is generated in your browser, so pasted API payloads are not uploaded to Code Card by this tool.
The output uses JSON Schema draft 2020-12 and includes the $schema field so validators can detect the expected dialect.
Yes. The generator walks nested objects and arrays, merges object keys across array items, and creates nested properties and items schemas.
Yes. Generated schemas are a strong starting point, but you should review business rules such as minimum values, enums, patterns, and custom constraints.
Code Card
Code Card turns AI coding activity from Claude Code, Codex, and OpenClaw into public developer profiles with contribution graphs, badges, and usage breakdowns.
Related tools