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.
Exact message you may see
exceeded the quota
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 not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- 126 incorrect key file MySQL ERROR 126 (HY000): Incorrect key file for table; try to repair it
- auth/popup-closed-by-user Firebase Auth: auth/popup-closed-by-user / auth/popup-blocked / auth/cancelled-popup-request
- AuthenticationFailed Azure Storage: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature (AuthenticationFailed)
Most viewed in JavaScript
- TypeError TypeError: Cannot read properties of undefined (reading 'x')
- Failed to fetch TypeError: Failed to fetch / NetworkError when attempting to fetch resource
- module MIME type Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html"
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 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.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Did this fix work for you?
Report a correction or suggest an improvement
Last updated 14 Oct 2026