Free online tools to generate, calculate,
convert, format, encode, and play.
 

JSON Schema Generator

Paste a JSON sample below and generate a matching JSON Schema; types, required fields, string formats, and numeric bounds are inferred automatically. The result is fully editable, so you can refine it before copying or downloading.


How It Works

The generator walks your JSON sample and builds a schema that describes its shape; everything runs locally in your browser using the built-in JSON.parse() parser, so your data is never uploaded.

  • Type inference: each value is mapped to a JSON Schema type — string, number or integer, boolean, null, array, or object.
  • Required fields: keys that appear in an object sample are listed under required; uncheck the option to make every field optional.
  • Array items: the schemas of all elements are merged into a single items definition, so arrays of similar objects collapse to one shape; differing types are combined with type arrays.
  • Format detection: string values are tested against common patterns — email, date, date-time, uri, uuid, and ipv4 — and annotated with a format keyword.
  • Constraints: optionally add minLength/maxLength for strings and minimum/maximum for numbers, derived from the sample values.

The output textarea is a live editor; tweak descriptions, loosen constraints, or add your own keywords, then copy or download the finished .schema.json file. Choose the draft that matches your tooling — Draft-07 is the most widely supported, while Draft 2020-12 is the current standard.

Privacy

All processing is client-side; nothing you paste is sent to a server, and closing the tab discards everything.


Embed This Util

You can embed this util on your own site as a widget. Adding ?embed=1 to the URL loads a compact version with just the tool itself; no header, menu, or documentation. Paste this snippet into your HTML:


    

Copy snippet Adjust the height to taste.



Feedback

Help us improve this page by providing feedback, and include your name/email if you want us to reach back. Thank you in advance.


Share with