BuildUtilities

JSON Schema Generator – Free Online Tool

Generate JSON Schema from sample JSON data. Auto-infers types, required fields, and nested objects.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "active": {
      "type": "boolean"
    },
    "scores": {
      "type": "array",
      "items": {
        "type": "integer"
      }
    },
    "address": {
      "type": "object",
      "properties": {
        "city": {
          "type": "string"
        },
        "zip": {
          "type": "string"
        }
      },
      "required": [
        "city",
        "zip"
      ]
    }
  },
  "required": [
    "id",
    "name",
    "email",
    "active",
    "scores",
    "address"
  ]
}

How to Use JSON Schema Generator

  1. 1

    Paste JSON

    Paste a sample JSON object.

  2. 2

    Generate Schema

    The schema is generated automatically with inferred types.

  3. 3

    Copy

    Copy the generated JSON Schema.

Common Use Cases

  • Creating API validation schemas
  • Documenting data structures
  • Setting up form validation

Share

Share a link to this tool. Results can be passed via URL parameters.

https://buildutilities.com/share/json-schema-generator

Frequently Asked Questions

More Data Tools

Tools for working with structured data formats like JSON, CSV, YAML, and XML.

View all Data tools
Tip Jar