# sql-js/sql.js

A javascript library to run SQLite on the web.

Repository: https://github.com/sql-js/sql.js
Canonical: https://ross.abutalabs.com/products/sqljs
Homepage: http://sql.js.org
Language: JavaScript
License: NOASSERTION
License Family: other
Topics: sql, javascript, database, emscripten, wasm, sqlite
Last push: 2026-08-14T18:15:39+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 74, longevity 100
- inputs: {"age_days": 5301, "days_push": 19, "days_rel": 19, "gap_med": 150.0, "n_releases_24m": 5}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 13657, forks 1111 (observed 2026-08-28T04:11:04.488069+00:00)

## What it is
sql.js is SQLite compiled to WebAssembly (and JavaScript via Emscripten), allowing you to create and query relational databases entirely in the browser or Node.js. It operates on an in-memory virtual database file, with support for importing existing SQLite files and exporting the database as a typed array.

## Use cases
- run SQL queries in the browser without a server
- parse and query a sqlite file client-side
- embed a relational database in an Electron app without native bindings
- teach SQL with an in-browser interactive demo
- load a sqlite database into memory and export it as a typed array
- query data offline in a web app

## When to choose
- you need SQL in a browser or sandboxed environment with no native SQLite access
- your database is small enough to fit in memory
- you want to import/export sqlite files as byte arrays in JavaScript
- you need a pure-JavaScript SQLite for compatibility with older browsers

## When to avoid
- you are in Node.js or Electron and can use a native binding like better-sqlite3 or sqlite3 for speed and file access
- you need persistent on-disk database storage
- your database is large and may cause out-of-memory errors when loaded fully into memory

## Facets
- artifact type: library
- maturity: stable
- function: database, database-driver, wasm
- domain: databases, web-development, developer-tools
- platform: browser, cross-platform, wasm
- tags: sqlite, in-memory-database, emscripten, sql, client-side-database, nodejs

## Member repositories
- sql-js/sql.js (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:04.488069+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:13:08.198706+00:00, confidence not recorded.
  - readme: https://github.com/sql-js/sql.js (fetched 2026-08-28T04:11:04.488069+00:00, sha 67b665f54533)
  - homepage: http://sql.js.org (fetched 2026-08-29T08:08:03.146304+00:00, sha 36b0b1fe9738)
  - registry_npm: https://registry.npmjs.org/sql.js (fetched 2026-08-29T08:08:03.155661+00:00, sha 2d8cd0324d70)
- Data as of 2026-08-30T08:39:29.467469+00:00.
