Get to know MDN better
Since May 2024, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Note: This feature is available in Web Workers.
The databases method of the IDBFactory interface returns a Promise that fulfills with an array of objects containing the name and version of all the available databases.
This is a snapshot of the databases, intended primarily to allow web applications to check what databases have been created — in order to, for example, clean up databases created by earlier versions of application code.
None.
A Promise that fulfills with an array of objects representing a snapshot of the available databases (or rejects with the error/exceptions below).
Each array object has the following properties:
nameA database name.
versionThe database version.
Note that the sequence on the returned objects is undefined.
Thrown if the method is called from an opaque origin or the user has disabled storage.
UnknownError DOMExceptionThrown if the set of available databases cannot be determined for any reason.
This example creates/opens a number of databases. On successful initialization of each database it lists all the available databases.
First we define the function that is used to get and log the available databases. This awaits on the promise returned by indexedDB.databases() and then iterates the array and lists the values of each element:
To demonstrate how the above function is used, below we create two databases. For each database, we log just before the database is opened. We also log on successful initialization (or error) and then also log the available databases.
The result is shown below. Note that the time taken to get the databases and their order is undefined.
| Indexed Database API 3.0 # ref-for-dom-idbfactory-databases① |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Jun 23, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.