Generate a JSON Schema from a sample — draft 2020-12, for validators and OpenAPI documents. Your file never leaves this page. Everything happens in your browser, and there is no upload endpoint to send it to — that is checked by a build gate that fails if any network code reaches a tool’s bundle.
How to do it
- Paste a sample of your JSON.
- Give the schema a title.
- Press Copy.
Questions
What can a sample not tell you?
Three things, and each is marked rather than guessed at. A field that is null in your sample might always be null or might sometimes hold a value. An empty list says nothing about what goes in it. And a single object cannot show which fields are optional — though an array of several can, and that is used.
How does it know a field is optional?
From evidence. Give it an array of records where one lacks a field, and that field is marked optional, because it is genuinely present in some and absent in others.
Is my JSON uploaded?
No. The whole thing runs in your browser.
Which draft is it?
2020-12, declared in the $schema key, which is what current validators and OpenAPI 3.1 expect.

