Storage & Files

IndexedDB

Probing…

IndexedDB is a web platform capability in the Storage & Files category. Transactional object database for large structured data. Supported in Chromium 24+, Firefox 16+, and Safari 10+.

Try it

Loading demo…

Code

const db = await new Promise((resolve, reject) => {
  const req = indexedDB.open('shwcs-demo', 1)
  req.onupgradeneeded = () => req.result.createObjectStore('records', { keyPath: 'key' })
  req.onsuccess = () => resolve(req.result)
  req.onerror = () => reject(req.error)
})

const tx = db.transaction('records', 'readwrite')
tx.objectStore('records').put({ key: 'greeting', value: 'hello' })

Browser support

Chromium
24
Firefox
16
Safari
10

Frequently asked questions

Which browsers support IndexedDB?

Supported in Chromium 24+, Firefox 16+, and Safari 10+.

Does IndexedDB require HTTPS?

No. IndexedDB works without a secure context, though serving your site over HTTPS is always recommended.

What is IndexedDB used for?

Transactional object database for large structured data.

Can I try IndexedDB in my browser?

Yes. shwcs.net runs a live IndexedDB demo that probes your current browser and lets you try the API. Everything runs locally — nothing is sent anywhere.

MDN reference ↗ Specification ↗ caniuse ↗