Elestia Open Source Ratings
8.1

better-sqlite3

A strong pick. 3rd of 10 database drivers.

better-sqlite3 is a synchronous SQLite driver for Node.js. In independent benchmarks it is the fastest, and it is the standard choice when a Node app needs an embedded SQLite database. For a new SQLite project today it is a strong pick. Its main rival is the built-in node:sqlite module, which is maturing but has a smaller API.

Best for: Node.js apps, Electron apps, CLIs and test suites that want a fast, embedded SQLite database with a simple synchronous API.

GitHubnpm

Scores

Overall8.1

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 8.0, likely 7.0 to 8.5

For SQLite in Node.js, it is the default pick: the fastest, with the fullest API, active maintenance and growing use. It falls short of 9 because it only serves SQLite on Node and Electron, native builds still cause trouble, and node:sqlite may cover simple needs once it is stable. Among the drivers in this bundle it is the clear SQLite choice.

GPT-6.2 Sol: 8.1, likely 6.9 to 9.0

For new Node.js projects using an embedded SQLite database, better-sqlite3 is a strong pick for its transaction helpers, fast reads, and active maintenance. The older node-sqlite3 peer is archived, and libSQL is a better fit when the database needs to be remote. Node's built-in driver offers competitive performance without a separate native npm package, so the choice depends on the workload and deployment.

Needed by many4.7

How many developers need a tool for this job?

Claude Opus 5.5: 5.0, likely 4.0 to 6.0

SQLite is common for local-first apps, Electron, CLIs, tests and small servers, but most web backends use Postgres or MySQL. The library only serves Node.js and Electron, since Bun and Deno have their own SQLite modules. That makes it a large niche within the database-driver category.

  • peers: Postgres and MySQL drivers have far more dependents
  • bun:sqlite / Deno: Other runtimes ship their own SQLite APIs

GPT-6.2 Sol: 4.3, likely 3.2 to 5.5

SQLite was used by 42.1% of respondents who answered the 2026 Stack Overflow database question. This driver serves the subset that wants embedded SQLite on Node.js, and v13 requires Node.js 22 or later. The survey spans many languages and gives only an indirect estimate of that subset.

Helps a lot8.5

How well does it do the job for those who need it?

Claude Opus 5.5: 8.5, likely 7.5 to 9.0

It is the fastest SQLite driver for Node and has a full API: transactions, prepared statements, user functions and serialization. Its documentation is mature, and AI agents write correct code for it easily. Native build friction, the blocking sync model and types that live in a separate package keep it from the top score.

GPT-6.2 Sol: 8.5, likely 7.4 to 9.4

The v13.2 docs give coding agents concrete examples for prepared statements, nested transactions, and SQLite error codes. TypeScript users need a separate declarations package. Independent tests on earlier releases show fast reads, with node:sqlite ahead on some batched writes. Slow queries block the calling thread, so the workload matters.

Holds up over time7.4

Will it still be a good choice in two years?

Claude Opus 5.5: 7.5, likely 6.5 to 8.5

The project is very active, with 23 releases and 78 commits in the last year. The v13 move to N-API should make upgrades break less often. The v13.1.0 release was broken on Windows Arm64 and fixed within days. The maintainer team is small and unpaid, and node:sqlite is a long-term rival that could take over simple uses.

  • github releasesLastYear: 23 releases, the latest on 2026-11-14
  • github.com/WiseLibs/better-sqlite3/releases: v13 N-API rewrite; v13.1.0 marked not viable, then fixed
  • github closedIssues/openIssues: 1128 closed against 57 open

GPT-6.2 Sol: 7.3, likely 6.1 to 8.4

The project logged 78 commits and published 15 npm versions in the past year, with a three-month gap before November. Two maintainers cut recent GitHub releases, and v13.2 fixed a reported Linux startup stall within a month. The funding page shows individual sponsorship, and a downstream migration to node:sqlite shows how the built-in driver could affect future adoption.

Used widely6.5

How many use it, and is that growing?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

It had 66M downloads in 4 weeks, up 6.1x on a year ago, which beats the 4.1x median, so it is gaining ground. It has 12.5k dependent repositories and 1.8k dependent packages. Many downloads are transitive, through ORMs, tools and CLIs. It has clearly replaced the archived node-sqlite3 for new work.

  • npm downloadsLast4Weeks: 66.3M, against 10.9M a year ago
  • dependents: 12,510 repos and 1,818 packages
  • peers node-sqlite3: The older rival is archived and growing more slowly

GPT-6.2 Sol: 5.9, likely 4.8 to 7.1

Four-week downloads grew 6.1× year over year against a 4.1× catalog median, with libSQL and PGlite growing faster. The tracker found 12,510 dependent repositories, well ahead of libSQL and far behind node-postgres and MySQL2. The repository has 7,558 stars and little recent social discussion in the collector's sample. CI and installs through packages such as Prisma's adapter make npm totals a rough guide to direct adoption.

  • npm.downloadsLast4Weeks and npm.downloadsSame4WeeksYearAgo: 66.3 million versus 10.9 million installs.
  • medianDownloadsRatio: The catalog median is 4.1×.
  • dependents: 12,510 tracked repositories and 1,818 npm packages.
  • peers: libSQL and PGlite grew faster, and node-postgres and MySQL2 have larger tracked footprints.
  • github.stars and bluesky.posts: 7,558 stars and two Bluesky posts linking to the repository.
  • prisma.io/docs/orm/v7/core-concepts/supported-databases/database-drivers: Prisma maintains a better-sqlite3 adapter.
Vouched for7.5

Who stands behind it being good?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

Independent benchmarks and write-ups recommend it. Major query builders and ORMs such as Drizzle, Kysely and Knex support it as their SQLite driver, and many Electron apps run it. Survey data and recent production write-ups are thin, so the range stays moderate.

  • sqg.dev/blog/sqlite-driver-benchmark: An independent benchmark recommends it
  • Drizzle/Kysely/Knex docs: They list better-sqlite3 as a supported driver
  • hackerNews: Few, low-scoring stories

GPT-6.2 Sol: 8.0, likely 6.8 to 9.0

Prisma and Drizzle both support the driver, and OmniRoute ships it as its SQLite backend. Independent benchmarks confirm strong query performance across several workloads. The evidence is strongest for local Node.js use, and the available survey measures SQLite use across drivers.

Safe8.1

How safe is it to depend on?

Claude Opus 5.5: 8.0, likely 7.0 to 9.0

It has no known advisories, one dependency and an MIT licence. As a native C++ addon that bundles SQLite, it has a larger attack surface than pure JavaScript, but it tracks SQLite security releases quickly. There is no Scorecard data, and releases come from a small team.

GPT-6.2 Sol: 8.1, likely 6.9 to 9.0

The MIT package has one runtime dependency and zero package advisories in OSV. GitHub Actions publishes the package with npm provenance, and the November releases updated the bundled SQLite engine. An independent scan flagged binary hardening gaps, and the missing Scorecard leaves some repository controls unverified.

Good

  • It beat node:sqlite, libSQL and Turso on most operations in an independent 2026 benchmark.
  • Its simple synchronous API includes db.transaction(), user functions, aggregates and serialize(), which node:sqlite lacks or only partly has.
  • Version 13 moved to N-API and ships prebuilt binaries inside the package, which reduces install and ABI breakage.
  • It ships often with current SQLite versions, has no known advisories and pulls in only one dependency.

Bad

  • It is a native addon, so a missing prebuilt binary means node-gyp builds that fail on some CI, Alpine and Electron setups.
  • Its synchronous calls block the event loop, so long queries on a busy HTTP server need worker threads.
  • It ships no TypeScript types of its own; they come from @types/better-sqlite3.
  • As node:sqlite becomes stable, the built-in module may take over simple use cases.

The numbers

npm downloads, 4 weeks
66M ×6.1 in a year
GitHub stars
7.6k
Commits, 12 months
78
npm version
13.2.0 Nov 2026
Versions, 12 months
15
Advisories, 24 months
0 of 0 ever
OpenSSF Scorecard
None
Licence
MIT

Read on 21 November 2026 from GitHub (WiseLibs/better-sqlite3), npm (better-sqlite3), OSV and the OpenSSF Scorecard.

Database drivers

  1. 8.7node-postgres
  2. 8.2MongoDB driver
  3. 8.1better-sqlite3
  4. 8.0MySQL2
  5. 7.6PGlite
  6. 7.5Postgres.js
  7. 7.4DuckDB Node Neo
  8. 7.1Neon serverless driver
  9. 5.9libSQL client
  10. 1.9node-sqlite3
Compare all 10 on six scores