# open-circle/valibot

> Valibot is a modular, type-safe schema library for validating and parsing structural data in TypeScript environments.

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/open-circle-valibot).**

8,444 stars · 305 forks · TypeScript · mit

## Links

- GitHub: https://github.com/open-circle/valibot
- Homepage: https://valibot.dev
- awesome-repositories: https://awesome-repositories.com/repository/open-circle-valibot.md

## Topics

`bundle-size` `modular` `parsing` `runtime` `schema` `type-safe` `typescript` `validation`

## Description

Valibot is a TypeScript schema validation library used to define type-safe data structures and verify runtime input. It provides a system for creating runtime type guards and data transformation pipelines that automatically infer static TypeScript types from runtime schema definitions.

The library is built on a modular, function-based architecture designed to minimize bundle size through tree-shaking. It includes specialized tools for converting internal schemas into the JSON Schema format and supports a pipeline-based approach to normalize and transform input data.

Its validation capabilities cover a broad surface including primitive constraints, numeric range limits, and complex types such as discriminated unions and recursive structures. It also provides extensive string format validation for standards like emails, URLs, and various cryptographic hashes, alongside support for asynchronous checks and cross-field validation logic.

The framework further supports developer workflows through validation message localization, result caching, and integration with frontend form libraries and environment configuration files.

## Tags

### Software Engineering & Architecture

- [Data Validation Schemas](https://awesome-repositories.com/f/software-engineering-architecture/data-validation-schemas.md) — Provides a comprehensive system for defining type-safe data structures and validation rules. ([source](https://valibot.dev/guides/mental-model.md))
- [Schema-Driven Type Inference](https://awesome-repositories.com/f/software-engineering-architecture/typescript-type-definitions/schema-driven-type-inference.md) — Automatically generates TypeScript static types by analyzing runtime schema definitions.
- [Array Schema Validation](https://awesome-repositories.com/f/software-engineering-architecture/array-schema-validation.md) — Ensures values are arrays and validates each individual element against a defined schema. ([source](https://valibot.dev/api/array.md))
- [Minimum Length Validations](https://awesome-repositories.com/f/software-engineering-architecture/array-schema-validation/minimum-length-validations.md) — Ensures strings or arrays contain at least a specified number of elements. ([source](https://valibot.dev/api/minLength.md))
- [Non-Empty Collection Validations](https://awesome-repositories.com/f/software-engineering-architecture/array-schema-validation/non-empty-collection-validations.md) — Ensures a string or array contains at least one element to prevent empty inputs. ([source](https://valibot.dev/api/nonEmpty.md))
- [Custom Validation Actions](https://awesome-repositories.com/f/software-engineering-architecture/custom-validation-extensions/custom-validation-actions.md) — Transforms input data using custom logic while integrating validation issues into the pipeline. ([source](https://valibot.dev/api/rawTransform.md))
- [Data Type Validation](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/data-type-validation.md) — Deno Valide accepts any value without imposing specific type constraints or rules. ([source](https://valibot.dev/api/any.md))
- [Assertion-Based Validations](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/data-type-validation/assertion-based-validations.md) — Checks input against a schema and throws an immediate error upon validation failure. ([source](https://valibot.dev/api/assert.md))
- [Loose Tuple Validation](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/data-type-validation/loose-tuple-validation.md) — Deno Valide checks that an array starts with a specific sequence and allows generic trailing elements. ([source](https://valibot.dev/api/tupleWithRest.md))
- [Strict Object Validation](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/data-type-validation/object-shape-validation/strict-object-validation.md) — Deno Valide ensures an input object contains only specified keys and rejects unknown properties. ([source](https://valibot.dev/api/strictObject.md))
- [Strict Tuple Validation](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/data-type-validation/strict-tuple-validation.md) — Deno Valide ensures an input array has a specific length and rejects unknown items. ([source](https://valibot.dev/api/strictTuple.md))
- [Uniform Record Validation](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/data-type-validation/uniform-record-validation.md) — Deno Valide checks that an object's keys and values all conform to a specified schema. ([source](https://valibot.dev/guides/objects.md))
- [Union Type Validation](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/data-type-validation/union-type-validation.md) — Deno Valide matches input against multiple possible schemas and returns the first successful result. ([source](https://valibot.dev/guides/unions.md))
- [Data Transformation Pipelines](https://awesome-repositories.com/f/software-engineering-architecture/data-transformation-pipelines.md) — Processes inputs through a sequential chain of validation and transformation actions to produce typed results.
- [Runtime Type Guards](https://awesome-repositories.com/f/software-engineering-architecture/runtime-type-guards.md) — Acts as a runtime type guard to verify that unknown data adheres to expected structures.
- [Nullability Restrictions](https://awesome-repositories.com/f/software-engineering-architecture/runtime-value-validation/nullability-restrictions.md) — Deno Valide prevents inputs from being null or undefined and triggers a customizable error message. ([source](https://valibot.dev/api/nonNullish.md))
- [Nullable Type Support](https://awesome-repositories.com/f/software-engineering-architecture/runtime-value-validation/nullable-type-support.md) — Deno Valide defines a schema that accepts a specified data type or a null value. ([source](https://valibot.dev/api/nullable.md))
- [Required Field Enforcement](https://awesome-repositories.com/f/software-engineering-architecture/runtime-value-validation/required-field-enforcement.md) — Deno Valide marks specific entries in an object schema as required to ensure keys are present. ([source](https://valibot.dev/api/required.md))
- [Schema Composition Libraries](https://awesome-repositories.com/f/software-engineering-architecture/schema-composition-libraries.md) — Builds complex validation logic by combining primitive schemas through unions, intersections, and recursive references.
- [Schema Validation Frameworks](https://awesome-repositories.com/f/software-engineering-architecture/schema-validation-frameworks.md) — Implements a modular, function-based architecture that minimizes bundle size through tree-shaking.
- [String Validation and Normalization](https://awesome-repositories.com/f/software-engineering-architecture/string-validation-and-normalization.md) — Enforces constraints on string inputs, including length and pattern verification. ([source](https://valibot.dev/api/string.md))
- [Custom Array Condition Validation](https://awesome-repositories.com/f/software-engineering-architecture/array-schema-validation/custom-array-condition-validation.md) — Checks array elements against a logic function to ensure specific ordering or content requirements. ([source](https://valibot.dev/api/someItem.md))
- [Exact Size Validations](https://awesome-repositories.com/f/software-engineering-architecture/array-schema-validation/exact-size-validations.md) — Checks that strings, arrays, or maps contain exactly the specified number of items. ([source](https://valibot.dev/api/size.md))
- [Minimum Value Validations](https://awesome-repositories.com/f/software-engineering-architecture/array-schema-validation/minimum-value-validations.md) — Deno Valide validates that a number or date meets a specified minimum threshold. ([source](https://valibot.dev/api/minValue.md))
- [Boolean Value Parsing](https://awesome-repositories.com/f/software-engineering-architecture/boolean-attribute-parsing/boolean-value-parsing.md) — Deno Valide converts truthy and falsy strings or numbers into actual boolean values. ([source](https://valibot.dev/api/parseBoolean.md))
- [Boolean Predicates](https://awesome-repositories.com/f/software-engineering-architecture/boolean-predicates.md) — Validates values against custom boolean functions or type predicates. ([source](https://valibot.dev/api/guard.md))
- [Cross-Field Dependency Validations](https://awesome-repositories.com/f/software-engineering-architecture/cross-field-dependency-validations.md) — Evaluates logical relationships and dependencies between multiple fields in an object. ([source](https://valibot.dev/guides/objects.md))
- [Custom Validation Rules](https://awesome-repositories.com/f/software-engineering-architecture/custom-validation-rules.md) — Implements custom interfaces to extend default validation and transformation capabilities with domain-specific checks. ([source](https://valibot.dev/guides/internal-architecture.md))
- [Binary Data Validation](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/data-type-validation/binary-data-validation.md) — Deno Valide verifies that a value is a blob and checks MIME type and size. ([source](https://valibot.dev/api/blob.md))
- [Collection Type Validation](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/data-type-validation/collection-type-validation.md) — Deno Valide ensures a value is a Set containing elements that match a specified schema. ([source](https://valibot.dev/api/set.md))
- [Custom Schema Definitions](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/data-type-validation/custom-schema-definitions.md) — Allows the creation of new schema types using a plain-object pattern to implement specific, custom validation logic. ([source](https://valibot.dev/guides/extend-valibot.md))
- [Object Shape Validation](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/data-type-validation/object-shape-validation.md) — Verifies that an object contains specific keys with values matching defined schemas. ([source](https://valibot.dev/guides/objects.md))
- [Loose Object Validation](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/data-type-validation/object-shape-validation/loose-object-validation.md) — Checks if an input is an object and preserves unknown entries in the resulting output. ([source](https://valibot.dev/api/looseObject.md))
- [Object Field Optionality](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/data-type-validation/object-shape-validation/object-field-optionality.md) — Creates modified object schemas where specific keys are marked as optional. ([source](https://valibot.dev/api/partial.md))
- [Schema Key Exclusions](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/data-type-validation/object-shape-validation/object-key-validation/schema-key-exclusions.md) — Deno Valide creates a modified copy of an object schema by excluding specific keys. ([source](https://valibot.dev/api/omit.md))
- [Strongly-Typed Validators](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/data-type-validation/strongly-typed-validators.md) — Transforms validated data into read-only types to ensure immutability. ([source](https://valibot.dev/api/readonly.md))
- [Value Type Conversions](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/data-type-validation/value-type-conversions.md) — Provides capabilities to convert input values from one type to another during the validation process. ([source](https://valibot.dev/guides/migrate-from-zod.md))
- [Schema Default Values](https://awesome-repositories.com/f/software-engineering-architecture/default-configuration-values/schema-default-values.md) — Implements fallback values for fields when input data is null or undefined. ([source](https://valibot.dev/api/nullish.md))
- [Element Presence Verifications](https://awesome-repositories.com/f/software-engineering-architecture/element-presence-verifications.md) — Verifies if a string contains a specific substring or if an array contains a particular element. ([source](https://valibot.dev/api/includes.md))
- [Object Schema Definitions](https://awesome-repositories.com/f/software-engineering-architecture/object-schema-definitions.md) — Defines schema types using a simple object pattern to facilitate easy extension and custom rule implementation.
- [Object Constraint Definition](https://awesome-repositories.com/f/software-engineering-architecture/object-schema-definitions/object-constraint-definition.md) — Allows developers to specify whether objects and tuples should strictly permit or block unknown values. ([source](https://valibot.dev/guides/migrate-from-zod.md))
- [Optionality Definitions](https://awesome-repositories.com/f/software-engineering-architecture/optional-value-types/optional-value-serializers/optionality-definitions.md) — Allows marking schema fields as optional with associated default values. ([source](https://valibot.dev/api/optional.md))
- [List-Based Value Exclusions](https://awesome-repositories.com/f/software-engineering-architecture/optional-value-types/value-constraint-enforcers/list-based-value-exclusions.md) — Deno Valide validates that a string or array does not contain a specific forbidden value. ([source](https://valibot.dev/api/excludes.md))
- [Range Constraints](https://awesome-repositories.com/f/software-engineering-architecture/optional-value-types/value-constraint-enforcers/range-constraints.md) — Deno Valide validates that a number or date does not exceed a specified threshold. ([source](https://valibot.dev/api/maxValue.md))
- [Recursive Data Schemas](https://awesome-repositories.com/f/software-engineering-architecture/recursive-data-schemas.md) — Deno Valide references a schema within itself to validate nested or tree-like data structures. ([source](https://valibot.dev/guides/other.md))
- [Regex Pattern Validators](https://awesome-repositories.com/f/software-engineering-architecture/regex-pattern-validators.md) — Provides the ability to validate strings against custom regular expression patterns. ([source](https://valibot.dev/api/regex.md))
- [Validation Chains](https://awesome-repositories.com/f/software-engineering-architecture/request-validation/validation-chains.md) — Processes input data through sequential chains of validation checks and modifiers to ensure correct formatting. ([source](https://valibot.dev/api/pipe.md))
- [Runtime Business Rule Validation](https://awesome-repositories.com/f/software-engineering-architecture/runtime-business-rule-validation.md) — Executes arbitrary custom logic to validate data against complex business rules. ([source](https://valibot.dev/guides/other.md))
- [Runtime Value Validation](https://awesome-repositories.com/f/software-engineering-architecture/runtime-value-validation.md) — Matches input values against precise string, number, or boolean constants during runtime. ([source](https://valibot.dev/guides/other.md))
- [Allowed Value Validations](https://awesome-repositories.com/f/software-engineering-architecture/runtime-value-validation/allowed-value-validations.md) — Deno Valide ensures a string matches one of several predefined allowed options. ([source](https://valibot.dev/guides/enums.md))
- [Schema Factories](https://awesome-repositories.com/f/software-engineering-architecture/schema-factories.md) — Composes schemas into reusable generic functions that wrap data in consistent envelopes. ([source](https://valibot.dev/guides/extend-valibot.md))
- [Schema Validation Refinements](https://awesome-repositories.com/f/software-engineering-architecture/schema-validation-refinements.md) — Applies custom validation logic and refinements to schemas to enforce complex business rules. ([source](https://valibot.dev/guides/mental-model.md))

### Web Development

- [Type-Safe Schema Validations](https://awesome-repositories.com/f/web-development/type-safe-schema-validations.md) — Provides a TypeScript schema validation library with automatic static type inference from runtime definitions.
- [Modular Architectures](https://awesome-repositories.com/f/web-development/modular-architectures.md) — Uses a modular, function-based architecture to enable tree-shaking and minimize the final bundle size.
- [API Specification Generation](https://awesome-repositories.com/f/web-development/api-specification-generation.md) — Automatically generates OpenAPI or JSON Schema specifications from defined validation rules.
- [Form Validation Libraries](https://awesome-repositories.com/f/web-development/form-validation-libraries.md) — Connects validation schemas to frontend form managers to enforce type safety and input constraints during user entry. ([source](https://valibot.dev/guides/ecosystem.md))
- [Schema Validation](https://awesome-repositories.com/f/web-development/schema-validation.md) — Checks if an input matches at least one of several provided schema options through union validation. ([source](https://valibot.dev/api/union.md))
- [String Format Validators](https://awesome-repositories.com/f/web-development/string-format-validators.md) — Verifies that a string is a valid Base64 encoded sequence. ([source](https://valibot.dev/api/base64.md))

### Part of an Awesome List

- [Data Validation](https://awesome-repositories.com/f/awesome-lists/devtools/data-validation.md) — Deno Valide gathers detailed information about every schema violation during data validation for comprehensive reporting. ([source](https://valibot.dev/guides/issues.md))
- [Data Normalization](https://awesome-repositories.com/f/awesome-lists/devtools/input-validation/data-normalization.md) — Transforms raw input into a standardized format during the validation process. ([source](https://valibot.dev/api/normalize.md))

### Data & Databases

- [Length Constraints](https://awesome-repositories.com/f/data-databases/data-structures/structured-return-objects/collection-size-utilities/length-constraints.md) — Enforces minimum and maximum size limits on arrays to ensure required element counts. ([source](https://valibot.dev/api/array.md))
- [Data Validation](https://awesome-repositories.com/f/data-databases/data-validation.md) — Deno Valide verifies that a value is a boolean and applies a custom error message. ([source](https://valibot.dev/api/boolean.md))
- [Number Type Validation](https://awesome-repositories.com/f/data-databases/data-validation/number-type-validation.md) — Deno Valide checks that a value is a number and returns an error if incorrect. ([source](https://valibot.dev/api/number.md))
- [Minimum Size Enforcements](https://awesome-repositories.com/f/data-databases/schema-enforcement-tools/validation-constraints/minimum-size-enforcements.md) — Validates that strings, arrays, sets, or blobs meet a minimum length or size requirement. ([source](https://valibot.dev/api/minSize.md))
- [Schema Validation Libraries](https://awesome-repositories.com/f/data-databases/schema-validation-libraries.md) — Implements a vendor-neutral interface for data validation and type inference to ensure interoperability between different libraries. ([source](https://valibot.dev/guides/integrate-valibot.md))
- [Safe Integer Validations](https://awesome-repositories.com/f/data-databases/custom-type-converters/type-restriction-rules/integer-range-restriction/safe-integer-validations.md) — Deno Valide checks if a number is a safe integer within the representable range. ([source](https://valibot.dev/api/safeInteger.md))
- [JSON-Schema](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/data-serialization/json-schema.md) — Transforms internal validation schemas into the JSON Schema format for compatibility with external ecosystems. ([source](https://valibot.dev/guides/ecosystem.md))
- [Array Filtering](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/data-transformation/array-tensor-manipulation/array-filtering.md) — Removes elements from an array based on a predicate function to filter for valid items. ([source](https://valibot.dev/api/filterItems.md))
- [Collection Size Restrictions](https://awesome-repositories.com/f/data-databases/data-structures/structured-return-objects/collection-size-utilities/collection-size-restrictions.md) — Validates that maps, sets, or blobs do not exceed a maximum specified size. ([source](https://valibot.dev/api/maxSize.md))
- [Asynchronous Validators](https://awesome-repositories.com/f/data-databases/data-validation/asynchronous-validators.md) — Supports asynchronous validation functions for checks involving promises or external lookups. ([source](https://valibot.dev/guides/migrate-from-zod.md))
- [Field Selection Validation](https://awesome-repositories.com/f/data-databases/field-validation/field-selection-validation.md) — Creates a modified object schema containing only a specified subset of keys. ([source](https://valibot.dev/api/pick.md))
- [Schema Format Converters](https://awesome-repositories.com/f/data-databases/schema-migration-tools/schema-format-converters.md) — Transforms internal validation schemas into the industry-standard JSON Schema format for interoperability. ([source](https://valibot.dev/guides/migrate-from-zod.md))
- [Union Validation Optimizers](https://awesome-repositories.com/f/data-databases/schema-validation-libraries/union-validation-optimizers.md) — Optimizes union type validation by using discriminator keys to efficiently identify the correct sub-schema for input data.

### Programming Languages & Runtimes

- [Runtime Type Validation](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-type-validation.md) — Verifies that unknown runtime data adheres to predefined schemas to ensure type safety.
- [Asynchronous Validation](https://awesome-repositories.com/f/programming-languages-runtimes/asynchronous-promise-interfaces/asynchronous-validation.md) — Validates the value resolved by a promise against a specific schema using asynchronous logic. ([source](https://valibot.dev/api/promise.md))
- [Discriminated Unions](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/language-features/language-extensions/union-types/discriminated-unions.md) — Implements discriminated unions to identify the correct schema within a union by matching a specific key in the input data. ([source](https://valibot.dev/guides/unions.md))
- [Array Transformation Utilities](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/functional/array-transformation-utilities.md) — Iterates over array items and applies transformation functions to modify values during the validation process. ([source](https://valibot.dev/api/mapItems.md))

### Development Tools & Productivity

- [Bundle Size Optimization](https://awesome-repositories.com/f/development-tools-productivity/bundle-size-optimization.md) — Uses a modular, function-based architecture specifically designed to enable tree-shaking and reduce final bundle size. ([source](https://valibot.dev/guides/comparison.md))
- [Environment Variable Validation](https://awesome-repositories.com/f/development-tools-productivity/command-argument-parsers/environment-variable-configuration/environment-variable-validation.md) — Validates environment variables and configuration files against schemas to detect setup errors.

### DevOps & Infrastructure

- [Configuration Validation](https://awesome-repositories.com/f/devops-infrastructure/configuration-management/configuration-validation.md) — Matches environment variables and configuration files against schemas to detect structural errors. ([source](https://valibot.dev/guides/use-cases.md))

### Scientific & Mathematical Computing

- [Multiple Verifiers](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/arithmetic-number-types/multiplication-algorithms/multiple-verifiers.md) — Deno Valide checks if a numeric value is a multiple of a specified number. ([source](https://valibot.dev/api/multipleOf.md))

### Testing & Quality Assurance

- [Undefined Value Handling](https://awesome-repositories.com/f/testing-quality-assurance/validation-verification/input-validation/undefined-value-handling.md) — Permits undefined values to pass validation and optionally replaces them with defaults. ([source](https://valibot.dev/api/undefinedable.md))
