coderef

IndexedDBBaseline · Widely available

The IndexedDB API is a local storage transactional object database.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Sep 20, 2021. Widely available since Mar 20, 2024.

Browser support

DesktopChrome
1–57Not supported
58+Supportedsince Apr 19, 2017
Current: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–50Not supported
51+Supportedsince Jan 24, 2017
Current: 157
Safari
1–14.1Not supported
15+Supportedsince Sep 20, 2021
Current: 27
MobileChrome Android
18–57Not supported
58+Supportedsince Apr 25, 2017
Current: 155
Firefox Android
4–50Not supported
51+Supportedsince Jan 24, 2017
Current: 157
Safari iOS
1–14.5Not supported
15+Supportedsince Sep 20, 2021
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

JS
const request = indexedDB.open("notes", 1);

request.onupgradeneeded = () => {
  request.result.createObjectStore("notes", { keyPath: "id", autoIncrement: true });
};

request.onsuccess = () => {
  const tx = request.result.transaction("notes", "readwrite");
  tx.objectStore("notes").add({ text: "Hello", created: Date.now() });
};

Feature detection

JS · check before using
if ("indexedDB" in globalThis) {
  // indexedDB is available
} else {
  // load a polyfill or use a fallback
}

Sub-features

Support for each part of the feature (116). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
IDBCursor241216825228
IDBCursor.advance241216825228
IDBCursor.continue241216825228
IDBCursor.continuePrimaryKey58791610.1585110.3
IDBCursor.delete241216825228
IDBCursor.direction241216825228
IDBCursor.key241216825228
IDBCursor.key.binary_keys58795110.1585110.3
IDBCursor.primaryKey241216825228
IDBCursor.request76797715767915
IDBCursor.source241216825228
IDBCursor.update241216825228
IDBCursor.worker_support24123710253710
IDBCursorWithValue241216825228
IDBCursorWithValue.value241216825228
IDBCursorWithValue.worker_support24124210254210
IDBDatabase241216825228
IDBDatabase.close241216825228
IDBDatabase.close_event30795010.1305010.3
IDBDatabase.createObjectStore241216825228
Show 96 more
Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
IDBDatabase.deleteObjectStore241216825228
IDBDatabase.name241216825228
IDBDatabase.objectStoreNames241216825228
IDBDatabase.transaction241216825228
IDBDatabase.version241216825228
IDBDatabase.versionchange_event241216825228
IDBDatabase.worker_support24123710253710
IDBFactory241216825228
IDBFactory.cmp241216825228
IDBFactory.databases7279126147212614
IDBFactory.deleteDatabase241216825228
IDBFactory.open24121615252215
IDBFactory.worker_support24123710253710
IDBIndex241216825228
IDBIndex.count241216825228
IDBIndex.get241216825228
IDBIndex.getAll48794410.1484410.3
IDBIndex.getAllKeys48794410.1484410.3
IDBIndex.getKey241216825228
IDBIndex.keyPath241216825228
IDBIndex.multiEntry241216825228
IDBIndex.name241216825228
IDBIndex.name.renaming_through_name_setter55794910.1554910.3
IDBIndex.objectStore241216825228
IDBIndex.openCursor241216825228
IDBIndex.openKeyCursor241216825228
IDBIndex.unique241216825228
IDBIndex.worker_support24123710253710
IDBKeyRange241216825228
IDBKeyRange.bound_static241216825228
IDBKeyRange.includes52794710.1524710.3
IDBKeyRange.lower241216825228
IDBKeyRange.lowerBound_static241216825228
IDBKeyRange.lowerOpen241216825228
IDBKeyRange.only_static241216825228
IDBKeyRange.upper241216825228
IDBKeyRange.upperBound_static241216825228
IDBKeyRange.upperOpen241216825228
IDBKeyRange.worker_support24123710253710
IDBObjectStore241216825228
IDBObjectStore.add241216825228
IDBObjectStore.autoIncrement247916825228
IDBObjectStore.clear241216825228
IDBObjectStore.count241216825228
IDBObjectStore.createIndex241216825228
IDBObjectStore.delete241216825228
IDBObjectStore.deleteIndex241216825228
IDBObjectStore.get241216825228
IDBObjectStore.getAll48794410.1484810.3
IDBObjectStore.getAllKeys48794410.1484810.3
IDBObjectStore.getKey48795110.1485810.3
IDBObjectStore.index241216825228
IDBObjectStore.indexNames241216825228
IDBObjectStore.keyPath241216825228
IDBObjectStore.name241216825228
IDBObjectStore.name.renaming_through_name_setter55≤184910.1554910.3
IDBObjectStore.openCursor241216825228
IDBObjectStore.openKeyCursor24794410.1254410.3
IDBObjectStore.put241216825228
IDBObjectStore.transaction241216825228
IDBObjectStore.worker_support24123710253710
IDBOpenDBRequest241216825228
IDBOpenDBRequest.blocked_event241216825228
IDBOpenDBRequest.upgradeneeded_event241216825228
IDBOpenDBRequest.worker_support24123710253710
IDBRequest241216825228
IDBRequest.error241216825228
IDBRequest.error.DOMException48≤1858✕4858✕
IDBRequest.error_event241216825228
IDBRequest.readyState241216825228
IDBRequest.result241216825228
IDBRequest.source241216825228
IDBRequest.success_event241216825228
IDBRequest.transaction241216825228
IDBRequest.worker_support24123710253710
IDBTransaction241216825228
IDBTransaction.abort241216825228
IDBTransaction.abort_event241216825228
IDBTransaction.commit76797415767915
IDBTransaction.complete_event241216825228
IDBTransaction.db241216825228
IDBTransaction.durability8383126158312615
IDBTransaction.error241216825228
IDBTransaction.error.DOMException48≤1858✕4858✕
IDBTransaction.error_event241216825228
IDBTransaction.mode241216825228
IDBTransaction.objectStore241216825228
IDBTransaction.objectStoreNames48791610.1482210.3
IDBTransaction.worker_support24123710253710
IDBVersionChangeEvent241216825228
IDBVersionChangeEvent.IDBVersionChangeEvent41792510412510
IDBVersionChangeEvent.newVersion241216825228
IDBVersionChangeEvent.oldVersion241216825228
IDBVersionChangeEvent.worker_support24123710253710
indexedDB241216825228
indexedDB.worker_support24123710253710