Diese Seite ist noch nicht auf Deutsch verfügbar, daher zeigen wir die englische Version.

JSON to JSON Schema Generator — Infer a Schema from JSON

Paste one or more JSON examples and get a JSON Schema that describes them: nested objects, arrays of objects merged into one item schema, required fields (keys present in every example), detected formats like email, date-time, URI and UUID, optional enums, and draft 2020-12 or draft-07 output. Refine it, then validate data with it or turn it into TypeScript.

Aktualisiert am
JSON Schema

Deine Daten verlassen nie deinen Computer. Die Verarbeitung erfolgt zu 100 % lokal im Browser.

So nutzt du: JSON to JSON Schema

  1. Paste a JSON example — an API response, a config file, a database record — or click Sample.
  2. For better results paste several examples as a JSON array: fields missing from some become optional, and different types become a union.
  3. Choose the draft, how required is decided, and whether to detect formats, build enums, forbid extra properties or keep examples.
  4. Copy or download the schema — or send it straight to the JSON Schema to TypeScript converter or the validator.

How the schema is inferred

  • Types: strings, numbers, integers (whole numbers), booleans, null, objects and arrays. A field that is sometimes a number and sometimes null becomes "type": ["number", "null"].
  • Arrays: every item is merged into one items schema, so an array of user objects gets one user schema with all keys seen.
  • Required: by default a key is required only if it appears in every object of that shape. With one example, all keys are required.
  • Formats: strings that all look like an email, URI, UUID, date, date-time, time, IPv4 or IPv6 get a format.
  • Enums: a string field with a few repeating values across many examples (like status) becomes an enum.

An inferred schema describes your examples, not your intent — review it: tighten strings with minLength or pattern, add minimum/maximum to numbers and decide which fields are truly optional. Then check data against it with the JSON Schema Validator or generate types with JSON Schema to TypeScript.

Auch gesucht als: json schema generator, generate json schema from json, infer json schema, json schema from example, create json schema online, json schema draft 2020-12, json to schema.

Passende Tools zu: JSON to JSON Schema

  • JSON to TypeScript — Paste a JSON sample — an API response, a config — and get ready-to-use TypeScript interfaces with nested types, optional properties and union types.
  • JSON Formatierer — Füge JSON ein, um es zu formatieren, zu minifizieren oder zu prüfen.
  • OpenAPI / Swagger Validator — Paste an API specification to check it against the official OpenAPI schema, catch broken references and inconsistent path parameters, and see every endpoint at a glance.
  • Generator für Scheindaten — Erstelle bis zu 10.000 Zeilen realistischer Testdaten – Nutzer, Produkte, Bestellungen, Adressen, Unternehmen oder verschachtelte API-Datensätze – oder erstelle dein eigenes Schema.

Häufige Fragen

How do I generate a JSON Schema from JSON?
Paste the JSON here: the generator walks every value, writes the matching type, properties and items, marks keys as required and detects formats. Paste several examples in an array for a more accurate result.
Which JSON Schema draft should I use?
Draft 2020-12 is the current version and what OpenAPI 3.1 uses. Choose draft-07 for older tools and libraries that don’t support 2020-12 yet.
Why is a field not marked as required?
It was missing from at least one of your examples. Change “Required fields” to “Every key” if every field must always be present.
Can I turn the schema into TypeScript types?
Yes — click To TypeScript to open the schema in the JSON Schema to TypeScript converter.
Kann ich JSON to JSON Schema als Web-App installieren und offline nutzen?
Ja. JSON to JSON Schema ist eine installierbare Web-App (PWA) – sie wird über Ihren Browser installiert und nicht aus einem App-Store heruntergeladen. Klicken Sie oben auf dieser Seite in Chrome oder Edge (Windows, macOS, Linux, ChromeOS) auf „App installieren“ oder verwenden Sie auf Android-Geräten „Teilen“ → „Zum Startbildschirm hinzufügen“ auf dem iPhone und iPad bzw. „Datei“ → „Zum Dock hinzufügen“ in Safari 17+ auf einem Mac. Die App öffnet sich dann in einem eigenen Fenster mit einem eigenen Symbol, und da sie vollständig in Ihrem Browser ausgeführt wird, funktioniert sie auch offline. Firefox auf dem Desktop kann keine Web-Apps installieren. So funktioniert die Installation.

Ähnliche Tools