टूल्स पर वापस जाएँ

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
}
इस टूल को शेयर करें:

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.

अक्सर पूछे जाने वाले सवाल

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.
अपडेटेड रहें

नई टूल्स सबसे पहले पाएं।

सबसे पहले नए टूल्स पाएं। 5,000+ डेवलपर्स के साथ जुड़ें जो हर हफ्ते नए ऑनलाइन टूल्स, कोडिंग टिप्स और प्रोडक्टिविटी हैक्स का डाइजेस्ट पाते हैं। बिना स्पैम के।

© 2026 TinyToolbox. सर्वाधिकार सुरक्षित।

गोपनीयता पहले। विज्ञापन-समर्थित। हमेशा मुफ्त।

[H4CK]