SpeedDrain
Draft-07 & 2020-12 · Format Detection · Validation Ready

JSON Schema Generator

Convert sample JSON payloads into robust, standardized JSON Schema contracts for API validation, OpenAPI documentation, and Ajv form validation.

Title:
Draft:
Presets:
JSON Schema (Draft-07)
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "UserSchema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "age": {
      "type": "integer"
    },
    "isActive": {
      "type": "boolean"
    },
    "registeredAt": {
      "type": "string",
      "format": "date-time"
    },
    "website": {
      "type": "string",
      "format": "uri"
    },
    "roles": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "settings": {
      "type": "object",
      "properties": {
        "theme": {
          "type": "string"
        },
        "notifications": {
          "type": "boolean"
        }
      },
      "required": [
        "theme",
        "notifications"
      ]
    }
  },
  "required": [
    "id",
    "name",
    "email",
    "age",
    "isActive",
    "registeredAt",
    "website",
    "roles",
    "settings"
  ]
}

JSON Schema Architecture & Use Cases

What Is JSON Schema and Why Is It Used?

JSON Schema is an IETF standard that specifies the allowable structure, constraints, and data types of JSON documents. It acts as an automated contract between client applications and backend APIs.

Using JSON Schema enables high-speed automated validation via engines like Ajv in Node.js, generates dynamic web forms with react-json-schema-form, and powers Swagger / OpenAPI 3 specifications.

Format Keywords & Type Strictness

In addition to primitive types (string, integer, boolean), JSON Schema supports the format keyword for semantic validation.

  • date-time: Validates RFC 3339 timestamps (e.g., 2024-03-15T09:30:00Z).
  • email: Verifies RFC 5322 standard email address formats.
  • uuid: Enforces 36-character hexadecimal GUID identifiers.