Every documentation page is available as Markdown by replacing the trailing slash of its URL with ".md" (e.g. "/guides/introduction/" becomes "/guides/introduction.md") or by requesting it with the "Accept: text/markdown" header. We also provide a machine-readable index of all Markdown resources at /llms.txt.
Enjoy the benefits of type safety and static type inference in TypeScript
📦
Small bundle size
Due to the modular design of our API the bundle size starts at less than 700 bytes
🚧
Validate everything
Supports almost any TypeScript type from primitive values to complex objects
🛟
100% test coverage
Valibot's source code is open source and fully tested with 100% coverage
🔋
Helpers included
Important validation and transformation helpers are already included
🧑💻
API with great DX
Minimal, readable and well thought out API for a great developer experience
Frequently asked questions
You don't have to! Valibot is available free of charge and licensed under the MIT License. However, we rely on partners and sponsors to fund the project. If your company would like to support us, you can take a look at our sponsor page on GitHub.
The core function of Valibot is to create a schema that describes a structured data set. A schema can be compared to a type definition in TypeScript. The big difference is that TypeScript types are "not executed" and are more or less a DX feature. A schema on the other hand, apart from the inferred type definition, can also be executed at runtime to guarantee type safety of unknown data.
Due to the modular design of our API, a bundler can use the import statements to remove the code you don't need. This way, only the code that is actually used ends up in your production build. This also allows us to add new functionality to Valibot without increasing the size for all users.
The functionality of Valibot is very similar to Zod. The biggest difference is the modular design of our API and the ability to reduce the bundle size to a minimum through tree shaking and code splitting. Depending on the schema, Valibot can reduce the bundle size up to 95% compared to Zod. Especially for client-side validation of forms and serverless environments this can be a big advantage.