No Login Data Private Local Save

Browser Storage Quota Estimator - Online Check Limit

12
0
0
0

Browser Storage Quota Estimator

Instantly analyze your browser's storage quotas across LocalStorage, SessionStorage, IndexedDB, and Cache API.

Total Storage (estimate API)
--
Quota available
Used: -- Free: --
Checking...
LocalStorage
--
of ~10 MB
Keys: 0 Free: --
Typical: 5-10 MB
SessionStorage
--
of ~10 MB
Keys: 0 Free: --
Typical: 5-10 MB
IndexedDB + Cache
--
of --
Databases: -- Free: --
Dynamic quota
Storage Type Comparison
Storage Type Persistence Typical Quota API Current Usage Status
LocalStorage Permanent 5-10 MB window.localStorage -- OK
SessionStorage Per session 5-10 MB window.sessionStorage -- OK
IndexedDB Permanent Dynamic (up to disk space) indexedDB.open() -- OK
Cache API Permanent Dynamic (shared with IDB) caches.open() -- --
Cookies Configurable 4 KB per cookie / ~80 cookies document.cookie OK
Browser Information
  • Browser: --
  • Platform: --
  • Language: --
  • Cookies Enabled: --
  • Do Not Track: --
  • Storage Estimate API: --
  • Cache API: --
Quick Tips
  • LocalStorage quota is per origin (protocol + domain + port).
  • IndexedDB quota is dynamic — browsers may grant up to 60-80% of free disk space.
  • Mobile browsers (iOS Safari) may have stricter limits and may evict data under storage pressure.
  • Use navigator.storage.estimate() to query available quota programmatically.
  • Cache API and IndexedDB share the same quota pool in most browsers.
  • LocalStorage and SessionStorage have separate, fixed quotas (usually 5-10 MB each).
Frequently Asked Questions

Browser storage quota refers to the maximum amount of data a website can store in the user's browser. This limit exists to prevent websites from consuming excessive disk space and to protect user privacy. Different storage types (LocalStorage, IndexedDB, Cache API) have different quota rules. Understanding these limits is crucial for web developers building offline-capable apps, PWAs, or applications that handle large datasets client-side.

Chrome & Edge: LocalStorage up to 10 MB per origin; IndexedDB can use up to 60% of free disk space (shared with Cache API).
Firefox: LocalStorage up to 10 MB; IndexedDB can use up to 50% of free disk space, with a global limit of 2 GB per origin for "best-effort" storage.
Safari (Desktop): LocalStorage up to 5-10 MB; IndexedDB quota is around 1 GB per origin, but data may be evicted after 7 days of inactivity.
Safari (iOS): LocalStorage capped at 5 MB; IndexedDB limited and may be cleared under storage pressure.
Note: Quotas are not guaranteed — browsers may evict data when disk space runs low.

LocalStorage has a fixed, small quota (typically 5-10 MB per origin) that is enforced synchronously — attempting to exceed it throws a QuotaExceededError. IndexedDB, on the other hand, has a dynamic quota that scales with available disk space and is shared with the Cache API. IndexedDB is designed for larger datasets and supports asynchronous operations, making it the preferred choice for significant client-side data storage.

Use the navigator.storage.estimate() API to query storage usage and quota. This returns a Promise with {quota, usage} in bytes, covering IndexedDB and Cache API storage. Example:
const {quota, usage} = await navigator.storage.estimate();
console.log(`Used: ${(usage/1e6).toFixed(1)} MB of ${(quota/1e6).toFixed(1)} MB`);
For LocalStorage, you must manually calculate usage by iterating over keys and measuring string sizes using new Blob([value]).size.

When you exceed the quota:
LocalStorage / SessionStorage: A DOMException: QuotaExceededError is thrown immediately. The write operation fails and no data is stored.
IndexedDB: The transaction fails with an AbortError or QuotaExceededError. Some browsers may trigger a permission prompt asking the user to grant more storage.
Cache API: The cache.put() operation rejects with a quota-related error. Older cache entries may be evicted automatically to make room.
Always wrap storage operations in try-catch blocks to handle these errors gracefully.

Yes. Mobile browsers, especially iOS Safari, enforce stricter storage limits due to limited device storage. iOS Safari limits LocalStorage to 5 MB and may aggressively evict IndexedDB data when the device is low on space. Android Chrome is more generous but still subject to disk space constraints. PWAs installed on the home screen may request persistent storage via navigator.storage.persist() to reduce the risk of eviction.

You can request persistent storage by calling navigator.storage.persist(). If granted, the browser will prioritize keeping your data and may increase the quota. This is especially useful for PWAs. Note that persistent storage requires user interaction and is not guaranteed. Some browsers (like Chrome) may also trigger a quota increase prompt when you approach the limit during an IndexedDB write operation.

  • Choose the right storage: Use LocalStorage for small key-value data (<5 MB); IndexedDB for larger structured data; Cache API for network resources.
  • Monitor usage: Regularly call navigator.storage.estimate() to track consumption.
  • Handle errors: Always catch quota errors and inform users gracefully.
  • Clean up: Remove outdated or unnecessary data periodically.
  • Use compression: Compress large data before storing to maximize available quota.
  • Request persistence: For critical data, call navigator.storage.persist() to reduce eviction risk.
  • Test across browsers: Always verify storage behavior in Safari, especially on iOS.