Skip to content
DevTools

JSON Schema Generator from Sample JSON

Generate a JSON Schema (draft 2020-12 or draft-07) from sample JSON. Detects required properties, integer vs number, and formats like email, date-time, uri and uuid.

Input

Output

Ready

Runs locally in your browser — your data is never uploaded.

About the JSON Schema Generator

Generate a JSON Schema from an example document instead of writing it by hand. The generator infers types for every property, distinguishes integer from number, merges all items of an array, marks properties present in every item as required and detects common string formats: date-time, date, email, uri and uuid.

Choose draft 2020-12 (the current standard, used by OpenAPI 3.1) or draft-07 for older validators.

How to use it

  1. Paste a representative JSON sample.
  2. Choose the schema draft.
  3. Copy the schema and refine it — add descriptions, enums or limits.

Features

  • Draft 2020-12 and draft-07
  • Required properties from all array items
  • Format detection
  • Mixed types become type arrays

Frequently asked questions

Which validators can use the schema?

Any standards-compliant validator, such as Ajv (JavaScript), jsonschema (Python) or NJsonSchema (.NET).

Is the inferred schema complete?

It reflects your sample. Add constraints the data can't show — minimum and maximum, enums, patterns and descriptions — before using it in production.

Is my data uploaded anywhere?

No. All processing happens in JavaScript inside your browser tab. Your input is never sent to a server, logged or stored, so it is safe to use with internal or sensitive data.