Home
Watchdroid
Mail Blackhole
JSON Formatter
JSON Viewer
JSON Compare
JSON Repair
JSON Escape & Unescape
JSONPath Tester
JSON Converter
JSON to JSON Schema
JSON to Code
JSON to TypeScript
JSON to Zod Schema
JSON Schema to Code
JSON Flatten & Unflatten
OpenAPI & Swagger Validator
blackdroid.dev

JSON to JSON Schema

Generate a JSON Schema (draft 2020-12) from example JSON online for free. Types, required fields and nesting inferred automatically.

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

About JSON to JSON Schema

Paste an example JSON document to generate a JSON Schema (draft 2020-12): types, required fields and nested objects are inferred automatically.

Useful for API contract definitions and validation setup. The schema is generated locally — your data never leaves the browser.