Zurück zu den Tools

JSON Schema Generator

Data

Generate draft 2020-12 JSON Schema documents from sample JSON.

ttb run json-schema-generator
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "TinyToolboxSchema",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "email": {
      "type": "string"
    },
    "active": {
      "type": "boolean"
    },
    "roles": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "profile": {
      "type": "object",
      "properties": {
        "displayName": {
          "type": "string"
        },
        "age": {
          "type": "integer"
        }
      },
      "required": [
        "displayName",
        "age"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "id",
    "email",
    "active",
    "roles",
    "profile"
  ],
  "additionalProperties": false
}
Dieses Tool teilen:

So verwendest du JSON Schema Generator

Paste a representative JSON document and the tool generates a draft 2020-12 JSON Schema in real time. Arrays infer item schemas, nested objects become nested property maps, integer vs number is preserved, and required keys are inferred from the sample document you provide.

1

Paste sample JSON

Use a real payload or config file sample that reflects the structure you want to validate.

2

Review the schema

Check the generated object, array item definitions, and required fields to confirm they match your expectations.

3

Copy into your stack

Copy the schema and drop it into Ajv, OpenAPI tooling, validation docs, or internal contracts.

Häufig gestellte Fragen

Does one sample capture every possible shape?+
No. Like any inferred schema generator, the result is only as complete as the sample JSON you provide, so edge-case variants may require manual edits.
What draft does it target?+
The generated document includes the JSON Schema draft 2020-12 $schema URL for modern validator compatibility.
Bleiben Sie Auf Dem Laufenden

Neue Tools erhalten, bevor es alle anderen tun.

Erhalten Sie neue Tools vor allen anderen. Schließen Sie sich über 5.000 Entwicklern an, die unseren wöchentlichen Überblick über neue Online-Tools, Coding-Tipps und Produktivitäts-Hacks erhalten. Kein Spam, niemals.

© 2026 TinyToolbox. Alle Rechte vorbehalten.

Datenschutz zuerst. Werbefinanziert. Immer kostenlos.

[H4CK]