How to use it
- 1Paste your JSON or drop a file onto the input panel.
- 2Adjust the options — the result updates as you type.
- 3Copy the Zod schema or download it. Drop several files to convert a batch into one ZIP.
What the schema includes
Strings that are consistently emails, URLs, UUIDs or ISO datetimes get the matching validator (z.string().email(), .url(), .uuid(), .datetime()). Whole numbers become z.number().int().
Keys missing from some array elements are .optional(), values that are sometimes null are .nullable(), and a z.infer type is exported alongside the schema so you only define the shape once.
Questions
Which Zod version is the output for?
The generated code uses APIs available in both Zod 3 and Zod 4.