Type-safe SQL query builder for TypeScript that provides auto-completion and compile-time type checking without the abstraction overhead of a traditional ORM. Write queries that map directly to SQL while getting full TypeScript inference from your database schema. Supports PostgreSQL, MySQL, and SQLite with migrations, transactions, and raw SQL escape hatches. Lightweight with zero dependencies. Ideal for developers who want SQL control with TypeScript safety. Growing Knex.js alternative.
Alternatives to Knex.js
3 editor-selected alternatives · Knex.js overview →
source: tools.alternatives · stored order · active records only; review scores are annotations and never change membership or order
A directional evidence panel appears only when the substitute rationale, trade-offs, sources, and verification date have been recorded. Older selections without that panel remain visible but are unclassified under the new evidence contract.
Full-featured ORM for TypeScript and JavaScript supporting Active Record and Data Mapper patterns. Works with PostgreSQL, MySQL, MariaDB, SQLite, Oracle, SQL Server, and MongoDB. Features decorator-based entity definitions, migrations, relations (one-to-one, many-to-many), lazy/eager loading, query builder, transactions, and caching. Supports both Node.js and browser runtimes. 34K+ GitHub stars. Mature but losing mindshare to Prisma and Drizzle for new TypeScript projects.
Mature, promise-based ORM for Node.js supporting PostgreSQL, MySQL, MariaDB, SQLite, and SQL Server. Features model definitions with validations, eager/lazy loading, transactions, migrations, raw queries, and lifecycle hooks. Supports soft deletes, scopes, and virtual fields. One of the oldest and most battle-tested Node.js ORMs, widely used in enterprise apps though increasingly succeeded by Prisma and Drizzle in new projects.
Open-source Knex.js alternatives
Kysely, TypeORM, Sequelize — see all open-source developer tools.
More Databases & ORMs tools
same category, not editor-selected alternatives — see how Knex.js compares →
FAQ
Which Knex.js alternative is listed first?
Kysely is first in the editor-selected list of 3 Knex.js alternatives. The stored order is editorial; review scores do not determine membership or position.
Are there open-source Knex.js alternatives?
Yes — Kysely, TypeORM, Sequelize are open source.