{"schemaVersion":"1.0","record":{"label":"Valibot","description":"MIT-licensed modular runtime schema-validation library for JavaScript and TypeScript with composable validation pipelines.","aliases":[],"kind":"software","website":"https://valibot.dev/","overview":"Valibot is an open-source schema library for checking data at runtime and deriving static TypeScript types. Its API composes small functions into schemas and validation or transformation pipelines. This is useful for forms, server inputs and configuration in AI-assisted applications, where explicit data contracts are preferable to assuming generated types alone validate incoming values.","license":"MIT","lifecycle":"active","example":false,"features":[{"name":"Composable validation pipelines","status":"supported","detail":"Schemas and independent actions combine validation and transformations with inferred types.","useCase":"Runtime validation of structured application data","platforms":["JavaScript runtimes","TypeScript applications","Web browsers"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://valibot.dev/guides/introduction/","locator":"Modular function design, runtime checking and type inference","retrievedAt":"2026-10-07T22:48:59Z","kind":"vendor"}]},{"name":"Parsed-output handling","status":"limited","detail":"parse and safeParse return schema output; is/assert type guards do not apply transformations or remove unknown keys.","useCase":"Runtime validation of structured application data","platforms":["JavaScript runtimes","TypeScript applications","Web browsers"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://valibot.dev/guides/parse-data/","locator":"parse/safeParse output and type-guard limitations","retrievedAt":"2026-10-07T22:50:17Z","kind":"vendor"}]},{"name":"Asynchronous validation","status":"supported","detail":"Async schemas/actions can contain synchronous work, but async work requires async parent composition.","useCase":"Runtime validation of structured application data","platforms":["JavaScript runtimes","TypeScript applications","Web browsers"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://valibot.dev/guides/async-validation/","locator":"Promise-based functions and nesting constraints","retrievedAt":"2026-10-07T22:50:17Z","kind":"vendor"}]},{"name":"Automatic Zod migration","status":"limited","detail":"Official codemod is beta and may miss edge cases; construction and parsing APIs change.","useCase":"Runtime validation of structured application data","platforms":["JavaScript runtimes","TypeScript applications","Web browsers"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://valibot.dev/guides/migrate-from-zod/","locator":"Beta codemod, pipelines and changed names","retrievedAt":"2026-10-07T22:49:54Z","kind":"vendor"}]},{"name":"JSON Schema export","status":"limited","detail":"Provided by a separate package for compatible schemas; arbitrary transformations are not faithfully portable to JSON Schema.","useCase":"Runtime validation of structured application data","platforms":["JavaScript runtimes","TypeScript applications","Web browsers"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://valibot.dev/guides/json-schema/","locator":"Separate conversion package and non-JSON transformation limits","retrievedAt":"2026-10-07T22:49:54Z","kind":"vendor"}]}],"alternatives":[],"slug":"valibot","draftAlternatives":[{"targetSlug":"zod","status":"limited","detail":"Candidate for runtime data validation and inferred types when modular function composition is preferred. Use the migration guide and test error/output behavior; no universal size or compatibility advantage is claimed.","useCase":"Runtime validation of structured application data","platforms":["JavaScript runtimes","TypeScript applications","Web browsers"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://valibot.dev/guides/introduction/","locator":"Modular function design, runtime checking and type inference","retrievedAt":"2026-10-07T22:48:59Z","kind":"vendor"},{"url":"https://valibot.dev/guides/migrate-from-zod/","locator":"Beta codemod, pipelines and changed names","retrievedAt":"2026-10-07T22:49:54Z","kind":"vendor"},{"url":"https://zod.dev/basics","locator":"Runtime parsing, type inference and input/output distinctions","retrievedAt":"2026-10-07T22:49:54Z","kind":"vendor"},{"url":"https://zod.dev/packages/mini","locator":"Functional tree-shakable Zod option and benchmark qualification","retrievedAt":"2026-10-07T22:49:13Z","kind":"vendor"}]}],"evidence":[{"url":"https://valibot.dev/guides/introduction/","locator":"Modular function design, runtime checking and type inference","retrievedAt":"2026-10-07T22:48:59Z","kind":"vendor"},{"url":"https://github.com/open-circle/valibot/blob/main/LICENSE.md","locator":"MIT license","retrievedAt":"2026-10-07T22:50:17Z","kind":"vendor"},{"url":"https://valibot.dev/guides/parse-data/","locator":"parse/safeParse output and type-guard limitations","retrievedAt":"2026-10-07T22:50:17Z","kind":"vendor"},{"url":"https://valibot.dev/guides/objects/","locator":"Unknown entries, strict/loose behavior and partial checks","retrievedAt":"2026-10-07T22:49:54Z","kind":"vendor"},{"url":"https://valibot.dev/guides/async-validation/","locator":"Promise-based functions and nesting constraints","retrievedAt":"2026-10-07T22:50:17Z","kind":"vendor"},{"url":"https://valibot.dev/guides/json-schema/","locator":"Separate conversion package and non-JSON transformation limits","retrievedAt":"2026-10-07T22:49:54Z","kind":"vendor"},{"url":"https://valibot.dev/guides/migrate-from-zod/","locator":"Beta codemod, pipelines and changed names","retrievedAt":"2026-10-07T22:49:54Z","kind":"vendor"},{"url":"https://zod.dev/basics","locator":"Runtime parsing, type inference and input/output distinctions","retrievedAt":"2026-10-07T22:49:54Z","kind":"vendor"},{"url":"https://zod.dev/packages/mini","locator":"Functional tree-shakable Zod option and benchmark qualification","retrievedAt":"2026-10-07T22:49:13Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://valibot.dev/guides/introduction/","locator":"Modular function design, runtime checking and type inference","retrievedAt":"2026-10-07T22:48:59Z","id":"intro","title":"Valibot introduction","kind":"vendor"},{"url":"https://github.com/open-circle/valibot/blob/main/LICENSE.md","locator":"MIT license","retrievedAt":"2026-10-07T22:50:17Z","id":"license","title":"Valibot source license","kind":"vendor"},{"url":"https://valibot.dev/guides/parse-data/","locator":"parse/safeParse output and type-guard limitations","retrievedAt":"2026-10-07T22:50:17Z","id":"parse","title":"Valibot parsing","kind":"vendor"},{"url":"https://valibot.dev/guides/objects/","locator":"Unknown entries, strict/loose behavior and partial checks","retrievedAt":"2026-10-07T22:49:54Z","id":"objects","title":"Valibot objects","kind":"vendor"},{"url":"https://valibot.dev/guides/async-validation/","locator":"Promise-based functions and nesting constraints","retrievedAt":"2026-10-07T22:50:17Z","id":"async","title":"Valibot async validation","kind":"vendor"},{"url":"https://valibot.dev/guides/json-schema/","locator":"Separate conversion package and non-JSON transformation limits","retrievedAt":"2026-10-07T22:49:54Z","id":"json","title":"Valibot JSON Schema","kind":"vendor"},{"url":"https://valibot.dev/guides/migrate-from-zod/","locator":"Beta codemod, pipelines and changed names","retrievedAt":"2026-10-07T22:49:54Z","id":"migration","title":"Migrate from Zod to Valibot","kind":"vendor"},{"url":"https://zod.dev/basics","locator":"Runtime parsing, type inference and input/output distinctions","retrievedAt":"2026-10-07T22:49:54Z","id":"zod","title":"Zod basic usage","kind":"vendor"},{"url":"https://zod.dev/packages/mini","locator":"Functional tree-shakable Zod option and benchmark qualification","retrievedAt":"2026-10-07T22:49:13Z","id":"mini","title":"Zod Mini","kind":"vendor"}],"overviewCitations":["intro"],"licenseCitations":["license"],"sections":[{"id":"pipeline","heading":"Building a contract from small pieces","paragraphs":[{"id":"pipeline-detail","content":[{"text":"Valibot separates schema construction from actions that validate or transform values. A pipeline can first establish that input is a string and then apply format or length checks. Its independent-function design gives bundlers opportunities to omit unused code. That is an architectural characteristic, not a measured guarantee that every application becomes smaller or faster after switching. A generated schema still needs to express the actual accepted input rather than only a convenient example."}],"citations":["intro"]}]},{"id":"output","heading":"Parsing and type guards are not interchangeable","paragraphs":[{"id":"output-detail","content":[{"text":"parse throws ValiError when input fails, while safeParse returns a success flag with output or issues. The distinction is particularly important when transformations are involved. The parsing guide warns that is and assert type guards neither apply transformations nor strip unknown object keys and do not expose validation issues. Replacing parsing with a boolean test can therefore change what the application actually receives, even if both approaches seem to check the same schema."}],"citations":["parse"]}]},{"id":"object-policy","heading":"Object shape and cross-field checks","paragraphs":[{"id":"object-policy-detail","content":[{"text":"The ordinary object schema removes entries that were not declared. looseObject preserves unknown entries, strictObject rejects them, and objectWithRest can validate additional entries against another schema. Cross-field validation can use a pipeline check, with issues assigned to a relevant field. The guide notes that a whole-object check needs fully typed input and offers partialCheck for selected fields. These distinctions help avoid accidental acceptance, removal or delayed reporting of fields in an application form."}],"citations":["objects"]}]},{"id":"async-work","heading":"Asynchronous work must propagate through the schema","paragraphs":[{"id":"async-work-detail","content":[{"text":"Valibot's asynchronous variants use an Async suffix and return promises. An asynchronous check nested inside an object requires asynchronous enclosing composition, while synchronous checks can remain inside the async structure. The documentation uses checking whether a username is available as an example. Such a check integrates external state into validation but does not make that state immutable; the surrounding application remains responsible for its persistence rules."}],"citations":["async"]}]},{"id":"interchange","heading":"JSON Schema export and migration","paragraphs":[{"id":"interchange-detail","content":[{"text":"The official JSON Schema converter is a separate package. It covers compatible schema constructs, but Valibot's transformations and non-JSON capabilities are not all expressible in JSON Schema. Its Zod migration tool is also explicitly beta. The migration guide changes chained methods into pipeline calls and documents renamed operations and different parsing syntax. Conversion should therefore be reviewed against representative inputs and outputs rather than treated as a proof that the old and new validators are identical."}],"citations":["json","migration"]}]},{"id":"choice","heading":"License and substitution","paragraphs":[{"id":"choice-detail","content":[{"text":"Valibot uses the MIT license. It can substitute for "},{"text":"Zod","targetSlug":"zod"},{"text":" for overlapping runtime data contracts, provided the application's callers, error rendering and transformations are adapted. Bundle size is a useful reason to investigate modular validation, but current Zod also offers a functional Mini variant, so an old comparison against regular Zod alone is not a complete current evaluation. The choice should be measured within the actual application. No codemod, package install or comparative benchmark was run for this article."}],"citations":["license","migration","zod","mini"]}]}]},"id":"Q133","revision":117,"updatedAt":"2026-10-10T06:44:24Z","sourceUrl":"https://substitutefor.net/entities/Q133?revision=117"}}