Dev.to
6/24/2026

I ran one API response through two JSON-to-Zod converters. One silently turned every field into z.string().
Short summary
This post compares json-to-zod with TypeMorph, revealing that basic converters infer only primitive types (email, uuid, timestamp all become z.string()), while smart tools detect actual formats. The key insight: false validation confidence is worse than no schema at all.
- •Basic JSON-to-Zod converters turn meaningful fields into bare z.string() regardless of actual type (email, uuid, url, datetime)
- •Advanced tools like TypeMorph detect format from values and produce z.email(), z.uuid(), z.url(), z.iso.datetime()
- •False validation confidence is worse than no validation—understand each tool's inference limits before shipping schemas
Generated with AI, which can make mistakes.
Is this a good recommendation for you?


