DevToolBox

JSON Schema Generator

Infer a JSON Schema (Draft-07) from a sample JSON object. Handles nested objects, arrays, required fields, enums and number ranges.

How to Use

What is JSON Schema? JSON Schema is a specification for describing the structure of JSON data. A schema can document types, required fields, enums and numeric ranges, and can be used for validation.

How to use it 1. Paste a JSON sample, such as a mock API response. 2. Click Generate Schema. 3. Review the inferred Draft-07 schema.

What is inferred - Types: object, array, string, number, integer, boolean and null - Required fields - Array item schemas and nested object properties - Enum when a field has 5 or fewer distinct values - Number minimum and maximum bounds

Tips - Empty objects and arrays are represented as an open schema. - Copy or download the generated schema as a .json file. - Use the schema to validate data or document APIs.

Privacy Schema inference runs entirely in your browser.

JSON Schema Generator — Infer Draft-07 Schema from JSON