Skip to content
PluginStats

sqlocal weekly downloads statistics

By DallasHoff · npm · Vite plugins

SQLocal makes it easy to run SQLite3 in the browser, backed by the origin private file system.

View on npm Fresh · Dec 6, 2026

sqlocal has 8,501 recorded weekly downloads on npm, a decrease of 7.4% over the past 30 days, ranking #1336 of 3,247 tracked listings.

Weekly downloads
8,501
Official API · Dec 5, 2026
7-day growth
-25.2%
-2.9K weekly downloads
30-day growth
-7.4%
-675 weekly downloads
90-day growth
+32.4%
+2.1K weekly downloads
Rank
#1336
▼ 142 in 7 days

About sqlocal

SQLocal

SQLocal makes it easy to run SQLite3 in the browser, backed by the origin private file system. It wraps the WebAssembly build of SQLite3 and gives you a simple interface to interact with databases running on device.

Documentation - GitHub - NPM - Fund

Features

  • 🔎 Locally executes any query that SQLite3 supports
  • 🧵 Runs the SQLite engine in a web worker so queries do not block the main thread
  • 📂 Persists data to the origin private file system, which is optimized for fast file I/O
  • 🚀 Simple API; just name your database and start running SQL queries
  • ⚡️ Subscribe to query results and receive changes, even across tabs
  • 🔒 Each user can have their own private database instance
  • 🛠️ Works with Kysely and Drizzle ORM for making type-safe queries
  • 🤝 Get set up quickly with hooks for UI frameworks and a Vite plugin

Examples

import { SQLocal } from 'sqlocal';

// Create a client with a name for the SQLite file to save in
// the origin private file system
const { sql } = new SQLocal('database.sqlite3');

// Use the "sql" tagged template to execute a SQL statement
// against the SQLite database
await sql`CREATE TABLE groceries (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT)`;

// Execute a parameterized statement just by inserting 
// parameters in the SQL string
const items = ['bread', 'milk', 'rice'];
for (let item of items) {
  await sql`INSERT INTO groceries (name) VALUES (${item})`;
}

// SELECT queries and queries with the RETURNING clause will
// return the matched records as an array of objects
const data = await sql`SELECT * FROM groceries`;
console.log(data);

Log:

[
  { id: 1, name: 'bread' },
  { id: 2, name: 'milk' },
  { id: 3, name: 'rice' }
]

Or, you can use SQLocal as a driver for Kysely or Drizzle ORM to make fully-typed queries.

Kysely
import { SQLocalKysely } from 'sqlocal/kysely';
import { Kysely, Generated } from 'kysely';

// Initialize SQLocalKysely and pass the dialect to Kysely
const { dialect } = new SQLocalKysely('database.sqlite3');
const db = new Kysely<DB>({ dialect });

// Define your schema 
// (passed to the Kysely generic above)
type DB = {
  groceries: {
    id: Generated<number>;
    name: string;
  };
};

// Make type-safe queries
const data = await db
  .selectFrom('groceries')
  .select('name')
  .orderBy('name', 'asc')
  .execute();
console.log(data);

See the Kysely documentation for getting started.

Drizzle
import { SQLocalDrizzle } from 'sqlocal/drizzle';
import { drizzle } from 'drizzle-orm/sqlite-proxy';
import { sqliteTable, int, text } from 'drizzle-orm/sqlite-core';

// Initialize SQLocalDrizzle and pass the driver to Drizzle
const { driver } = new SQLocalDrizzle('database.sqlite3');
const db = drizzle(driver);

// Define your schema
const groceries = sqliteTable('groceries', {
  id: int('id').primaryKey({ autoIncrement: true }),
  name: text('name').notNull(),
});

// Make type-safe queries
const data = await db
  .select({ name: groceries.name })
  .from(groceries)
  .orderBy(groceries.name)
  .all();
console.log(data);

See the Drizzle ORM documentation for declaring your schema and making queries.

Install

Install the SQLocal package in your application using your package manager.

npm install sqlocal
# or...
yarn add sqlocal
# or...
pnpm install sqlocal
Cross-Origin Isolation

In order to persist data to the origin private file system, this package relies on APIs that require cross-origin isolation, so the page you use this package on must be served with the following HTTP headers. Otherwise, the browser will block access to the origin private file system.

Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin

How this is configured will depend on what web server or hosting service your application uses. If your development server uses Vite, see the configuration below.

Vite Configuration

Vite needs some additional configuration to handle web worker files correctly. If you or your framework uses Vite as your build tool, you can use SQLocal's Vite plugin to set this up.

The plugin will also enable cross-origin isolation (required for origin private file system persistence) for the Vite development server by default. Just don't forget to also configure your production web server to use the same HTTP headers.

Import the plugin from sqlocal/vite and add it to your Vite configuration.

import { defineConfig } from 'vite';
import sqlocal from 'sqlocal/vite';

export default defineConfig({
  plugins: [sqlocal()],
});

Description from the npm listing.

  • browser
  • sqlite
  • sql
  • database
  • wasm
  • opfs
  • worker
  • vite-plugin
  • drizzle
  • kysely

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

sqlocal weekly downloads on npm, last 90 days: 8,501 weekly downloads as of Dec 5, 2026, +32.4% over 90 days.sqlocalWeekly downloads on npm · Last 90 days8,501downloads / week+32.4% over 90 days02K4K6K8K10K12K14KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
sqlocal weekly downloads on npm, last 90 days: 8,501 weekly downloads as of Dec 5, 2026, +32.4% over 90 days.

7/30/90-day growth

sqlocal weekly downloads growth on npm: -25.2% over 7 days, -7.4% over 30 days, +32.4% over 90 days.sqlocalWeekly downloads growth on npm8,501downloads / week now7-day growth-2,869 weekly downloads-25.2%30-day growth-675 weekly downloads-7.4%90-day growth+2,079 weekly downloads+32.4%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
sqlocal weekly downloads growth on npm: -25.2% over 7 days, -7.4% over 30 days, +32.4% over 90 days.

Ranking history

sqlocal npm ranking history: currently #1336 (by weekly downloads).sqlocalnpm ranking · by weekly downloads · Last 90 days#1336current rank#1000#1050#1100#1150#1200#1250#1300#1350Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
sqlocal npm ranking history: currently #1336 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 67, #16 (overall #1,336)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 13, #7 (overall #247)
Vite plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for sqlocal
Date (UTC)Weekly downloadsChange vs. previous
8,501-1.1K
9,610-354
9,964-144
10,108-669
10,777+22
10,755-568
11,323-47
11,370-196
11,566+200
11,366-924
12,290+152
12,138+568
11,570+772
10,798—

Similar npm Vite plugins plugins

All 20 sqlocal alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/sqlocal. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.