Dexie.js

active

by David Fahlander / Awarica AB · since 2014 · also known as Dexie, Dexie Cloud

The most popular IndexedDB wrapper, with live queries and an optional Dexie Cloud sync service.

documentkey-valueembedded libraryopen source (permissive)mature

Overview

Dexie.js is a thin, promise-based wrapper around IndexedDB that gives you a readable schema declaration, compound and multi-entry indexes, transactions and a fluent query API, plus liveQuery() hooks that re-run when underlying data changes. It is the pragmatic default for web apps that want local persistence without learning raw IndexedDB. Sync, authentication and access control come from Dexie Cloud, a commercial service from the same author that can also be self-hosted. Because it is still IndexedDB underneath, queries stay index-driven: no joins, aggregates or full-text search.

Strengths & trade-offs

Strengths

  • +Makes IndexedDB pleasant: concise schema, promises, compound indexes
  • +liveQuery() integrates with React, Vue, Svelte and Angular for reactive UIs
  • +Small bundle with no runtime dependencies
  • +Dexie Cloud adds sync, auth and per-realm access control without a custom backend

Trade-offs

  • −Browser-only; no native mobile story beyond WebViews
  • −Inherits IndexedDB limits: no joins, aggregates or full-text search
  • −Sync is tied to Dexie Cloud rather than an arbitrary backend

Great for

  • +Offline-capable progressive web apps
  • +Client-side caches of API data
  • +Collaborative web apps via Dexie Cloud

Think twice for

  • −Relational queries or analytics
  • −Native mobile apps
  • −Server-side storage

Capabilities

Native or official first-party support · 6 of 25 tracked

✓Transactions
✓Secondary indexes
✓JSON
✓Durable persistence
✓Role-based access
✓Offline sync
–Joins
–Full-text search
–Vector search
–Geospatial
–Change data capture
–Triggers
–Stored procedures
–Materialized views
–TTL / expiry
–Pub/Sub
–Columnar storage
–In-memory
–Compression
–Encryption at rest
–Time travel
–Branching
–Online schema changes
–Streaming ingest
–Runs in WebAssembly

Scale & consistency

Comfortable data size
Small · ≤ 100 GB
Horizontal scaling
None
Multi-region
No
Transactions
Full ACID
Consistency
Strong, Eventual
Schema
Flexible
Architecture
Embedded
Query languages
Dexie query API

Bounded by browser IndexedDB quotas.

Deployment

Self-hosted Vendor-managed cloud Serverless Embedded Edge Kubernetes operator

Ecosystem

apis & protocolsJavaScript/TypeScript API
client languagesJavaScript, TypeScript

Alternatives to Dexie.js

Compare all→
IndexedDBKey-Value31.3

The browser's built-in transactional object store, and the storage layer under most web local-first libraries.

dexie vs indexeddb →
RxDBDocument20.2

Reactive local-first NoSQL database for JavaScript with pluggable storage and replication.

dexie vs rxdb →
PouchDBDocument23.2

JavaScript database for browsers and Node that speaks the CouchDB replication protocol.

dexie vs pouchdb →
TinyBaseKey-Value18.4

Tiny reactive in-memory store for tables and values, with persisters and CRDT sync.

dexie vs tinybase →
ElectricSQLRelational30.4

Read-path sync engine that streams partial replicas of Postgres to clients over plain HTTP.

dexie vs electricsql →
PGliteRelational35.1

Real PostgreSQL compiled to WebAssembly: an embeddable Postgres for browsers, Node, Bun and Deno.

dexie vs pglite →

Dexie.js FAQ

What is Dexie.js?

Dexie.js is a document database by David Fahlander / Awarica AB, first released in 2014. Dexie.js is a thin, promise-based wrapper around IndexedDB that gives you a readable schema declaration, compound and multi-entry indexes, transactions and a fluent query API, plus liveQuery() hooks that re-run when underlying data changes. It is the pragmatic default for web apps that want local persistence without learning raw IndexedDB. Sync, authentication and access control come from Dexie Cloud, a commercial service from the same author that can also be self-hosted. Because it is still IndexedDB underneath, queries stay index-driven: no joins, aggregates or full-text search.

Is Dexie.js open source?

Yes. Dexie.js is open source. License: Apache License 2.0.

Does Dexie.js support ACID transactions?

Yes. Dexie.js supports full ACID transactions, with strong, eventual consistency.

Does Dexie.js scale horizontally?

Dexie.js does not scale horizontally; it runs on a single node, so you scale it up rather than out. It is comfortable at small scale (≤ 100 GB).

How can I run Dexie.js?

You can self-host it and embed it in your application. Managed offerings include Dexie Cloud.

What is Dexie.js best for?

Dexie.js is a strong fit for offline-capable progressive web apps, client-side caches of API data and collaborative web apps via Dexie Cloud. Think twice for relational queries or analytics.

What are the best alternatives to Dexie.js?

Common alternatives to Dexie.js include IndexedDB, RxDB, PouchDB, TinyBase and ElectricSQL. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

How popular is Dexie.js?

Dexie.js ranks #117 of 844 databases on the WhichDB Score (25.8/100), and #14 among document databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.