All tools

JSON Schema Generator

Paste sample JSON and get a Draft 7 JSON Schema with types and string formats filled in.

Browser onlyYour input is processed in this browser and is not sent to SpeedyTools servers.
Share:
Options
JSON Input
About JSON Schema

JSON Schema is a JSON format for describing other JSON documents. A schema lists the fields a document can have, their types, and the rules a validator checks them against.

People use it to validate API payloads, forms, and configuration files. Validation libraries exist for JavaScript, Python, Java, Go, and most other languages.

Features
Detects types: string, number, boolean, array, object, null
Detects string formats: email, uri, date, date-time
Marks fields as required
Outputs JSON Schema Draft 7
Common use cases

API validation

Write schemas to validate API requests and responses

Documentation

Describe a data format from a sample payload

Type generation

Feed the schema to a tool that generates TypeScript types

Data migration

Check that migrated records keep the same structure

Frequently asked questions

How does the JSON Schema generator work?

Paste your JSON and click 'Generate Schema'. The tool walks the JSON and writes a schema with the type, string format, and required fields it finds.

What JSON Schema version does this generate?

It generates JSON Schema Draft 7, which validation libraries in most languages support.

How does format detection work?

The tool matches each string against patterns for email addresses, URIs, dates, and date-time strings. A match adds the matching 'format' keyword to that property.

What is strict mode?

Strict mode adds 'additionalProperties: false' to objects, so extra fields fail validation, and 'minItems' to non-empty arrays.

Can I include example values in the schema?

Yes. Turn on 'Include Examples' and the tool copies your input values into each property's 'examples' keyword, which helps when the schema doubles as documentation.

Private by default

Schema generation runs in your browser. Your JSON is never sent to a server.