Skip to content
JSON → JSON SchemaDeveloper tools

JSON Schema Generator

Make a JSON Schema from sample data. Every item of every array is used, formats are detected, and optional fields are found.

Did this tool work for you?

Used JSON Schema Generator? Share how it went to help others.

About this tool

About JSON Schema Generator

JSON Schema Generator writes a JSON Schema from sample data, so you have a good starting point for validating requests, documenting an API or checking files. Paste JSON and the schema appears as you type. The generator looks at every item of every array, not just the first. If one object has a field that another lacks, the field is left out of the required list. If a value is a number in one item and whole in another, the type becomes number; if it is text in one and null in another, both are allowed. This is why an array with several samples gives a better schema than a single one. With formats on, text is compared with common patterns, and when all samples fit, a format is added: date and time, date, time, email, UUID, URL or IPv4 address. You can choose the current version of the standard, 2020-12, or Draft 7, which many older tools still use. Other options forbid properties that are not listed, which catches typing mistakes in configuration files, and add an example value to each field, which is useful for documentation. A title can be set at the top. If the JSON is not valid you get the line and column and a hint: single quotes, a comment, or a comma before a closing bracket. A schema made from samples is a draft, because samples cannot show everything. Add limits such as a minimum or a maximum length, list allowed values with enum, and decide which properties are really required. Empty arrays give no information about their items, and dates count as a format only if every sample has the same form. You can open or drop a JSON file up to 5 MB, copy the schema or download it as a file. The data is read in your browser and is not uploaded.

JSON Schema Generator tool

What a JSON Schema is good for

Describe data once, check it everywhere

Checking requests

Reject bad data before it reaches your code.

ExampleUse the schema with a validator such as Ajv.

API documentation

Describe a response.

ExampleTurn on examples and paste it in OpenAPI.

Configuration files

Catch typing mistakes.

ExampleForbid other properties.

Editor help

Get suggestions for JSON files in an editor.

ExampleLink the schema in your settings.

Data from others

Describe what you expect from a partner.

ExampleSend the schema with the order.

AI tools

Ask a model for an exact structure.

ExampleGive the schema as the output format.

Schema tips

From draft to contract

Give several samples

Include one with missing fields and one with unusual values.

Use enum

List the allowed values of fields such as status.

Add limits

minimum, maximum, minLength and maxItems stop bad input early.

Format the JSON first

See its structure and find mistakes.

Open JSON Formatter

Have YAML?

Convert it to JSON.

Open YAML to JSON

Look at one field

See all values of a property.

Open JSONPath Tester
Built & tested by

HemantInsights

Senior Software Engineer · Developer of Toolyconvert

Hemant developed JSON Schema Generator and tests it on desktop and mobile with real files. He is a senior software engineer from Dehradun, India, building websites since 2014, and designed and developed Toolyconvert end to end.

Last updated 25 November 2026

Answers and guidanceFrequently Asked Questions
What is JSON Schema?
A standard way to describe JSON: which properties exist, their types, and the rules they must follow.
How are required fields found?
A field is required if every object in the same place has it. You can turn this off.
Which version should I use?
2020-12 for new work. Choose Draft 7 if your validator does not support it.
Why does a field have two types?
The samples had both, for example text and null.
Why is the format missing?
A format is added only if all samples of the field match it.
Can I use the schema as it is?
Check it first. Samples cannot show limits or every allowed value.
Is my JSON uploaded?
No. It is read in your browser.
More tools for your workflowRelated Tools

Featured on

Toolyconvert is listed on these product directories and launch platforms.