Toolpuffin

    Loading...

    Up and down to choose, Enter to open, Esc to close.

    Paste an example of your JSON and get a JSON Schema that describes it: the keys, their types, which keys are required and the items of arrays. Choose strict mode for AI APIs that ask for every key to be required and no extra keys, then copy the result or download it as schema.json. A schema made from one example is a starting point, so check it before you use it.

    Features

    • JSON Schema draft 2020-12 from an example
    • Types, required keys, nested objects and arrays, also with mixed items
    • Recognises dates, e-mail addresses, web addresses and UUIDs
    • Strict mode: every key required and no extra keys

    How to use JSON Schema Generator

    1. Paste an example of your JSON.
    2. Choose the options, such as strict mode.
    3. Copy the schema or download it.

    Frequently asked questions

    Is the schema complete?

    No. One example cannot show which keys are optional, which numbers have a range or which texts can only have a few values. The tool makes a good starting point, and you add those rules by hand.

    What does strict mode do?

    It marks every key as required and does not allow extra keys, because some AI APIs ask for that when you want output that follows a schema. Check the documentation of the API you use, since the rules differ and change.

    How are arrays with different items handled?

    The items are combined: objects are merged and a key is only required when every object has it. If the items have different types, the schema lists the types as alternatives (anyOf).

    Is my JSON sent anywhere?

    No. The text is read in your browser and never sent anywhere. You can check this yourself: switch off your internet connection after the page has loaded and the tool still works.

    Guides

    Related tools