Skip to content

The best validator.js alternatives

5 tools that do a similar job to validator.js, 5 of them open source. Each entry says what it does and who it suits, so you can pick the one that fits instead of the most famous.

You're replacing

validator.js

A JavaScript library for checking and cleaning up strings, like emails, dates, and URLs.

  1. 1

    Zod

    Open source · MIT · ★ 44.2k

    TypeScript-first library for validating data at runtime and inferring static types from the same schema.

    Best for: TypeScript developers who want runtime checks that match their static types; Teams validating API request or response data in TypeScript projects

  2. 2

    Yup

    Open source · MIT · ★ 23.7k

    A JavaScript/TypeScript library for defining schemas that validate and convert data at runtime.

    Best for: Developers validating form or API input in JavaScript or TypeScript; Teams that want TypeScript types inferred from a validation schema

  3. 3

    VeeValidate

    Open source · MIT · ★ 11.3k

    A library for building and validating forms in Vue.js apps.

    Best for: Vue developers who need form validation without writing it from scratch; Teams building Vue 3 forms with synchronous or asynchronous rules

  4. 4

    class-validator

    Open source · MIT · ★ 11.9k

    Validates class properties using TypeScript decorators, for browser and Node.js.

    Best for: TypeScript developers validating request bodies or form data in Node.js or the browser; Projects that already model data as classes and want validation rules next to the fields

  5. 5

    Eureka

    Open source · MIT · ★ 11.8k

    A Swift library for building iOS settings-style forms with less boilerplate.

    Best for: iOS developers building form-heavy screens in Swift; Teams migrating an XLForm-based Objective-C or Swift app to Swift

How we pick: tools in the same category that solve the same problem, projects that name each other as alternatives, and open-source projects that describe themselves as an alternative to validator.js. We don't take payment for placement.