Array of records
Shows missing and nullable fields separately.
Generate TypeScript and Zod schemas locally, with explicit control over inference.
Your JSON stays in this browser. The tool does not save or execute generated code.
JSON is read and processed in a worker on this device.
Generated declarations and schemas will appear here.
Load a sample to see how the same inferred model creates both outputs.
Shows missing and nullable fields separately.
Builds named types for nested objects and arrays.
Keeps different array element kinds in a union.
Review before use. Generated from examples, not a complete API contract. Values and fields that do not appear in the sample may need additional rules. Zod output is source code for you to review; this tool does not execute or validate it.
Local processing limits: 1024 KB, 50,000 JSON tokens, 64 nesting levels, and 2 million generated output characters. The analysis stops with a clear error when a limit is reached; it never silently samples part of the input.
The generator inspects each value in the sample, including every element of arrays within the documented limits. When object samples omit fields, those fields can become optional. A present null stays nullable; it does not mean the property is optional.
An empty array produces an explicit unknown[] element type, and an empty object has no inferred properties. Add representative data or refine the generated declarations and schema to fit the contract you intend to enforce.
String literal inference can overfit the sample. UTC ISO datetime recognition is opt-in. UUID, email, URL, enum, and integer-only rules are not guessed from one value. Large integers are reported because JavaScript numbers may not preserve every digit.
This tool infers TypeScript and Zod source from raw sample JSON. It does not convert JSON Schema, execute generated code, or establish a complete API contract. Review the output and test it against your own inputs before using it in production.
Strip mode uses z.object(), the default that removes unrecognized keys. Strict mode uses z.strictObject() and rejects them. Passthrough mode uses z.looseObject() and keeps them. Optional fields and null values remain separate in all three modes.
Analysis runs in a local worker, with a 1 MiB input limit, a 50,000-token limit, a nesting limit of 64, and a 10-second worker timeout. Inputs are not auto-saved or placed into links. Choose Open, Paste, Copy, or Download only when you want those explicit actions.