Data Format

JSON Schema Generator

Infer a JSON Schema from a sample JSON document, with draft selection and required policies.

Your data stays on your deviceNo upload, no serverWorks offline

Max depth

Total properties

Status

Why use this tool

01

Paste a JSON sample and get a draft-2020-12 or draft-07 schema with detected string formats, merged array items, and configurable required handling.

JSON Schema Generator infers a schema from a sample JSON document so you can validate future payloads, generate TypeScript, or document APIs.

It merges array element schemas, detects common string formats (date-time, email, uri, uuid), and supports draft 2020-12 and draft-07.

How to use

02
01Paste a representative JSON sample (object or array of objects).
02Pick the schema draft and the required-field policy.
03Copy the generated schema from the output panel.

Quick checks before you copy

03

Confirm the input is the format you intended.

Scan the result before using it in a document, URL, config, or message.

Copy only the output you need.

Tips & Tricks

  1. 01
    Validate before copying

    If the input parser reports an error, fix the source value first instead of copying a partial result into code, config, or documentation.

  2. 02
    Keep secrets local

    The tool runs in your browser, but you should still avoid pasting long-lived production secrets into any shared or screen-recorded session.

FAQ

04
What does the smart required policy do?

For arrays, every element schema is merged and only the keys present in every element stay required. For single objects it behaves like 'all required'.

Does it detect string formats?

Yes. Date, date-time, email, uri, and uuid formats are inferred from sample values.

Is my JSON sent anywhere?

No. Inference runs entirely in this tab.

Related tools

03

JSON ↔ YAML Converter

Convert between JSON and YAML using the standard js-yaml library — both directions, configurable indent, safe-by-default.

JSON Schema Generator — Infer a JSON Schema from … | TOOLGRID