IndexedDB
activeby W3C Web Applications Working Group (implemented by browser vendors) · since 2011 · also known as Indexed Database API, IDB
The browser's built-in transactional object store, and the storage layer under most web local-first libraries.
Overview
IndexedDB is the W3C standard API for storing structured data inside web browsers. It provides object stores keyed by primary key, secondary indexes, cursors and transactions, with values saved via the structured clone algorithm, so you can persist objects, blobs and typed arrays. Every major browser implements it, usually on top of SQLite or LevelDB internally. The raw API is verbose and event-based, so most teams use a wrapper (Dexie, idb) or a higher-level library such as RxDB or PouchDB. Storage quotas and eviction rules differ by browser, which is the main operational surprise.
Strengths & trade-offs
Strengths
- +Available in every modern browser with no dependency to ship
- +Transactional writes and indexed range queries on the client
- +Stores binary data (Blobs, ArrayBuffers) as well as objects
- +Works in Web Workers and Service Workers for offline apps
Trade-offs
- −Verbose, callback-style API that almost everyone wraps
- −Quotas and eviction behaviour differ by browser, especially Safari
- −No query language beyond key ranges; no joins or full-text search
- −Schema changes require version bumps handled in upgrade callbacks
Great for
- +Offline caches for progressive web apps
- +Storage backend for local-first JavaScript libraries
- +Persisting large client-side datasets and files
Think twice for
- −Complex queries or reporting
- −Data that must never be evicted without user consent
- −Server-side storage
Capabilities
Native or official first-party support · 3 of 25 tracked
Scale & consistency
- Comfortable data size
- Small · ≤ 100 GB
- Horizontal scaling
- None
- Multi-region
- No
- Transactions
- Full ACID
- Consistency
- Strong
- Schema
- Flexible
- Architecture
- Embedded
- Query languages
- IndexedDB API (key ranges and cursors)
Capacity is a per-origin browser quota; data can be evicted unless persistent storage is granted.
Deployment
Ecosystem
Alternatives to IndexedDB
The most popular IndexedDB wrapper, with live queries and an optional Dexie Cloud sync service.
indexeddb vs dexie →Reactive local-first NoSQL database for JavaScript with pluggable storage and replication.
indexeddb vs rxdb →JavaScript database for browsers and Node that speaks the CouchDB replication protocol.
indexeddb vs pouchdb →Real PostgreSQL compiled to WebAssembly: an embeddable Postgres for browsers, Node, Bun and Deno.
indexeddb vs pglite →The in-process SQL engine that ships in every phone, browser and OS: one file, zero servers.
indexeddb vs sqlite →Tiny reactive in-memory store for tables and values, with persisters and CRDT sync.
indexeddb vs tinybase →IndexedDB FAQ
What is IndexedDB?
IndexedDB is a key-value database by W3C Web Applications Working Group (implemented by browser vendors), first released in 2011. IndexedDB is the W3C standard API for storing structured data inside web browsers. It provides object stores keyed by primary key, secondary indexes, cursors and transactions, with values saved via the structured clone algorithm, so you can persist objects, blobs and typed arrays. Every major browser implements it, usually on top of SQLite or LevelDB internally. The raw API is verbose and event-based, so most teams use a wrapper (Dexie, idb) or a higher-level library such as RxDB or PouchDB. Storage quotas and eviction rules differ by browser, which is the main operational surprise.
Is IndexedDB open source?
Yes. IndexedDB is open source. License: W3C Royalty-Free standard (browser implementations vary).
Does IndexedDB support ACID transactions?
Yes. IndexedDB supports full ACID transactions, with strong consistency.
Does IndexedDB scale horizontally?
IndexedDB 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 IndexedDB?
You can embed it in your application.
What is IndexedDB best for?
IndexedDB is a strong fit for offline caches for progressive web apps; storage backend for local-first JavaScript libraries; and persisting large client-side datasets and files. Think twice for complex queries or reporting.
What are the best alternatives to IndexedDB?
Common alternatives to IndexedDB include Dexie.js, RxDB, PouchDB, PGlite and SQLite. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.
How popular is IndexedDB?
IndexedDB ranks #78 of 844 databases on the WhichDB Score (31.3/100), and #13 among key-value databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.