JSON Schema Generator

Turn representative JSON data into an editable Draft 2020-12 schema with inferred types, object properties, arrays, and required fields.

The generator avoids restrictive guesses such as enums, ranges, and closed objects. Review and edit the result before using it to validate production data, especially when the sample contains only one record.

How to generate a JSON Schema

  1. Paste a JSON object or a non-empty array of objects into the input box.
  2. Choose whether to infer common string formats, then click Generate Schema.
  3. Review and edit the generated schema, then copy or download it.

JSON Schema Generator FAQ

How are required properties inferred?

A field is required when it appears in every sampled object. With a single object, every field in that sample is required because there is no evidence that it is optional.

How are null and mixed value types handled?

When samples contain both null and another value type, the generated type includes null. Mixed values in arrays are also combined into a type list instead of being forced into one type.

Which string formats can be detected?

When format inference is enabled, consistently matching strings can be marked as date, date-time, time, UUID, email, IPv4, or URI. The generator omits the format when samples disagree or are ambiguous.

What kind of sample JSON can I use?

Use a JSON object or a non-empty array containing only objects. An array of object samples is useful for finding shared required fields. Empty nested arrays remain open because they contain no item examples.

Is my sample JSON uploaded?

No. The sample is parsed and the schema is generated in this browser tab by this tool. Your JSON is not uploaded to a server.

Related tools: JSON Schema Validator · JSON Formatter

Code Formatters

Code Formatter and Code Beautifier tools for Python, JSON and other languages.

More tools

JSON & Data Tools

Compare JSON, validate schemas, and convert JSON to CSV or YAML.

More tools

Spreadsheet Tools

View CSV and Excel files, format tables, or convert CSV to Excel and SQL.

Markdown Tools

Write in Markdown Editor and convert Markdown to HTML or plain text.

Text Tools

Compare text, count words, sort lines, and find or replace text.

Audio Conversion & Playback

Convert audio, play sound or PCM files, and edit audio metadata.

Audio Editing & Effects

Edit, join or split audio, remove noise, and adjust speed, pitch or volume.

More tools

Speech Tools

Generate AI speech from text, transcribe recordings, or record your voice.

Video Tools

Convert and compress video, trim clips, or resize frames.

More tools

Video Playback & Recording

Play video, record your screen or camera, or use Online Mirror.

PDF Tools

Merge PDF, split pages, compress files, and convert PDF to images.

More tools

Image Tools

Convert images, resize photos, compress files, and extract text with OCR.

More tools

Image Creation

Create GIFs, text images, screenshots, word clouds and favicons.

Subtitle Tools

Edit subtitles, convert SRT to VTT, and adjust subtitle timestamps.

Archive Tools

Extract archives, create ZIP files, and compress folders.

Encoders | Decoders

Encode or decode Base64, escape URLs, and work with HTML or Unicode escapes.

More tools

Number Tools

Convert number bases, turn numbers into words, and work with binary or hex.

Calculators

Use percentage, fraction and statistics calculators for everyday calculations.

Time Tools

Check Online Clock, use Stopwatch, or calculate date differences.

Network Tools

Find your IP address, test IPv6, and calculate CIDR ranges.

Unit Conversions

Convert units of length, weight, temperature and data storage.

Color Tools

Convert colors, pick a palette from an image, and check color contrast.

QR Codes & Barcodes

Create or read QR codes and barcodes, including Wi-Fi QR codes.

Developer & Security Tools

Generate hashes, passwords and UUIDs, test regular expressions, and work with code utilities.

More tools

Utility Tools

Check screen size, measure with a screen ruler, test your keyboard, or use a teleprompter.

Games

Take a break with Smash Golden Eggs.