Overview Open Chrome DevTools What's New in DevTools DevTools tips Simulate mobile devices with Device Mode Performance insights: Get actionable insights on your website's performance Lighthouse: Optimize website speed Animations: Inspect and modify CSS animation effects Changes: Track your HTML, CSS, and JavaScript changes Coverage: Find unused JavaScript and CSS CSS Overview: Identify potential CSS improvements Issues: Find and fix problems Media: View and debug media players information Memory Inspector: Inspect ArrayBuffer, TypedArray, DataView, and Wasm Memory. Network conditions: Override the user agent string Security: Understand security issues Search: Find text across all loaded resources Sensors: Emulate device sensors WebAuthn: Emulate authenticators Customize DevTools Engineering blog
Overview Open Chrome DevTools What's New in DevTools DevTools tips Simulate mobile devices with Device Mode Performance insights: Get actionable insights on your website's performance Lighthouse: Optimize website speed Animations: Inspect and modify CSS animation effects Changes: Track your HTML, CSS, and JavaScript changes Coverage: Find unused JavaScript and CSS CSS Overview: Identify potential CSS improvements Issues: Find and fix problems Media: View and debug media players information Memory Inspector: Inspect ArrayBuffer, TypedArray, DataView, and Wasm Memory. Network conditions: Override the user agent string Security: Understand security issues Search: Find text across all loaded resources Sensors: Emulate device sensors WebAuthn: Emulate authenticators Customize DevTools Engineering blog

View and change IndexedDB data

Published on

This guide shows you how to use Chrome DevTools to view and change IndexedDB data. It assumes you're familiar with DevTools. If not, see Get started. It also assumes you're familiar with IndexedDB. If not, see Using IndexedDB.

View IndexedDB data

  1. Click the Application tab to open the Application panel. Expand the IndexedDB menu to see which databases are available.

    The IndexedDB menu

    Figure 1. The IndexedDB menu

    • Database icon notes - https://mdn.github.io represents a database, where notes is the name of the database and https://mdn.github.io is the origin that can access the database.

    • Object Store icon notes is an object store.

    • title and body are indexes.

      Known Limitation Third-party databases are not visible. For example, if you use an <iframe> to embed an ad on your page, and your ad network uses IndexedDB, your ad network's IndexedDB data won't be visible. See issue #943770.

  2. Click a database to see its origin and version number.

    The 'notes' database

    Figure 2. The notes database

  3. Click an object store to see its key-value pairs.

    Caution

    IndexedDB data does not update in real-time. See Refresh IndexedDB data.

    The 'notes' object store

    Figure 3. The notes object store

    • Total entries is the total number of key-value pairs in the object store.
    • Key generator value is the next available key. This field is only shown when using key generators.
  4. Click a cell in the Value column to expand that value.

    Viewing an IndexedDB value

    Figure 4. Viewing an IndexedDB value

  5. Click an index, such as title or body in Figure 6 below, to sort the object store according to the values of that index.

    Sorting an object store by an index

    Figure 5. An object store that is sorted alphabetically according to its title key

Refresh IndexedDB data

IndexedDB values in the Application panel do not update in real-time. Click Refresh Refresh when viewing an object store to refresh its data, or view a database and click Refresh database to refresh all data.

Viewing a database

Figure 6. Viewing a database

Edit IndexedDB data

IndexedDB keys and values are not editable from the Application panel. Since DevTools has access to page context, however, you can run JavaScript code within DevTools that edits IndexedDB data.

Edit IndexedDB data with Snippets

Snippets are a way to store and run blocks of JavaScript code within DevTools. When you run a Snippet, the result is logged to the Console. You can use a Snippet to run JavaScript code that edits an IndexedDB database.

Using a Snippet to interact with IndexedDB

Figure 7. Using a Snippet to interact with IndexedDB

Delete IndexedDB data

Delete an IndexedDB key-value pair

  1. View an IndexedDB object store.

  2. Click the key-value pair that you want to delete. DevTools highlights it blue to indicate that it's selected.

    Selecting a key-value pair in order to delete it

    Figure 8. Selecting a key-value pair in order to delete it

  3. Press the Delete key or click Delete Selected Delete Selected.

    How the object store looks after the key-value pair has been deleted

    Figure 9. How the object store looks after the key-value pair has been deleted

Delete all key-value pairs in an object store

  1. View an IndexedDB object store.

    Viewing an object store

    Figure 10. Viewing an object store

  2. Click Clear object store Clear object store.

Delete an IndexedDB database

  1. View the IndexedDB database that you want to delete.

  2. Click Delete database.

    The 'Delete database' button

    Figure 11. The Delete database button

Delete all IndexedDB storage

  1. Open the Clear storage pane.

  2. Make sure that the IndexedDB checkbox is enabled.

  3. Click Clear site data.

    The 'Clear storage' pane

    Figure 12. The Clear storage pane

Updated on Improve article

We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.