idpixo

JSON to JSON Schema Generator

Paste or upload JSON to get a JSON Schema inferred from it. Nothing is uploaded — the analysis runs locally in your browser.

JSON to JSON Schema

JSON Schema is the standard way to describe the shape of JSON data — the property names, the types of their values, and the structure of arrays. Writing a schema by hand from a large sample is slow and error-prone, so this generator infers one for you: paste a representative sample and it produces $schema, type, properties and items.

How the inference works

Frequently asked questions

What does this tool do?
It reads a sample of JSON and infers a JSON Schema describing its structure — types, properties and array items — which you can copy or download.

Is my JSON uploaded?
No. Everything runs in your browser; nothing is sent to a server.

Which schema drafts are supported?
You can output draft-07 or the 2020-12 dialect, selected with the draft toggle.

How are numbers handled?
A whole number is inferred as integer and a number with a fractional part as number.

How are mixed-type arrays handled?
An array whose elements have different shapes describes its items with anyOf, so no single type is forced.

Can I mark every property required?
Yes. The “all fields required” switch adds every property name to the required array.

Related: JSON formatter, JSON to XML, XML formatter, browse every browser-only tool on the all tools page.

All tools →  JSON formatter →