A local-first, reactive NoSQL database for JavaScript apps that runs in browsers, Node.js, React Native and Electron, with replication to your own backend.
dexie/Dexie.js
A minimalistic TypeScript wrapper for IndexedDB, the browser's built-in database, with a simpler query API.
- Stars
- 14,658
- Forks
- 719
- Open issues
- 584
- Last commit
- 2 days ago
What is it?
Dexie.js wraps IndexedDB, the standard client-side database built into every modern browser, and makes it easier to define tables, write data, and run queries. Schemas are declared with a short versioned syntax, and queries use a chainable API covering indexes, ranges, filters, and bulk operations.
The library works around bugs in various IndexedDB implementations to provide more consistent behavior across browsers. It runs in pure web apps and PWAs, and is also usable in Electron desktop apps and Capacitor-based iOS and Android apps. Typings are included, and it can be loaded via npm or as a script tag.
For real-time sync, authentication, and collaboration, the project offers Dexie Cloud as a separate addon, which can be used with a hosted service or self-hosted.
Key features
- 01Chainable query API with indexes, ranges, and filters over IndexedDB tables.
- 02Versioned schema declaration using a concise string syntax.
- 03Bulk operations such as bulkPut and bulkAdd for faster writes.
- 04Works around browser-specific IndexedDB bugs for more stable behavior.
- 05Supports browsers, Electron, and Capacitor apps, with TypeScript typings included.
- 06Optional Dexie Cloud addon for sync and authentication.
Use cases
- Building offline-capable PWAs that store data locally in the browser.
- Caching API responses or user data on the client to reduce network round trips.
- Storing app data in an Electron desktop app or a Capacitor mobile app.
- Adding local-first sync to an existing web app with Dexie Cloud.
Quick start
- 1
Install Dexie via npm
npm install dexie - 2
Declare a database and table, then query it in your app code (see the Hello World example in the README)
Things to know
- Dexie wraps IndexedDB, so it only works in browser-like environments such as browsers, Electron, or Capacitor.
In collections
Topics
FAQ
- What is Dexie.js?
- A minimalistic TypeScript wrapper for IndexedDB, the browser's built-in database, with a simpler query API. Dexie.js wraps IndexedDB, the standard client-side database built into every modern browser, and makes it easier to define tables, write data, and run queries. Schemas are declared with a short versioned syntax, and queries use a chainable API covering indexes, ranges, filters, and bulk operations.
- Is Dexie.js free to use? What license does it have?
- Dexie.js is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is Dexie.js still maintained?
- Actively maintained. The last commit to Dexie.js was on Oct 21, 2026.
- What can I use Dexie.js for?
- Building offline-capable PWAs that store data locally in the browser. Caching API responses or user data on the client to reduce network round trips. Storing app data in an Electron desktop app or a Capacitor mobile app. Adding local-first sync to an existing web app with Dexie Cloud.
- How do I install Dexie.js?
- Install Dexie via npm: npm install dexie Declare a database and table, then query it in your app code (see the Hello World example in the README)
- Where can I get Dexie.js?
- The source code and installation instructions are on GitHub: https://github.com/dexie/Dexie.js
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Embeddable WASM build of Postgres packaged as a TypeScript library, running in browsers, Node.js, Bun and Deno.
Open-source serverless Postgres that separates storage and compute, with autoscaling, database branching and scale-to-zero.
Browser-based viewer and editor for Word, Excel and PowerPoint files that processes documents locally using WebAssembly.
A browser-based video subtitle workstation that edits, styles and burns subtitles into local MP4 files, with optional on-device Whisper transcription.
Offline-first desktop photo manager for macOS, Windows and Linux, with local AI search, face clustering and duplicate cleanup for large libraries.