QuotaExceededError: Failed to execute 'setItem' on 'Storage': Setting the value exceeded the quota
localStorage/sessionStorage is full (about 5 MB per origin) or storage is disabled.
Seen on:
JavaScript
Meaning
Large cached data, base64 images, or Safari private mode (quota 0) trigger it.
Common causes
- Storing large data/base64 images
- Accumulated old keys never cleaned up
- Safari private browsing / storage blocked
⚡ Quick fix
- Store large data in IndexedDB instead
- Clean up old keys
- Wrap setItem in try/catch
Detailed fix by platform
JavaScript
try { localStorage.setItem(k, v); } catch (e) { console.warn('Storage full', e); }
How to diagnose
- Size — How much is stored?
- Mode — Private browsing?
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026