Zod Express Middleware

JSON →
library 1.4.0 ·javascript maintenance
verified May 27, 2026

`zod-express-middleware` is an Express.js middleware library designed to enforce type safety and validate incoming request data (body, query, and parameters) using Zod schemas. Currently at version 1.4.0, it provides functions like `validateRequest` to check if an incoming request conforms to predefined Zod schemas without modifying the request object. For scenarios requiring data transformation or stripping unknown keys, it offers `processRequest` and its specific variants (`processRequestBody`, `processRequestQuery`, `processRequestParams`), which leverage Zod's `.transform` and `.refine` methods. The package maintains a steady release cadence, integrating smoothly with `express` and `zod` as peer dependencies. Its primary differentiator is the direct integration of Zod's powerful, inferential schema validation capabilities into the Express middleware pipeline, providing a robust solution for ensuring API contract adherence and improving developer experience through strong typing.

total hits 19
actors 8 distinct systems
last hit 1d ago human
GPTBot
5
MetaBot
4
Script
1
Search engines
2
Humans
2

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇪🇸 Spain · 🇨🇦 Canada · 🇫🇷 France