Valibot is a schema validation library for TypeScript that validates structural data at runtime with full type safety and minimal bundle size.
The tool solves the problem of validating unknown data in JavaScript environments while maintaining type safety. TypeScript's type system exists only at compile time and cannot validate runtime data, so Valibot provides executable schemas that enforce type guarantees on incoming information. It works by letting developers define schemas as descriptions of structured data, then executing those schemas at runtime to parse and validate values. The library includes transformation and validation actions and offers multiple parsing modes: exception-based parsing, non-exception-based safeParse, and type guard functions.
Valibot suits projects where bundle size matters and where you need runtime validation of strings, objects, forms, configuration files, or server data. Its modular architecture, built from many small single-purpose functions rather than large multi-method objects, enables tree-shaking to remove unused code from production builds. This design reduces bundle size significantly compared to alternatives like Zod. The tool has no dependencies and runs in any JavaScript environment. Developers migrating from Zod will find migration guides and comparison articles available.
The project maintains comprehensive test coverage and has well-structured source code. Development is supported by multiple partners contributing to sustainability. The tool was created as part of a bachelor thesis and benefits from influence by established schema validation library designers.