{"slug": "zod", "name": "Zod", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "TypeScript-first schema declaration and runtime validation library with static type inference.", "recommenders": 8, "commenters": 16, "warners": 4, "score": 4.377, "rising": 1.36, "first": "2025-11-18", "latest": "2026-10-12", "why": "HN commenters use Zod for runtime validation of forms, API routes and API responses on both client and server, and as a schema source of truth shared across languages and API contracts.", "why_is_quote": false, "has_verdict": true, "sentiment": {"recommend": 8, "neutral": 3, "compare": 1, "warn": 4}, "spark": [1, 0, 1, 0, 1, 0, 0, 1, 1, 3, 0, 0], "listed": true, "loved": ["Runtime validation", "Shared schemas"], "caveat": "Compromised release", "short_quote": "Even without TS, I'd be using zod (or a similar library). I haven't had any issues with zod's bundle size", "icon": true, "domain": null, "github_repo": "github.com/colinhacks/zod", "official_url": "https://zod.dev", "pricing": "open source", "aliases": ["Zod", "zod"], "verdict": [{"text": "HN commenters use Zod for runtime validation of forms, API routes and API responses on both client and server,", "cites": [{"id": 791901104, "item_id": 49493819, "url": "https://news.ycombinator.com/item?id=49493819", "by": "Escapado", "date": "2026-08-29", "stance": "recommend", "quote": "I use it heavily for form validation on the client and the server", "excerpt": "I use it heavily for form validation on the client and the server and it plays very well drizzle in my opinion. In the past I also used it a bunch for validating responses from a product API as it was not always guaranteed that the data had the agreed shape and we could hence account for that during runtime and surface problems in a simple way.", "context": "", "use_case": "form and API response validation", "switched_from": "", "story": "Zod v4.5 adds schema compilation (3-9x faster validation)"}, {"id": 745873250, "item_id": 46617078, "url": "https://news.ycombinator.com/item?id=46617078", "by": "jaycobski", "date": "2026-01-14", "stance": "recommend", "quote": "I use Zod for strict schema validation on all API routes", "excerpt": "Thanks! This is definitely the part that kept me up at night as a non-traditional dev. My philosophy was to write as little security code as possible myself and rely on battle-tested infrastructure: Auth & User Data: I rely entirely on Supabase Auth (which is based on the GoTrue API). I don't touch password hashing or session management logic directly. Data Access: I use PostgreSQL Row Level Security (RLS) policies e", "context": "non-traditional dev", "use_case": "API input validation", "switched_from": "", "story": "Show HN: I built an OSHA compliance SaaS for oilfields using only LLMs"}, {"id": 800586481, "item_id": 50036655, "url": "https://news.ycombinator.com/item?id=50036655", "by": "davorb", "date": "2026-10-10", "stance": "neutral", "quote": "validated with zod on both ends", "excerpt": "I turned Leisure Suit Larry 1 (the 1987 Sierra AGI version) into a shared co-op game that runs in the browser. Everyone who opens the page is in the same running game. Source: https://github.com/davorb/lsl-experiment The original game logic runs unmodified on a Node server. There is an AGI bytecode interpreter in ts. Every room, puzzle and line of text is therefore the real game, not a re-creation. The server owns al", "context": "", "use_case": "protocol validation", "switched_from": "", "story": "Show HN: I made Leisure Suit Larry 1 multiplayer co-op"}]}, {"text": " and as a schema source of truth shared across languages and API contracts.", "cites": [{"id": 735614753, "item_id": 45975922, "url": "https://news.ycombinator.com/item?id=45975922", "by": "yatsyk", "date": "2025-11-18", "stance": "recommend", "quote": "I prefer to use Zod or JSON Schema as the source of truth.", "excerpt": "I prefer to use Zod or JSON Schema as the source of truth. Then I use QuickType [1] in the build process to generate code in different languages. This lets me share data structures. I mostly do this in Tauri apps to keep the same data shape in TypeScript and Rust. I also use it to define protocols, like for REST APIs. Here are the advantages of this approach compared to using guts lib: - I get validation with clear e", "context": "builds Tauri apps", "use_case": "schema source of truth", "switched_from": "", "story": "Show HN: Guts \u2013 convert Golang types to TypeScript"}, {"id": 789268243, "item_id": 49329265, "url": "https://news.ycombinator.com/item?id=49329265", "by": "PufPufPuf", "date": "2026-08-17", "stance": "recommend", "quote": "the support for JSON Schema is much better across the stacks I use, e.g. Zod in JS/TS, Pydantic in Python", "excerpt": "The promise of Protobuf/gRPC for seamless communication across tech stacks just wasn't delivered. Third party projects like Buf or BetterProto for Python try their best but it's still a nightmare trying to integrate with gRPC from something remotely modern, like Python with uv and async/await. Plus there's a lot of little pains like not being human-readable, always requiring HTTP/2 and thus HTTPS, and so on. JSON isn", "context": "", "use_case": "schema validation in TypeScript", "switched_from": "", "story": "Protobuf has LSP support. You're welcome"}, {"id": 774904544, "item_id": 48431534, "url": "https://news.ycombinator.com/item?id=48431534", "by": "nimonian", "date": "2026-06-06", "stance": "recommend", "quote": "use zod (or your language equivalent) and contract-first API development; this is my favourite bit tbh", "excerpt": "I do quite a lot of what this post describes in a reasonably large project. Here's what works for me: - write gherkin features for new features; update them for enhancements; don't touch them for refactors. Label your PRs with these nouns. - use pre-push hooks for type checks, linting, unit tests, and other quick, scriptable validations. - make a viteperess subsite in your repo, have the agents maintain it - document", "context": "works on a reasonably large project with agents", "use_case": "contract-first API validation", "switched_from": "", "story": "Harness engineering: Leveraging Codex in an agent-first world"}]}, {"text": " The main caveats are reports of suspicious code in the v4.6.6 release", "cites": [{"id": 800869536, "item_id": 50054346, "url": "https://news.ycombinator.com/item?id=50054346", "by": "Meneth", "date": "2026-10-12", "stance": "warn", "quote": "The compromised code is still tagged on Github", "excerpt": "The compromised code is still tagged on Github as of 2026-10-12T10:37:51: https://github.com/colinhacks/zod/releases/tag/v4.6.6. See commit d821685.", "context": "", "use_case": "", "switched_from": "", "story": "Zod 4.6.6 compromised by malware?"}, {"id": 800845040, "item_id": 50052815, "url": "https://news.ycombinator.com/item?id=50052815", "by": "luggage_bazooka", "date": "2026-10-12", "stance": "warn", "quote": "it's not looking great", "excerpt": "The most recent version 4.6.6 has a very interesting commit (d821685) \"Fix bugs and improve performance\", that contain the following changes https://github.com/colinhacks/zod/commit/d821685ea6732436fcdf786a81d076958471e467 I didn't study what packages/mini/meta.test.mjs is doing in particular but it's not looking great", "context": "", "use_case": "", "switched_from": "", "story": "Zod 4.6.6 compromised by malware?"}]}, {"text": " and complaints that its schema-first approach is harder to read and debug than defining types directly.", "cites": [{"id": 779723728, "item_id": 48732733, "url": "https://news.ycombinator.com/item?id=48732733", "by": "Xenoamorphous", "date": "2026-06-30", "stance": "warn", "quote": "I don't like zod. I want to define my types, not write schemas.", "excerpt": "I don't like zod. I want to define my types, not write schemas. And I don't like that then I have to use the types derived from those schemas rather than types I've defined myself directly. So I just define my types and then use typescript-json-schema or similar to build a JSON Schema at build time (i.e. from an npm script) which then I use to validate input using ajv. The only thing I do on top of that is to use ann", "context": "", "use_case": "input validation", "switched_from": "zod", "story": "Parse, Don't Validate \u2013 In a Language That Doesn't Want You To"}, {"id": 791899280, "item_id": 49493705, "url": "https://news.ycombinator.com/item?id=49493705", "by": "_the_inflator", "date": "2026-08-29", "stance": "warn", "quote": "Honestly, it made things worse for me.", "excerpt": "Serious question: how widespread and actually used in production is Zod? Honestly, it made things worse for me. JavaScript isn\u2019t a statistical typed language and TypeScript already is something, where due to compiler issues I just use \u201cany\u201d. Zod has its conventions and JavaScript ain\u2019t Java. So Zod is also hard to read and debug. It is type conversion to type conversion - bloat, not JavaScript. Even Pydantic looks ta", "context": "", "use_case": "schema validation", "switched_from": "", "story": "Zod v4.5 adds schema compilation (3-9x faster validation)"}]}], "praise": [{"label": "Runtime validation", "summary": "Used to validate forms, API routes, API responses and wire protocols at runtime on client and server.", "quotes": [{"id": 791901104, "item_id": 49493819, "url": "https://news.ycombinator.com/item?id=49493819", "by": "Escapado", "date": "2026-08-29", "stance": "recommend", "quote": "I use it heavily for form validation on the client and the server", "excerpt": "I use it heavily for form validation on the client and the server and it plays very well drizzle in my opinion. In the past I also used it a bunch for validating responses from a product API as it was not always guaranteed that the data had the agreed shape and we could hence account for that during runtime and surface problems in a simple way.", "context": "", "use_case": "form and API response validation", "switched_from": "", "story": "Zod v4.5 adds schema compilation (3-9x faster validation)"}, {"id": 745873250, "item_id": 46617078, "url": "https://news.ycombinator.com/item?id=46617078", "by": "jaycobski", "date": "2026-01-14", "stance": "recommend", "quote": "I use Zod for strict schema validation on all API routes", "excerpt": "Thanks! This is definitely the part that kept me up at night as a non-traditional dev. My philosophy was to write as little security code as possible myself and rely on battle-tested infrastructure: Auth & User Data: I rely entirely on Supabase Auth (which is based on the GoTrue API). I don't touch password hashing or session management logic directly. Data Access: I use PostgreSQL Row Level Security (RLS) policies e", "context": "non-traditional dev", "use_case": "API input validation", "switched_from": "", "story": "Show HN: I built an OSHA compliance SaaS for oilfields using only LLMs"}, {"id": 800586481, "item_id": 50036655, "url": "https://news.ycombinator.com/item?id=50036655", "by": "davorb", "date": "2026-10-10", "stance": "neutral", "quote": "validated with zod on both ends", "excerpt": "I turned Leisure Suit Larry 1 (the 1987 Sierra AGI version) into a shared co-op game that runs in the browser. Everyone who opens the page is in the same running game. Source: https://github.com/davorb/lsl-experiment The original game logic runs unmodified on a Node server. There is an AGI bytecode interpreter in ts. Every room, puzzle and line of text is therefore the real game, not a re-creation. The server owns al", "context": "", "use_case": "protocol validation", "switched_from": "", "story": "Show HN: I made Leisure Suit Larry 1 multiplayer co-op"}]}, {"label": "Shared schemas", "summary": "Serves as a single source of truth for data shapes across languages and contract-first APIs.", "quotes": [{"id": 735614753, "item_id": 45975922, "url": "https://news.ycombinator.com/item?id=45975922", "by": "yatsyk", "date": "2025-11-18", "stance": "recommend", "quote": "I prefer to use Zod or JSON Schema as the source of truth.", "excerpt": "I prefer to use Zod or JSON Schema as the source of truth. Then I use QuickType [1] in the build process to generate code in different languages. This lets me share data structures. I mostly do this in Tauri apps to keep the same data shape in TypeScript and Rust. I also use it to define protocols, like for REST APIs. Here are the advantages of this approach compared to using guts lib: - I get validation with clear e", "context": "builds Tauri apps", "use_case": "schema source of truth", "switched_from": "", "story": "Show HN: Guts \u2013 convert Golang types to TypeScript"}, {"id": 789268243, "item_id": 49329265, "url": "https://news.ycombinator.com/item?id=49329265", "by": "PufPufPuf", "date": "2026-08-17", "stance": "recommend", "quote": "the support for JSON Schema is much better across the stacks I use, e.g. Zod in JS/TS, Pydantic in Python", "excerpt": "The promise of Protobuf/gRPC for seamless communication across tech stacks just wasn't delivered. Third party projects like Buf or BetterProto for Python try their best but it's still a nightmare trying to integrate with gRPC from something remotely modern, like Python with uv and async/await. Plus there's a lot of little pains like not being human-readable, always requiring HTTP/2 and thus HTTPS, and so on. JSON isn", "context": "", "use_case": "schema validation in TypeScript", "switched_from": "", "story": "Protobuf has LSP support. You're welcome"}, {"id": 774904544, "item_id": 48431534, "url": "https://news.ycombinator.com/item?id=48431534", "by": "nimonian", "date": "2026-06-06", "stance": "recommend", "quote": "use zod (or your language equivalent) and contract-first API development; this is my favourite bit tbh", "excerpt": "I do quite a lot of what this post describes in a reasonably large project. Here's what works for me: - write gherkin features for new features; update them for enhancements; don't touch them for refactors. Label your PRs with these nouns. - use pre-push hooks for type checks, linting, unit tests, and other quick, scriptable validations. - make a viteperess subsite in your repo, have the agents maintain it - document", "context": "works on a reasonably large project with agents", "use_case": "contract-first API validation", "switched_from": "", "story": "Harness engineering: Leveraging Codex in an agent-first world"}]}, {"label": "Ecosystem fit", "summary": "Commenters pair it with Drizzle, Django Ninja with InertiaJS and Vue, and the postgres library.", "quotes": [{"id": 791901104, "item_id": 49493819, "url": "https://news.ycombinator.com/item?id=49493819", "by": "Escapado", "date": "2026-08-29", "stance": "recommend", "quote": "I use it heavily for form validation on the client and the server", "excerpt": "I use it heavily for form validation on the client and the server and it plays very well drizzle in my opinion. In the past I also used it a bunch for validating responses from a product API as it was not always guaranteed that the data had the agreed shape and we could hence account for that during runtime and surface problems in a simple way.", "context": "", "use_case": "form and API response validation", "switched_from": "", "story": "Zod v4.5 adds schema compilation (3-9x faster validation)"}, {"id": 788432241, "item_id": 49277015, "url": "https://news.ycombinator.com/item?id=49277015", "by": "aitchnyu", "date": "2026-08-12", "stance": "recommend", "quote": "I use Django Ninja, Zod, InertiaJS+Vue", "excerpt": "I like the Vue/React/Svelte model of the DOM being a function of the data. For example, in a shopping cart, I add two chocolates, the number against the chocolate, the count at top and a banner encouraging me to reach X total all center around a data structure. I use Django Ninja, Zod, InertiaJS+Vue and its as easy as using Django's templating engine, but static typing ensures my view doesnt emit unrepresentable data", "context": "", "use_case": "schema validation", "switched_from": "", "story": "HTML over WebSockets: real-time SPAs with barely any JavaScript"}, {"id": 752879937, "item_id": 47054996, "url": "https://news.ycombinator.com/item?id=47054996", "by": "afidrya", "date": "2026-02-17", "stance": "neutral", "quote": "I use it with Zod", "excerpt": "Is there a way to make this work with https://github.com/porsager/postgres ? It's very close to raw SQL but with safe substitutions. I use it with Zod, but it would be great to have the types derived automatically.", "context": "", "use_case": "validation", "switched_from": "", "story": "Show HN: Pg-typesafe \u2013 Strongly typed queries for PostgreSQL and TypeScript"}]}, {"label": "API design", "summary": "Its API design is credited as influential enough for other libraries to replicate.", "quotes": [{"id": 758982609, "item_id": 47436413, "url": "https://news.ycombinator.com/item?id=47436413", "by": "retep_kram", "date": "2026-03-19", "stance": "recommend", "quote": "the hard work that the original designers of libraries like FastAPI, Zod, Pydantic, have invested", "excerpt": "One of those instances of AI-generated code replicating another library's API, using a more low-level language for the core implementation. I love the idea of using new low-level languages and making libraries faster. But I wonder if there is a better way to recognize and value the hard work that the original designers of libraries like FastAPI, Zod, Pydantic, have invested in to make those libraries. Without the API", "context": "", "use_case": "schema validation", "switched_from": "", "story": "FastAPI-compatible Python framework with Zig HTTP core; 7x faster"}]}, {"label": "Bundle size", "summary": "One commenter reports no issues with its bundle size and would use it even without TypeScript.", "quotes": [{"id": 781613856, "item_id": 48850866, "url": "https://news.ycombinator.com/item?id=48850866", "by": "Timon3", "date": "2026-07-09", "stance": "recommend", "quote": "Even without TS, I'd be using zod (or a similar library). I haven't had any issues with zod's bundle size", "excerpt": "You say that as if inexperienced devs would naturally drift towards doing data validation without TS, but that hasn't been my experience. Instead what I used to see were lots of unnecessary/repeated checks spread throughout most source files (and which frequently didn't catch the actually problematic cases), which I've seen much less frequently in TS projects. Even without TS, I'd be using zod (or a similar library).", "context": "", "use_case": "data validation", "switched_from": "", "story": "TypeScript 7"}]}], "caveats": [{"label": "Compromised release", "summary": "Commenters flagged a suspicious commit in v4.6.6 and said the compromised code was still tagged on GitHub.", "quotes": [{"id": 800869536, "item_id": 50054346, "url": "https://news.ycombinator.com/item?id=50054346", "by": "Meneth", "date": "2026-10-12", "stance": "warn", "quote": "The compromised code is still tagged on Github", "excerpt": "The compromised code is still tagged on Github as of 2026-10-12T10:37:51: https://github.com/colinhacks/zod/releases/tag/v4.6.6. See commit d821685.", "context": "", "use_case": "", "switched_from": "", "story": "Zod 4.6.6 compromised by malware?"}, {"id": 800845040, "item_id": 50052815, "url": "https://news.ycombinator.com/item?id=50052815", "by": "luggage_bazooka", "date": "2026-10-12", "stance": "warn", "quote": "it's not looking great", "excerpt": "The most recent version 4.6.6 has a very interesting commit (d821685) \"Fix bugs and improve performance\", that contain the following changes https://github.com/colinhacks/zod/commit/d821685ea6732436fcdf786a81d076958471e467 I didn't study what packages/mini/meta.test.mjs is doing in particular but it's not looking great", "context": "", "use_case": "", "switched_from": "", "story": "Zod 4.6.6 compromised by malware?"}]}, {"label": "Schema-first types", "summary": "Some dislike writing schemas and using derived types, and find it hard to read and debug.", "quotes": [{"id": 779723728, "item_id": 48732733, "url": "https://news.ycombinator.com/item?id=48732733", "by": "Xenoamorphous", "date": "2026-06-30", "stance": "warn", "quote": "I don't like zod. I want to define my types, not write schemas.", "excerpt": "I don't like zod. I want to define my types, not write schemas. And I don't like that then I have to use the types derived from those schemas rather than types I've defined myself directly. So I just define my types and then use typescript-json-schema or similar to build a JSON Schema at build time (i.e. from an npm script) which then I use to validate input using ajv. The only thing I do on top of that is to use ann", "context": "", "use_case": "input validation", "switched_from": "zod", "story": "Parse, Don't Validate \u2013 In a Language That Doesn't Want You To"}, {"id": 791899280, "item_id": 49493705, "url": "https://news.ycombinator.com/item?id=49493705", "by": "_the_inflator", "date": "2026-08-29", "stance": "warn", "quote": "Honestly, it made things worse for me.", "excerpt": "Serious question: how widespread and actually used in production is Zod? Honestly, it made things worse for me. JavaScript isn\u2019t a statistical typed language and TypeScript already is something, where due to compiler issues I just use \u201cany\u201d. Zod has its conventions and JavaScript ain\u2019t Java. So Zod is also hard to read and debug. It is type conversion to type conversion - bloat, not JavaScript. Even Pydantic looks ta", "context": "", "use_case": "schema validation", "switched_from": "", "story": "Zod v4.5 adds schema compilation (3-9x faster validation)"}]}, {"label": "Runtime speed", "summary": "A build-time compiler project reports 2-74x faster parsing than standard Zod.", "quotes": [{"id": 785127186, "item_id": 49070449, "url": "https://news.ycombinator.com/item?id=49070449", "by": "gajus", "date": "2026-07-27", "stance": "neutral", "quote": "The plugin swaps Zod with compiled parse.", "excerpt": "Excellent problem space. Related problem: Using AI to write compilers that optimize runtime code. I did this for Zod. https://github.com/gajus/zod-compiler Zod schemas, compiled at build time into raw boolean chains. 2-74x faster. No code changes. The plugin swaps Zod with compiled parse. I wrote almost none of the optimizations. Claude did, in a loop, over 100+ iterations. It works because the compiled version can b", "context": "", "use_case": "schema validation", "switched_from": "", "story": "Scriptc by Vercel: TypeScript-to-Native compiler, no JavaScript engine in binary"}]}, {"label": "Limited expressiveness", "summary": "One commenter says their TypeScript schema typing goes far beyond what Zod can express.", "quotes": [{"id": 800063378, "item_id": 50003961, "url": "https://news.ycombinator.com/item?id=50003961", "by": "Benjamin_Dobell", "date": "2026-10-08", "stance": "compare", "quote": "We're going far beyond what's capable with Zod or ArkType.", "excerpt": "It's extremely useful if your distribution platform is the web. However, I find it much more valuable as a type checker than a compiler. I use TypeScript extensively (in several projects) for defining schemas types. For example, in the Breaka Club (https://breaka.club/) editor, which is not presently exposed to kids yet, we define behaviors for characters, props, mosaics (terrain tiles) and items in JSON. But the JSO", "context": "", "use_case": "schema validation", "switched_from": "", "story": "Port of the TypeScript compiler, checker and lsp to Rust, by LLM"}]}], "who": [{"by": "nimonian", "context": "works on a reasonably large project with agents", "url": "https://news.ycombinator.com/item?id=48431534", "date": "2026-06-06"}, {"by": "jaycobski", "context": "non-traditional dev", "url": "https://news.ycombinator.com/item?id=46617078", "date": "2026-01-14"}, {"by": "yatsyk", "context": "builds Tauri apps", "url": "https://news.ycombinator.com/item?id=45975922", "date": "2025-11-18"}], "tags": ["for TypeScript devs", "for API validation", "for full-stack apps", "for cross-language schemas"], "use_cases": ["schema validation", "protocol validation", "form and api response validation", "schema validation in typescript", "data validation", "input validation"], "compared": [{"slug": "pydantic", "name": "Pydantic", "co": 3, "switched_from": 0, "switched_to": 0}], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=50052814", "title": "Zod 4.6.6 compromised by malware?", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=49493018", "title": "Zod v4.5 adds schema compilation (3-9x faster validation)", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=50036653", "title": "Show HN: I made Leisure Suit Larry 1 multiplayer co-op", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=50000676", "title": "Port of the TypeScript compiler, checker and lsp to Rust, by LLM", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=49322573", "title": "Protobuf has LSP support. You're welcome", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=49275335", "title": "HTML over WebSockets: real-time SPAs with barely any JavaScript", "mentions": 1}], "sentiment_by_month": {"2025-11": {"recommend": 1}, "2025-12": {}, "2026-01": {"recommend": 1}, "2026-02": {"neutral": 1}, "2026-03": {"recommend": 1}, "2026-04": {}, "2026-05": {}, "2026-06": {"recommend": 1, "warn": 1}, "2026-07": {"recommend": 1, "neutral": 1}, "2026-08": {"recommend": 3, "warn": 1}, "2026-09": {}, "2026-10": {"compare": 1, "neutral": 1, "warn": 2}}, "quotes": [{"id": 800869536, "item_id": 50054346, "url": "https://news.ycombinator.com/item?id=50054346", "by": "Meneth", "date": "2026-10-12", "stance": "warn", "quote": "The compromised code is still tagged on Github", "excerpt": "The compromised code is still tagged on Github as of 2026-10-12T10:37:51: https://github.com/colinhacks/zod/releases/tag/v4.6.6. See commit d821685.", "context": "", "use_case": "", "switched_from": "", "story": "Zod 4.6.6 compromised by malware?"}, {"id": 800845040, "item_id": 50052815, "url": "https://news.ycombinator.com/item?id=50052815", "by": "luggage_bazooka", "date": "2026-10-12", "stance": "warn", "quote": "it's not looking great", "excerpt": "The most recent version 4.6.6 has a very interesting commit (d821685) \"Fix bugs and improve performance\", that contain the following changes https://github.com/colinhacks/zod/commit/d821685ea6732436fcdf786a81d076958471e467 I didn't study what packages/mini/meta.test.mjs is doing in particular but it's not looking great", "context": "", "use_case": "", "switched_from": "", "story": "Zod 4.6.6 compromised by malware?"}, {"id": 800586481, "item_id": 50036655, "url": "https://news.ycombinator.com/item?id=50036655", "by": "davorb", "date": "2026-10-10", "stance": "neutral", "quote": "validated with zod on both ends", "excerpt": "I turned Leisure Suit Larry 1 (the 1987 Sierra AGI version) into a shared co-op game that runs in the browser. Everyone who opens the page is in the same running game. Source: https://github.com/davorb/lsl-experiment The original game logic runs unmodified on a Node server. There is an AGI bytecode interpreter in ts. Every room, puzzle and line of text is therefore the real game, not a re-creation. The server owns al", "context": "", "use_case": "protocol validation", "switched_from": "", "story": "Show HN: I made Leisure Suit Larry 1 multiplayer co-op"}, {"id": 800063378, "item_id": 50003961, "url": "https://news.ycombinator.com/item?id=50003961", "by": "Benjamin_Dobell", "date": "2026-10-08", "stance": "compare", "quote": "We're going far beyond what's capable with Zod or ArkType.", "excerpt": "It's extremely useful if your distribution platform is the web. However, I find it much more valuable as a type checker than a compiler. I use TypeScript extensively (in several projects) for defining schemas types. For example, in the Breaka Club (https://breaka.club/) editor, which is not presently exposed to kids yet, we define behaviors for characters, props, mosaics (terrain tiles) and items in JSON. But the JSO", "context": "", "use_case": "schema validation", "switched_from": "", "story": "Port of the TypeScript compiler, checker and lsp to Rust, by LLM"}, {"id": 791901104, "item_id": 49493819, "url": "https://news.ycombinator.com/item?id=49493819", "by": "Escapado", "date": "2026-08-29", "stance": "recommend", "quote": "I use it heavily for form validation on the client and the server", "excerpt": "I use it heavily for form validation on the client and the server and it plays very well drizzle in my opinion. In the past I also used it a bunch for validating responses from a product API as it was not always guaranteed that the data had the agreed shape and we could hence account for that during runtime and surface problems in a simple way.", "context": "", "use_case": "form and API response validation", "switched_from": "", "story": "Zod v4.5 adds schema compilation (3-9x faster validation)"}, {"id": 791899280, "item_id": 49493705, "url": "https://news.ycombinator.com/item?id=49493705", "by": "_the_inflator", "date": "2026-08-29", "stance": "warn", "quote": "Honestly, it made things worse for me.", "excerpt": "Serious question: how widespread and actually used in production is Zod? Honestly, it made things worse for me. JavaScript isn\u2019t a statistical typed language and TypeScript already is something, where due to compiler issues I just use \u201cany\u201d. Zod has its conventions and JavaScript ain\u2019t Java. So Zod is also hard to read and debug. It is type conversion to type conversion - bloat, not JavaScript. Even Pydantic looks ta", "context": "", "use_case": "schema validation", "switched_from": "", "story": "Zod v4.5 adds schema compilation (3-9x faster validation)"}, {"id": 789268243, "item_id": 49329265, "url": "https://news.ycombinator.com/item?id=49329265", "by": "PufPufPuf", "date": "2026-08-17", "stance": "recommend", "quote": "the support for JSON Schema is much better across the stacks I use, e.g. Zod in JS/TS, Pydantic in Python", "excerpt": "The promise of Protobuf/gRPC for seamless communication across tech stacks just wasn't delivered. Third party projects like Buf or BetterProto for Python try their best but it's still a nightmare trying to integrate with gRPC from something remotely modern, like Python with uv and async/await. Plus there's a lot of little pains like not being human-readable, always requiring HTTP/2 and thus HTTPS, and so on. JSON isn", "context": "", "use_case": "schema validation in TypeScript", "switched_from": "", "story": "Protobuf has LSP support. You're welcome"}, {"id": 788432241, "item_id": 49277015, "url": "https://news.ycombinator.com/item?id=49277015", "by": "aitchnyu", "date": "2026-08-12", "stance": "recommend", "quote": "I use Django Ninja, Zod, InertiaJS+Vue", "excerpt": "I like the Vue/React/Svelte model of the DOM being a function of the data. For example, in a shopping cart, I add two chocolates, the number against the chocolate, the count at top and a banner encouraging me to reach X total all center around a data structure. I use Django Ninja, Zod, InertiaJS+Vue and its as easy as using Django's templating engine, but static typing ensures my view doesnt emit unrepresentable data", "context": "", "use_case": "schema validation", "switched_from": "", "story": "HTML over WebSockets: real-time SPAs with barely any JavaScript"}, {"id": 785127186, "item_id": 49070449, "url": "https://news.ycombinator.com/item?id=49070449", "by": "gajus", "date": "2026-07-27", "stance": "neutral", "quote": "The plugin swaps Zod with compiled parse.", "excerpt": "Excellent problem space. Related problem: Using AI to write compilers that optimize runtime code. I did this for Zod. https://github.com/gajus/zod-compiler Zod schemas, compiled at build time into raw boolean chains. 2-74x faster. No code changes. The plugin swaps Zod with compiled parse. I wrote almost none of the optimizations. Claude did, in a loop, over 100+ iterations. It works because the compiled version can b", "context": "", "use_case": "schema validation", "switched_from": "", "story": "Scriptc by Vercel: TypeScript-to-Native compiler, no JavaScript engine in binary"}, {"id": 781613856, "item_id": 48850866, "url": "https://news.ycombinator.com/item?id=48850866", "by": "Timon3", "date": "2026-07-09", "stance": "recommend", "quote": "Even without TS, I'd be using zod (or a similar library). I haven't had any issues with zod's bundle size", "excerpt": "You say that as if inexperienced devs would naturally drift towards doing data validation without TS, but that hasn't been my experience. Instead what I used to see were lots of unnecessary/repeated checks spread throughout most source files (and which frequently didn't catch the actually problematic cases), which I've seen much less frequently in TS projects. Even without TS, I'd be using zod (or a similar library).", "context": "", "use_case": "data validation", "switched_from": "", "story": "TypeScript 7"}, {"id": 779723728, "item_id": 48732733, "url": "https://news.ycombinator.com/item?id=48732733", "by": "Xenoamorphous", "date": "2026-06-30", "stance": "warn", "quote": "I don't like zod. I want to define my types, not write schemas.", "excerpt": "I don't like zod. I want to define my types, not write schemas. And I don't like that then I have to use the types derived from those schemas rather than types I've defined myself directly. So I just define my types and then use typescript-json-schema or similar to build a JSON Schema at build time (i.e. from an npm script) which then I use to validate input using ajv. The only thing I do on top of that is to use ann", "context": "", "use_case": "input validation", "switched_from": "zod", "story": "Parse, Don't Validate \u2013 In a Language That Doesn't Want You To"}, {"id": 774904544, "item_id": 48431534, "url": "https://news.ycombinator.com/item?id=48431534", "by": "nimonian", "date": "2026-06-06", "stance": "recommend", "quote": "use zod (or your language equivalent) and contract-first API development; this is my favourite bit tbh", "excerpt": "I do quite a lot of what this post describes in a reasonably large project. Here's what works for me: - write gherkin features for new features; update them for enhancements; don't touch them for refactors. Label your PRs with these nouns. - use pre-push hooks for type checks, linting, unit tests, and other quick, scriptable validations. - make a viteperess subsite in your repo, have the agents maintain it - document", "context": "works on a reasonably large project with agents", "use_case": "contract-first API validation", "switched_from": "", "story": "Harness engineering: Leveraging Codex in an agent-first world"}, {"id": 758982609, "item_id": 47436413, "url": "https://news.ycombinator.com/item?id=47436413", "by": "retep_kram", "date": "2026-03-19", "stance": "recommend", "quote": "the hard work that the original designers of libraries like FastAPI, Zod, Pydantic, have invested", "excerpt": "One of those instances of AI-generated code replicating another library's API, using a more low-level language for the core implementation. I love the idea of using new low-level languages and making libraries faster. But I wonder if there is a better way to recognize and value the hard work that the original designers of libraries like FastAPI, Zod, Pydantic, have invested in to make those libraries. Without the API", "context": "", "use_case": "schema validation", "switched_from": "", "story": "FastAPI-compatible Python framework with Zig HTTP core; 7x faster"}, {"id": 752879937, "item_id": 47054996, "url": "https://news.ycombinator.com/item?id=47054996", "by": "afidrya", "date": "2026-02-17", "stance": "neutral", "quote": "I use it with Zod", "excerpt": "Is there a way to make this work with https://github.com/porsager/postgres ? It's very close to raw SQL but with safe substitutions. I use it with Zod, but it would be great to have the types derived automatically.", "context": "", "use_case": "validation", "switched_from": "", "story": "Show HN: Pg-typesafe \u2013 Strongly typed queries for PostgreSQL and TypeScript"}, {"id": 745873250, "item_id": 46617078, "url": "https://news.ycombinator.com/item?id=46617078", "by": "jaycobski", "date": "2026-01-14", "stance": "recommend", "quote": "I use Zod for strict schema validation on all API routes", "excerpt": "Thanks! This is definitely the part that kept me up at night as a non-traditional dev. My philosophy was to write as little security code as possible myself and rely on battle-tested infrastructure: Auth & User Data: I rely entirely on Supabase Auth (which is based on the GoTrue API). I don't touch password hashing or session management logic directly. Data Access: I use PostgreSQL Row Level Security (RLS) policies e", "context": "non-traditional dev", "use_case": "API input validation", "switched_from": "", "story": "Show HN: I built an OSHA compliance SaaS for oilfields using only LLMs"}, {"id": 735614753, "item_id": 45975922, "url": "https://news.ycombinator.com/item?id=45975922", "by": "yatsyk", "date": "2025-11-18", "stance": "recommend", "quote": "I prefer to use Zod or JSON Schema as the source of truth.", "excerpt": "I prefer to use Zod or JSON Schema as the source of truth. Then I use QuickType [1] in the build process to generate code in different languages. This lets me share data structures. I mostly do this in Tauri apps to keep the same data shape in TypeScript and Rust. I also use it to define protocols, like for REST APIs. Here are the advantages of this approach compared to using guts lib: - I get validation with clear e", "context": "builds Tauri apps", "use_case": "schema source of truth", "switched_from": "", "story": "Show HN: Guts \u2013 convert Golang types to TypeScript"}]}