Skip to content
Developer & CodeLocal · Stays on device

JSON Schema Generator

Infer a starter JSON Schema (draft 2020-12) from sample JSON, with types, nested objects, arrays, required keys and formats.

  • JSON, JSON Schema 2020-12
  • Free to use
  • No sign-up or watermark
json-schema-generatorOn this device
1
2
3
4
5
6
7
8
9
10
1
2
3
4
5
6
7
8
9
10
JSONJSON Schema 2020-12
Open JSON Schema Generator

About this tool

Paste one example document, or better, an array of several examples. The generator walks every value and builds a JSON Schema (draft 2020-12): objects get properties, arrays get a merged item schema, whole numbers become integer and decimals number, and values that are sometimes null become a type list such as ["null", "string"]. With format detection on, strings that consistently look like dates, emails, URIs, UUIDs or IPv4 addresses get a format keyword.

Choose how required is decided: only keys present in every example (the safest default), all keys, or none. You can also close objects with additionalProperties: false. The result is a starting point inferred from your samples, so review it before using it to validate production data. Everything runs in your browser. Your data is never uploaded, logged or stored.

  1. Input

    Your code or text

    JSON, JSON Schema 2020-12

  2. Processing

    Processed in this browser

    Instant, in-browser. Nothing is uploaded.

  3. Output

    Your result

    Ready to download or copy

Local processing pipelineCustom schema inference

How to use it

  1. 1

    Paste sample JSON (an array of several examples gives the best result).

  2. 2

    Choose the required-property strategy and other options.

  3. 3

    Review the schema, then copy or download it.

Zero-upload architecture

How to use JSON Schema Generator for free, with no upload

Free, with no sign-up or watermark · Your files stay on your device

  1. 1

    Open JSON Schema Generator

    Launch the app and add your file. There is nothing to install and no account to create.

  2. 2

    Work through it

    Choose the required-property strategy and other options.

  3. 3

    Get your result

    Review the schema, then copy or download it.

  • Local

    JSON Validator

    Check whether JSON is valid and see exactly where and why it fails, with fix suggestions.

    Open tool
  • Local

    JSON Formatter

    Pretty-print, beautify and validate JSON with precise error locations, key sorting and custom indentation.

    Open tool
  • Local

    JSON Diff Tool

    Compare two JSON documents structurally: added, removed and changed values with JSON Pointer paths, side-by-side highlights and a JSON Patch export.

    Open tool
  • Local

    JSON Studio

    Edit, validate, format and explore JSON with a code editor, tree view and table view, then convert it to CSV, YAML or TypeScript.

    Open tool