Colin McDonnell 💎 Zod
banner
colinhacks.com
Colin McDonnell 💎 Zod
@colinhacks.com
💎 Creator of Zod, tRPC (v0)
🔮 OSS Fellow @ Clerk
🦆 Friendly neighborhood TypeScript nerd
🧑🏼‍💻 Prev @ Bun, EdgeDB, YC, MIT
Codecs is useful when mapping data between two different domains. for instance, when converting data in your Node.js backend from a rich JavaScript representation (Dates, BigInts, Maps, Sets, etc) into a JSON-serializable format (ISO datetimes, arrays, etc)
August 26, 2025 at 12:44 AM
these methods are intended for use cases involving data *conversion*, not *validation* (though they do that too). so if you pass in an input of an unexpected type, you'll get a TypeScript error.
August 26, 2025 at 12:44 AM
"how does .decode() differ from .parse()?"

good question! they're identical at runtime, but their type signatures differ in an important way.

unlike .parse()—which accepts `unknown` input—decode and encode expect strongly-typed inputs
August 26, 2025 at 12:44 AM
It is coupled with the addition of new methods (available on all Zod schemas)

.decode() — "forward" parsing
.encode() — "reverse" parsing
August 26, 2025 at 12:44 AM
Introducing Zod 4.1 and its flagship feature: codecs.

z.codec() is a new API for defining *bi-directional transformations* in Zod
August 26, 2025 at 12:44 AM
in the absence of an existing convention, I'm adding these three fields to Zod's package.json.

making this stuff auto-discoverable would resolve one of the biggest usability issues with today's agents/IDEs. a simple convention here will go a long way! 🤘
July 29, 2025 at 8:45 AM
Zod 4 stable will be released this Monday, May 19th!
May 15, 2025 at 6:16 PM
huge thanks to @clerk.com for supporting my work on Zod 4! they've been an amazing partner through the much-longer-than-expected development process 🫶
April 10, 2025 at 3:23 PM
if I may be so bold, I'd like to propose some much-needed nomenclature
February 25, 2025 at 7:48 AM
i'm trying out a new OSS funding experiment—a "featured" sponsor slot at the top of the Zod README

✓ features are week-to-week (~140k impressions)
✓ simple auction-based pricing (per-week or standing bids accepted)
✓ artwork subject to approval

DM/email me if your company is interested! 🤙
February 24, 2025 at 12:55 AM
who suggested this and why weren't they fired immediately
February 8, 2025 at 10:10 PM
star count for Standard Schema—pretty successful launch, i'd say 🤩
February 4, 2025 at 8:53 PM
Incredibly proud to be a part of an ecosystem as friendly and open as TypeScript's. It’s been a joy working together with my "competitors" to make something that can hopefully benefit the whole ecosystem 🤩
January 27, 2025 at 4:24 PM
A lot of frameworks and tools already accept Standard Schemas! Huge shoutout to the early adopters: tRPC, Tanstack Form, Tanstack Router, UploadThing and t3-env, OpenAuth, Renoun, and more

🙏 @jayair.bsky.social @katt.dev @chorobin.bsky.social @jumr.dev @souporserious.com @awad.dev @unnoq.com
January 27, 2025 at 4:24 PM
This is a condensed version of the Standard Schema spec that does a good job of conveying how it works.

Given a spec-compliant validator you can:



a) validate data with it (duh)
b) retrieve validation errors in a standardized format
c) extract its inferred input & output types
January 27, 2025 at 4:24 PM
Standard Schema is a specification (a TypeScript interface in fact) not a library.

It was designed collaboratively by myself (creator of Zod 👋), @fabianhiller.com (creator of Valibot), and @ssalbdivad.dev (creator of ArkType).

It’s the final form of something I tweeted nearly two years ago.
January 27, 2025 at 4:24 PM
been building a website for the last 3 days. meticulously crafted UI. 100 lighthouse score. sent it to my non-software friend for feedback.

her response changed my life
January 27, 2025 at 1:21 AM
ah this works
January 27, 2025 at 1:19 AM
what loving god would allow this
January 21, 2025 at 9:59 PM
hello here's a list of every pokemon name that still available on npm
January 14, 2025 at 9:28 PM
A simple general purpose memoizer utility for TypeScript

- lazily computes a value when accessed
- autocaches the result
- typesafe

i use this all the time...unlike a naive getter there's no runtime overhead after the first invokation since the getter itself is overwritten with the memoized value
December 6, 2024 at 10:20 AM
December 5, 2024 at 6:33 PM
lawnmower theory of commerce

bsky.app/profile/tiny...
December 5, 2024 at 4:25 AM
WHOA. this is insane, @sanity.io.
December 4, 2024 at 9:26 PM
don't mention classes on twitter
December 4, 2024 at 2:59 AM