JSON to JSON Schema Converter
Paste a JSON sample to instantly generate a matching JSON Schema (draft-07) document with types, nested objects, and required fields. Free online developer tool.
Paste JSON
JSON Schema (draft-07)
A JSON Schema document will appear here...
Free JSON to JSON Schema Converter
Paste a JSON sample to instantly generate a matching JSON Schema (draft-07) document describing its structure, types, and required fields.
How to Use It
Paste any JSON object or array, or click "Load Example." The tool infers a type shape and builds a schema with "type", "properties", and a"required" array listing every key present in all samples. Nested objects are described inline (not via $ref) so the schema is a single self-contained document, arrays get an "items" schema, and any field that was ever null gets the array form "type": ["string", "null"].
Example
Given {"name": "Ann", "age": 30, "tags": ["a","b"], "address": {"city": "NYC", "zip": null}}, the address property becomes an inline object schema whose zip property is typed "null", while tags becomes{ "type": "array", "items": { "type": "string" } }.
Common Use Cases
- Generating a starting schema for validating API payloads with Ajv or another JSON Schema validator.
- Documenting an API's expected request or response shape.
- Feeding a schema into code generators, form builders, or OpenAPI tooling that consume JSON Schema.
FAQs
Why draft-07 instead of a newer JSON Schema version?
Draft-07 remains the most widely supported version across validators and tooling (including Ajv and many OpenAPI-adjacent tools), so it's the safest default for a generated schema meant to be broadly compatible.
Are nested objects defined with $ref?
No — to keep the output simple and self-contained, nested objects are described inline as nested schema objects rather than extracted into $defs/definitions and referenced with $ref.
Is my JSON uploaded anywhere?
No — parsing and schema generation happen entirely client-side in your browser. Nothing you paste is sent to a server.
