JSON KitJSON to JSON Schema

JSON to JSON Schema

Generate a JSON Schema (draft-07) from any JSON sample — for OpenAPI, validators, and database tools.

Loading editor…
Loading editor…

Related Tools

Frequently Asked Questions

What is JSON Schema?
JSON Schema is a vocabulary for annotating and validating JSON documents. It's used in OpenAPI specs, form validators, database tools like Supabase, and many API frameworks. A JSON Schema describes the shape, types, and constraints of a JSON value.
Which JSON Schema draft does this generate?
The output uses draft-06/draft-07 compatible schema (the most widely supported). It includes $schema, $ref, and definitions for nested types.
How is this different from JSON to Zod Schema?
JSON Schema is a language-agnostic standard used in OpenAPI, form libraries, and database tools. Zod is a TypeScript-specific runtime validator. Use JSON Schema when you need portability across languages or tools; use Zod when you need TypeScript-first runtime validation.
Can I use this with OpenAPI / Swagger?
Yes — JSON Schema is the basis for OpenAPI schemas. Paste the generated schema into your OpenAPI spec's components/schemas section. You may need to adjust $ref paths and remove the outer $schema wrapper.