Valibot
Modular schema validation library with a tiny bundle size and TypeScript inference.
Overview
Valibot is an open source schema validation library for TypeScript designed with bundle size, type safety, and developer experience as core priorities. It allows you to create schemas that describe structured data and validate unknown data at runtime while maintaining full type inference.
The library uses a modular API design that enables tree-shaking and code splitting, resulting in a minimal starting bundle size of less than 700 bytes. This makes it particularly well-suited for client-side form validation and serverless environments where bundle size matters.
Key features
- Fully type safe with static type inference
- Modular API design for minimal bundle size
- 100% test coverage
- Built-in validation and transformation helpers
- Supports primitive values to complex objects
- Tree-shakeable and code-splittable
- Extremely small bundle size (starts under 700 bytes)
- Full TypeScript type safety and inference
- Modular design allows importing only needed functionality
- 100% test coverage for reliability
- Great developer experience with minimal, readable API
- Can reduce bundle size up to 95% compared to alternatives
- Smaller ecosystem compared to more established alternatives
- May require learning a new API if migrating from other schema libraries
Best for
Alternatives
More Library
Compare allData-fetching and state management library designed to handle server state in web applications.
Zero-dependency module loading environment variables from .env files into Node.js apps.
JavaScript library designed for building user interfaces with a focus on declarative syntax and efficiency.