sqlite3 WebAssembly & JavaScript Documentation Index

3 min read Original article ↗

This site is home to the documentation for the SQLite project's WebAssembly- and JavaScript-related APIs, which enable the use of sqlite3 in modern WASM-capable browsers.

Cookie/storage disclaimer: this site requires a modern, JavaScript-capable browser for full functionality. This site uses client-side storage for persisting certain browsing preferences (like the bright/dark mode toggle) but its server does not process, nor transfer to any other entity, any user-level information beyond certain SCM-side display-related preferences and the credentials of logged-in developers.

Site Overview

About the sqlite3 WASM subproject:

Making use of this project:

About this documentation:

In the Wild

Third-party projects known to be using this project include (in order of their addition to this list)...

  • SQLime provides a database browser interface.
  • Evolu Evolu is a local-first platform designed for privacy, ease of use, and no vendor lock-in.
  • SQLiteNext provides a demo of integrating this project with next.js.
  • sqlite-wasm-esm demonstrates how to use this project with the Vite toolchain.
  • sqlite-wasm-http provides an SQLite VFS with read-only access to databases which are served directly over HTTP.

(In the order in which we became aware of them...)

  • Alon Zakai's sql.js is the first known direct usage of sqlite3 in a web browser, dating back to 2012, not counting WebSQL (which was a native-level feature and has long since been removed from browsers).
  • Roy Hashimoto's wa-sqlite is home to the first known implementation of OPFS storage of sqlite3 databases. It is also the home of much innovation regarding JS-side SQLite VFSes.
  • James Long's absurd-js demonstrates storing sqlite3 databases inside IndexedDB databases.
  • postgres-wasm runs a Postgres database server in a browser.
  • Jaccwabyt is a small JS library for manipulating WASM-hosted C structs via JS code, created specifically to support the OPFS sqlite3_vfs implementation in this project. This project embeds a copy but does not expose it to client applications.
  • CoWasm is "Collaborative WebAssembly for Servers and Browsers". Their demo app includes a WASM build of the sqlite3 shell application.
  • absurder-js is Nicholas G. Piesco's re-imagining of absurd-js. See also: his announcement of it on the SQLite forum.
  • sqlite-wasm-rs provides Rust SQLite bindings for wasm32-unknown-unknown builds.

Third-party Documentation and Articles

The following links reference articles and documentation published about SQLite WASM by third parties: