sql.js

JSON →
library 1.4.0 ·javascript
verified Jun 7, 2026

sql.js is a pure JavaScript SQLite library compiled with Emscripten, allowing SQL database operations directly in the browser or Node.js without native dependencies. Current stable version is 1.11.0 (as of early 2025), with regular releases. It supports full SQLite syntax, prepared statements, transaction support, and exports database as Uint8Array. Unlike native SQLite bindings (e.g., better-sqlite3), sql.js works entirely in memory and requires loading a .wasm file. It is ideal for client-side web apps, offline tools, and scenarios where native modules cannot be used. The library is MIT licensed and community-maintained.