Skip to main content
Utilz Utilz

JSON Schema Generator

Generate JSON Schema from sample JSON data

Want to learn more? Read our guide: JSON Schema & Validation Guide

Why Use This Tool?

  • Automatically infer JSON Schema from sample data.
  • Supports both Draft-07 and 2020-12 specifications.
  • Detects types, required fields, and array item schemas.

How to Use

  1. Paste sample JSON data into the input area
  2. Select the JSON Schema draft version (Draft-07 or 2020-12)
  3. The generated schema appears instantly on the right
  4. Copy the schema for use in your project

FAQ

What is JSON Schema?

JSON Schema is a vocabulary for annotating and validating JSON documents. It defines the structure, types, and constraints of JSON data.

Which draft versions are supported?

This tool supports JSON Schema Draft-07 and the newer 2020-12 specification. The main difference is the schema URI.

Does it detect required fields?

Yes. Fields with non-null, non-undefined values in your sample data are marked as required in the generated schema.

How are arrays handled?

Array item schemas are inferred from the first element of the array. Empty arrays produce an empty items schema.

Related Tools

HTML Formatter

Format and beautify HTML

CSS Formatter

Format and beautify CSS

JavaScript Formatter

Format and beautify JavaScript

Fuel Cost Calculator

Calculate fuel costs for trips

Area Converter

Convert between area units