</>PackageGraphPackageGraph

better-sqlite3

npmv13.0.3

The fastest and simplest library for SQLite in Node.js.

Safe to adopt

Yes — better-sqlite3 scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 36 days ago. 31 releases in the last 2 years.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • AMaintenance: grade A, Excellent.

    Last published 36 days ago. 31 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Pulls in 1 transitive package, about 26 MB installed (at least — some of the tree is still being crawled).

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • ALicense: grade A, Excellent.

    MIT — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding better-sqlite3 to a project.

1
Direct dependencies

Runtime packages this one declares itself.

1
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

26 MB
Install size

Unpacked size of this package plus its entire runtime tree.

1
Tree depth

Longest resolved dependency chain below this package.

Part of this dependency tree has not been crawled yet, so these figures are a lower bound rather than a final total.

Compatibility

Node.js
node >=22
Module format
CommonJS only
TypeScript
No bundled types
Install scripts
None

Quick start

A usage example from the better-sqlite3 README.

const db = require('better-sqlite3')('foobar.db', options);

const row = db.prepare('SELECT * FROM users WHERE id = ?').get(userId);
console.log(row.firstName, row.lastName, row.email);

better-sqlite3 vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
better-sqlite3this page05MIT1 month ago
sqlite303BSD-3-Clause1 day ago
drizzle-orm19M0Apache-2.01 day ago
knex01MIT1 day ago
kysely15.6M1MIT1 day ago
@libsql/client2M1MIT1 day ago

Dependencies

Declared by better-sqlite3 v13.0.3. Runtime dependencies are installed with the package; dev dependencies are not.

Runtime (1)

node-addon-api ^8.0.0

Dev (8)

chai ^4.3.8cli-color ^2.0.3fs-extra ^11.1.1mocha ^11.7.5node-gyp ^10.3.1nodemark ^0.3.0sqlite ^5.0.1sqlite3 ^5.1.6

Used by

Popular packages that depend on better-sqlite3.

Relationship graph

Dependencies (left) and dependents (right) of better-sqlite3.

Frequently installed together

Release history

27 releases in the last two years, typically about 7 days apart.

Recent versions of better-sqlite3
VersionPublishedSizeLicense
13.0.3latest1 month ago26 MBMIT
13.0.21 month ago26 MBMIT
13.0.11 month ago26 MBMIT
13.0.01 month ago26 MBMIT
12.11.12 months ago9.9 MBMIT
12.10.12 months ago9.9 MBMIT
12.10.04 months ago9.9 MBMIT
12.9.05 months ago9.9 MBMIT
12.8.06 months ago9.8 MBMIT
12.6.27 months ago9.8 MBMIT
12.6.08 months ago9.8 MBMIT
12.5.09 months ago9.8 MBMIT
12.4.69 months ago9.8 MBMIT
12.4.59 months ago9.8 MBMIT
12.4.111 months ago9.7 MBMIT

Overview

better-sqlite3 is an npm package that the fastest and simplest library for SQLite in Node.js. It has 5 known dependents in the graph. The latest version is 13.0.3, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need the fastest and simplest library for SQLite in Node.js and value a focused solution.

When not to use it

Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.

Pros

  • Clear open-source license (MIT).

Cons

  • No bundled TypeScript types (may require a separate @types package).

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Frequently asked questions

Should I use better-sqlite3?

Yes — better-sqlite3 scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 36 days ago. 31 releases in the last 2 years.

How do I install better-sqlite3?

Run `npm install better-sqlite3` to add better-sqlite3 to your npm project.

How many dependencies does better-sqlite3 have?

better-sqlite3 declares 9 direct dependencies and pulls in 1 packages in total once its runtime tree is resolved totalling about 26 MB on disk.

What license is better-sqlite3 released under?

better-sqlite3 is distributed under the MIT license.

How popular is better-sqlite3?

npm does not publish download counts. Within PackageGraph's crawl, 5 known packages depend on better-sqlite3.

Is better-sqlite3 still maintained?

The most recent release of better-sqlite3 (v13.0.3) was published 1 month ago.

Does better-sqlite3 run install scripts?

No. better-sqlite3 does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.