# better-sqlite3: 8.1 out of 10

A strong pick. 3rd of 10 in [Database drivers](https://elestia.ai/opensource/db-drivers/index.md).

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.

## Scores

- **Overall: 8.1** (likely 7.0 to 8.8)
  - Claude Opus 5.5 (8.0): 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): 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 many: 4.7** (likely 3.6 to 5.8)
  - Claude Opus 5.5 (5.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.
  - GPT-6.2 Sol (4.3): 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 lot: 8.5** (likely 7.5 to 9.2)
  - Claude Opus 5.5 (8.5): 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): 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 time: 7.4** (likely 6.3 to 8.5)
  - Claude Opus 5.5 (7.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.
  - GPT-6.2 Sol (7.3): 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 widely: 6.5** (likely 5.4 to 7.6)
  - Claude Opus 5.5 (7.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.
  - GPT-6.2 Sol (5.9): 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.
- **Vouched for: 7.5** (likely 6.4 to 8.5)
  - Claude Opus 5.5 (7.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.
  - GPT-6.2 Sol (8.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.
- **Safe: 8.1** (likely 7.0 to 9.0)
  - Claude Opus 5.5 (8.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): 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

- Downloads, 4 weeks: 66M
- In a year: ×6.1
- GitHub stars: 7.6k
- Commits, 12 months: 78
- Last npm release: Nov 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/WiseLibs/better-sqlite3
- npm: https://www.npmjs.com/package/better-sqlite3

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
