Developer

JSON Schema Generator

Infer JSON Schema draft-07 from sample JSON data.

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

Related Tools

More free utilities you might find useful

Frequently Asked Questions

Quick answers to common questions

Which schema draft?+

Draft-07 with $schema declaration.

How are types inferred?+

From actual values: string, number, integer, boolean, null, array, object.

Array items?+

Schema for array items is merged from all elements in the sample.

Production use?+

Good starting point. Review and refine schemas for strict validation.