# JSON Schema Generator

Canonical: https://dev.eneawork.it/json-schema
Language: en
Updated: 2026-11-02
Author: Enea Zani (https://eneawork.it)

Infer a JSON Schema 2020-12 document from a sample.

## What it does

Writing JSON Schema by hand is repetitive and easy to desynchronise from the payload. Paste a representative sample and this tool infers types, properties, required keys and array item schemas. Treat the result as a starting point: one sample cannot describe every valid variant.

## How to use

1. Paste a representative JSON sample.
2. Set the root title and choose strict objects if needed.
3. Copy or download the generated schema.

## FAQ

### Which JSON Schema version is generated?

Draft 2020-12. The $schema field is included at the root.

### What does “strict objects” change?

It sets additionalProperties to false on every object, so unknown keys fail validation.

### How are mixed arrays handled?

Different item shapes are collected in an anyOf list; identical shapes are merged.

## Related tools

- [JSON to TypeScript](https://dev.eneawork.it/json-to-typescript)
- [JSON Formatter](https://dev.eneawork.it/json-formatter)
- [JSON Diff](https://dev.eneawork.it/json-diff)

## Machine-readable

- Tool catalogue: https://dev.eneawork.it/tools.json
- Full AI context: https://dev.eneawork.it/llms-full.txt
- Privacy: https://dev.eneawork.it/privacy
- This page in HTML: https://dev.eneawork.it/json-schema
- Italian version: https://dev.eneawork.it/it/json-schema
