Description
SQLocal is a JavaScript library for running SQLite3 inside the browser, with data stored in the origin private file system (OPFS). It is meant for web developers building local-first apps who want a real SQL database on the client. You name a database and start running queries; any query SQLite3 supports runs locally. The SQLite engine runs in a web worker, so queries do not block the main thread, and OPFS is designed for fast file access. You can subscribe to query results and get updates when data changes, even across browser tabs, and each user can have their own private database instance. For type-safe queries it works with Kysely and Drizzle ORM, and it offers hooks for UI frameworks plus a Vite plugin. It is released under the MIT License.…
Highlights
- Runs any SQLite3 query in the browser
- Engine runs in a web worker off the main thread
- Data persisted to the origin private file system
- Reactive query subscriptions that work across tabs
- Works with Kysely and Drizzle ORM, with a Vite plugin
Ratings & Reviews
No ratings yet
Be the first to rate Sqlocal.
People also visit
Sqlocal FAQ
What is SQLocal?
A library that runs SQLite3 in the browser and stores the database in the origin private file system, so web apps can keep a full SQL database on the user's device.
Will queries slow down my UI?
SQLocal runs the SQLite engine in a web worker, so queries do not block the main thread.
Can I use it with an ORM?
Yes. It works with Kysely and Drizzle ORM for type-safe queries, and has TypeScript support.
Can my UI react to data changes?
Yes. You can subscribe to query results and receive changes, including changes made in other tabs.
What is the license?
SQLocal is released under the MIT License, with the source on GitHub.
What are the best Sqlocal alternatives?
Popular alternatives to Sqlocal include Air SQLite Manager and SQLite. See all Sqlocal alternatives




