Skip to content

The best knex alternatives

4 tools that do a similar job to knex, 4 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

knex

A JavaScript library for building SQL queries across several databases with one API.

  1. 1

    Sequelize

    Open source · MIT · ★ 30.3k

    A Node.js and TypeScript ORM for working with SQL databases using JavaScript objects.

    Best for: Node.js backend developers who use a relational SQL database; TypeScript teams that want typed database models

  2. 2

    Kysely

    Open source · MIT · ★ 14.3k

    A type-safe TypeScript SQL query builder that checks your queries against your table types.

    Best for: TypeScript developers who want SQL control without losing compile-time type checks; Teams building Node.js backends that query PostgreSQL, MySQL, SQLite or MSSQL

  3. 3

    TypeORM

    Open source · MIT · ★ 36.7k

    A TypeScript/JavaScript library that maps database tables to code objects for Node.js apps.

    Best for: Node.js or TypeScript developers building apps backed by a relational database; Teams that want one data layer that can switch between several database types

  4. 4

    Turso

    Open source · MIT · ★ 25.1k

    An in-process SQL database in Rust that aims for SQLite compatibility, with Postgres support in progress.

    Best for: Developers who want an embedded SQLite-compatible database in a Rust, JavaScript, Python, Java, Go, or .NET project; Teams exploring a Rust-based alternative to SQLite that wants features like concurrent writes via MVCC

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 knex. We don't take payment for placement.