Generate a Zod schema from a JSON sample, with the TypeScript type inferred from the schema rather than written out twice. 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 name.
- 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.
Why infer the type instead of writing it?
So the schema and the type cannot drift apart. Written separately, they eventually disagree, and the one that is wrong is the one nobody checks.

