JSON Schema Generator

Infer Draft-07 JSON Schema from sample data

JSON Schema Draft-07

JSON Sample

Generated Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "MySchema",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "name": {
      "type": "string",
      "minLength": 0
    },
    "email": {
      "type": "string",
      "format": "email",
      "minLength": 0
    },
    "age": {
      "type": "integer"
    },
    "active": {
      "type": "boolean"
    },
    "score": {
      "type": "number"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 0
      }
    },
    "address": {
      "type": "object",
      "properties": {
        "street": {
          "type": "string",
          "minLength": 0
        },
        "city": {
          "type": "string",
          "minLength": 0
        },
        "postalCode": {
          "type": "string",
          "minLength": 0
        }
      },
      "required": [
        "street",
        "city",
        "postalCode"
      ]
    },
    "metadata": {
      "type": [
        "string",
        "number",
        "boolean",
        "object",
        "array",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "name",
    "email",
    "age",
    "active",
    "score",
    "tags",
    "address"
  ]
}