Generate JSON schema

Generate a draft-07 JSON schema from a JSON example.

Local processing · Nothing is uploaded · 1 MB input limit

Input & settings

Paste text or drop a UTF-8 text file
Ready. Enter your input to begin.

How to use this tool

Paste a valid JSON sample and generate a draft-07 JSON Schema. Review types, required fields and array item rules before using it to validate a larger dataset.

Limits and behavior

All observed properties are required and additional properties are disallowed. Arrays infer item alternatives; empty arrays leave items unrestricted. Review against your real data model. Maximum total input 1 MB, output 3 MB, JSON nesting 64 levels. Processing stays in your browser worker. Input is limited to 1 MB and output to 3 MB. No input content is saved by CraftAI.

Generate a starter JSON Schema from sample data

Infer a draft-07 JSON Schema based on a JSON example. This schema generator can help bootstrap input validation for structured data.

Does an example generate all possible valid combinations?

No. A sample cannot capture every acceptable value or constraint. Review and edit the generated schema for your real requirements.

Related resource: Validate JSON syntax

Sample data cannot define every allowed value

A sample {"active":true,"count":3} suggests boolean and numeric property types, but does not reveal whether another record may omit either field.

Important: The generated starter schema marks observed properties as required and disallows additional ones. Modify it to reflect the real data contract instead of treating one sample as a complete specification.

Built on Hatchable