JSON Schema Generator

Paste a JSON document and get a JSON Schema that describes it. Use the schema for API validation, OpenAPI specs or editor autocompletion.

Example

Input
{
  "name": "parsebox",
  "version": "2.1.0",
  "private": false,
  "maintainers": [
    { "name": "Ada Lovelace", "email": "[email protected]", "active": true },
    { "name": "Alan Turing", "email": "[email protected]", "active": false }
  ],
  "build": {
    "target": "es2022",
    "minify": true,
    "port": 5173
  }
}
Output
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Root",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "private": {
      "type": "boolean"
    },
    "maintainers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Maintainer"
      }
    },
    "build": {
      "$ref": "#/$defs/Build"
    }
  },
  "required": [
    "name",
    "version",
    "private",
    "maintainers",
    "build"
  ],
  "$defs": {
    "Maintainer": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "active": {
          "type": "boolean"
        }
      },
      "required": [
        "name",
        "email",
        "active"
      ]
    },
    "Build": {
      "type": "object",
      "properties": {
        "target": {
          "type": "string"
        },
        "minify": {
          "type": "boolean"
        },
        "port": {
          "type": "integer"
        }
      },
      "required": [
        "target",
        "minify",
        "port"
      ]
    }
  }
}

Private by design

ParseBox runs entirely in your browser. Your text is never uploaded, logged or stored on a server, so it is safe to paste API responses, tokens and config files.

Related conversions

All 30 formats in ParseBox →