JSON Schema Generator

Paste a sample JSON object or array to generate a starting-point JSON Schema with inferred types and required fields.

Sample JSON

Inferred JSON Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "active": {
      "type": "boolean"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "address": {
      "type": "object",
      "properties": {
        "city": {
          "type": "string"
        },
        "zip": {
          "type": "string"
        }
      },
      "required": [
        "city",
        "zip"
      ]
    }
  },
  "required": [
    "id",
    "name",
    "active",
    "tags",
    "address"
  ]
}

Infers types and required fields from your sample data — it's a starting point, not a complete schema. It won't infer constraints like min/max, patterns, or enums that aren't visible in one example.

Example input

{"name": "Ada", "age": 30}

Example output

{"type": "object", "properties": {...}}