JSON Schema Generator

Generate a JSON Schema from any JSON sample, with draft selection, required keys and format detection.

Paste a JSON sample above to generate its JSON Schema.

No uploads. Your files stay on your device.

Free forever, no sign-up, no cookies. Buy me a coffee

How it works

Paste any JSON sample โ€” an API response, a config file, a database record โ€” and the tool walks the whole structure and infers a matching JSON Schema instantly. Objects become properties, arrays get an items schema merged from every element, whole numbers become integer and decimals become number. Strings can be checked against common patterns so an address like ada@example.com gets "format": "email", and ISO timestamps get "format": "date-time".

Choose Draft 2020-12, Draft-07 or Draft-04 for the $schema keyword, give the schema a title, decide whether every key should be listed under required, and optionally embed the sample values as examples. When an array mixes types the generator merges the element schemas instead of guessing from the first item.

Everything runs in your browser with the native JSON.parse โ€” nothing is uploaded, so it is safe for production payloads, tokens and customer data. Copy the schema or download it as a .json file to drop straight into Ajv, OpenAPI or your test suite.

Frequently asked questions

How do I create a JSON Schema from a JSON example?

Paste your JSON sample into the box. The generator walks the whole structure and writes a matching schema straight away: objects become properties, arrays get an items schema, whole numbers become integer and decimals become number. Then copy the schema or download it as a .json file.

Which JSON Schema drafts are supported?

Draft 2020-12, Draft-07 and Draft-04. Pick one from the dropdown and the $schema keyword is set to the matching URI, so the output drops straight into Ajv, OpenAPI tooling or your test suite.

Is my JSON uploaded anywhere?

No. The whole tool runs in your browser with the native JSON.parse function. Nothing is sent to a server, there are no ads and no sign-up, so it is safe for production API responses, tokens and customer data.

Report a bug