Free · Private · In-Browser

JSON Schema Generator

Infer a JSON Schema from a sample.

Schema from example data

Paste a representative JSON object and this infers a JSON Schema — types, properties, and nesting — so you have a starting contract for validation without writing it by hand.

It saves the tedious first draft of a validation contract, giving you a schema to tighten — marking fields required, adding formats and enums — rather than writing every property by hand.

A starting point

Tighten required fields and formats afterward, since one sample cannot show every rule. Generation runs entirely in your browser. Your sample is analysed on your device and never uploaded.

Frequently asked questions

What does this json schema generator do?

Infer a starter JSON Schema from sample data in the browser.

Which JSON Schema version is used?

Draft 2020-12, declared in the $schema property at the top of the output.

Why is every property marked as required?

The schema is inferred from one sample, so every key present is treated as required. Remove optional keys from the required list before using it for validation.

How are arrays typed?

From the first item only. If later items have different shapes or types, edit the items schema by hand, for example using oneOf.

Take it further
Developer Tools

More free browser utilities for data cleanup, formatting, and developer workflows.

Learn more