JSON → Schema
Generate a JSON Schema (Draft-07 or 2020-12) from any JSON value, automatically and client-side.
Learn how JSON validation works →What is JSON Schema?
JSON Schema is a vocabulary for annotating and validating JSON data. A schema document describes the expected structure of a JSON value: which keys are required, what types are allowed, and how nested objects and arrays are shaped.
It is supported by validators in every major language (Ajv for JavaScript, jsonschema for Python, networknt for Go) and used in OpenAPI specs, VS Code settings, GitHub Actions, and many API platforms. Draft-07 is the most widely supported version; Draft 2020-12 is the latest stable specification.
How the inference works
The generator traverses your JSON recursively. Arrays are typed by their elements: if all items share the same structure, a single schema is inferred; mixed arrays produce {"oneOf":[...]}.
After generation: refine and validate
The generated schema is a structural starting point. To validate your JSON against it, paste both into an online validator or use a library like Ajv (npm install ajv). For API schemas, consider generating from your OpenAPI spec with tools like openapi-typescript rather than from example JSON.