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.
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.
- sqg.dev/blog/sqlite-driver-benchmark: Fastest of the SQLite drivers it tested
- dev.to/jangwook_kim_e31e7291ad98/nodejs-built-in-sqlite-a-practical-guide-no-npm-install-required-2f0d: Fuller API than node:sqlite, which was still experimental
- npm downloads ratio: 6.1x against a 4.1x median
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.
- github.com/WiseLibs/better-sqlite3/blob/v13.2.0/docs/api.md: The current API provides transaction helpers and direct SQLite access.
- github.com/WiseLibs/better-sqlite3/releases: Recent releases address packaging, startup, and SQLite updates.
- github.com/TryGhost/node-sqlite3: The older SQLite peer was archived in July 2026.
- orm.drizzle.team/docs/sqlite/get-started-sqlite: Documents local better-sqlite3 and remote libSQL connections.
- nodejs.org/api/sqlite.html: Node.js ships its own SQLite module, currently at release-candidate stability.
- github.com/photostructure/node-sqlite/blob/main/benchmark/README.md: The built-in driver is competitive and wins some write workloads.
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.
- survey.stackoverflow.co/2026/technology/data/databases: 5,083 of 12,061 database respondents used SQLite.
- github.com/WiseLibs/better-sqlite3/blob/v13.2.0/package.json: The package targets Node.js 22 and later.
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.
- sqg.dev/blog/sqlite-driver-benchmark: Fastest on 8 of 10 operations; author calls it the best choice
- dev.to/jangwook_kim_e31e7291ad98/nodejs-built-in-sqlite-a-practical-guide-no-npm-install-required-2f0d: node:sqlite lacks transaction() and serialize()
- npm hasTypes: No bundled types
- github.com/WiseLibs/better-sqlite3/issues/1044: Users report prebuilt-binary and ABI problems with Electron
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.
- github.com/WiseLibs/better-sqlite3/blob/v13.2.0/docs/api.md: Documents query parameters, savepoints, backups, and structured error codes.
- github.com/WiseLibs/better-sqlite3/blob/v13.2.0/README.md: Documents the synchronous API and worker-thread support for slow queries.
- npm.hasTypes: The package ships without TypeScript declarations.
- orm.drizzle.team/docs/sqlite/get-started-sqlite: Documents installation of the separate @types package.
- sqg.dev/blog/sqlite-driver-benchmark: better-sqlite3 led most operations in SQG's local benchmark.
- github.com/photostructure/node-sqlite/blob/main/benchmark/README.md: v13.0.3 led several reads, and node:sqlite led batched inserts and deletes.
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.
- github.commitsLastYear: 78 commits in the last year.
- npm.versionsLastYear: 15 versions published in the last year.
- github.com/WiseLibs/better-sqlite3/releases: Two recent release authors and fixes for v13 packaging regressions.
- github.com/WiseLibs/better-sqlite3/issues/1527: The October Linux startup report closed with the November fix.
- github.com/sponsors/JoshuaWise: The lead maintainer describes volunteer work and lists current sponsors.
- github.com/OWASP/CVE-Lite-CLI/pull/1721: The CLI switched to node:sqlite to simplify installation.
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.
- prisma.io/docs/orm/v7/core-concepts/supported-databases/database-drivers: Prisma maintains the adapter for its current ORM.
- orm.drizzle.team/docs/sqlite/get-started-sqlite: Drizzle documents direct support and describes its integration experience.
- github.com/cheaper-inference/OmniRoute/blob/release/v3.8.54/docs/architecture/CODEBASE_DOCUMENTATION.md: OmniRoute documents better-sqlite3 as its shipped SQLite backend.
- sqg.dev/blog/sqlite-driver-benchmark: An independent benchmark found it fastest on most tested queries.
- survey.stackoverflow.co/2026/technology/data/databases: Survey results cover SQLite as a database.
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.
- advisories total: 0 advisories
- npm dependencies: 1 dependency
- scorecard: No Scorecard data
- github.com/WiseLibs/better-sqlite3/releases: Regular SQLite updates, up to 3.54.1
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.
- npm.license and npm.dependencies: MIT licence and one direct runtime dependency.
- advisories and scorecard: Zero OSV package advisories and no collected OpenSSF Scorecard.
- github.com/WiseLibs/better-sqlite3/blob/v13.2.0/.github/workflows/build.yml: GitHub Actions builds and checks the prebuilt binaries before publishing with provenance.
- github.com/WiseLibs/better-sqlite3/releases: The November release series updated bundled SQLite to 3.54.1.
- secure.software/npm/packages/better-sqlite3/13.2.0: The scanner flagged binary hardening gaps and found no evidence of malware or tampering.
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
- 8.7node-postgres
- 8.2MongoDB driver
- 8.1better-sqlite3
- 8.0MySQL2
- 7.6PGlite
- 7.5Postgres.js
- 7.4DuckDB Node Neo
- 7.1Neon serverless driver
- 5.9libSQL client
- 1.9node-sqlite3