Paste a JSON document and get a JSON Schema (Draft-07) for it in one click, then copy or download it. Switch to Validate mode to check JSON against any schema and see exactly which fields fail. It all runs in your browser, so your data stays private.
JSON Schema is a standard way to describe the shape of JSON: which properties exist, what type each one has, which are required, and what values are allowed. Teams use it to validate API requests and responses, check configuration files, document data contracts and generate forms and code. A longer introduction is in What is JSON Schema and why it matters.
{
"id": 1,
"name": "Alice",
"tags": ["admin"],
"address": { "city": "New York" }
}produces:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "GeneratedSchema",
"type": "object",
"properties": {
"id": { "type": "number" },
"name": { "type": "string" },
"tags": { "type": "array", "items": { "type": "string" } },
"address": {
"type": "object",
"properties": { "city": { "type": "string" } },
"required": ["city"]
}
},
"required": ["id", "name", "tags", "address"]
}string, number, boolean, null, object and array. Whole numbers and decimals both become number.additionalProperties. They can't be known from one sample, so add the ones you need by hand.After generating, the most useful edits are:
| Keyword | What it does | Example |
|---|---|---|
required | Lists properties that must be present. Remove optional ones. | "required": ["id", "name"] |
format | Checks a string format: email, uri, date, date-time, uuid. | "format": "email" |
enum | Allows only listed values. | "enum": ["admin", "user"] |
minimum / maximum | Number range. | "minimum": 0 |
minLength / pattern | String length and regex. | "minLength": 3 |
additionalProperties | Reject unknown fields with false. | "additionalProperties": false |
uniqueItems | No duplicate array items. | "uniqueItems": true |
In Validate mode, paste the schema and the JSON and you get a list of errors with the path to each one, such as a missing required property, a wrong type, a number out of range or a string that fails its format. For full Draft-07 support including $ref, oneOf, anyOf and allOf, use the JSON Schema Validator, which is powered by Ajv.
Generate typed code from the same JSON with JSON to TypeScript, JSON to Java or JSON to Go. Compare two payloads with JSON Diff, fix broken input with JSON Repair, or query data with JSONPath.
JSON Schema is a declarative language for validating, annotating, and manipulating JSON documents. It defines the structure, data types, and constraints that your JSON data must follow, enabling automatic validation and documentation.
JSON Schema validates data before processing, catches errors early, documents API contracts, and enables intelligent tooling. It's essential for APIs, configuration files, and data pipelines to ensure data consistency and quality.
Paste your JSON data and the generator analyzes its structure to create a schema. It infers data types, identifies required fields, and detects nested objects and arrays, producing a Draft-07 schema you can refine further.