Skip to main content

↑ ↓ to moveEnter to open

LocalStorage Test

Your Local Storage

Detecting…

Session Storage
Detecting…
IndexedDB
Detecting…

Test if localStorage is available and writable in your browser. Find out why web storage fails in private mode, and how much data sites can store.

Last updated

How to use this test

  1. Open this page. The Live Result shows whether localStorage is available.
  2. Compare it with sessionStorage and IndexedDB below. If all three are unavailable, your browser is blocking site data entirely.
  3. Repeat the test in a private window to see how private browsing affects storage.

What is it?

localStorage lets websites persist key-value data on your device with no expiration date. It is used for themes, drafts, and offline caches.

How it works

The tool does not just check whether window.localStorage exists. It writes a test value, reads it back and then removes it. This catches the cases where the API exists but throws an error, such as when storage is full, blocked by browser settings, or disabled in some embedded browsers. localStorage stores text as key-value pairs for each website and keeps it after you close the browser, unlike sessionStorage.

Why this matters

Apps that remember your preferences rely on localStorage. Private browsing modes may restrict or clear it when the session ends.

Practical Use Cases

  • Finding out why a web app forgets your settings every time you visit.
  • Developers checking storage availability before relying on it for saved state.
  • Diagnosing errors in embedded browsers, kiosks or locked-down corporate machines.

How to check manually

Chrome / Edge DevTools

Press F12 → Application tab → Storage → Local storage, and select the site to see every stored key and value.

Firefox DevTools

Press F12 → Storage tab → Local Storage.

Browser console

Type localStorage.setItem("test", "1"); localStorage.getItem("test") and press Enter. It should return "1".

Common values

LabelValue
AvailableYes
UnavailableNo

Troubleshooting

localStorage unavailable in private mode
Some browsers disable storage APIs in private/incognito mode. Use a normal browsing window.

Frequently asked questions

How much data can localStorage hold?

Most browsers allow around 5 MB per website. When the limit is reached, writing throws a QuotaExceededError. For larger data, use IndexedDB.

Does localStorage work in incognito or private mode?

Yes, in current browsers, but the data is deleted when you close the private window. Very old versions of Safari threw an error on every write in private mode.

Is localStorage secure?

Data is only readable by the website that stored it, but any script running on that site can read it. Never store passwords or authentication tokens in localStorage.

How do I clear localStorage?

Clearing "Cookies and other site data" in your browser settings also clears localStorage. To clear one site only, use the site settings (padlock icon in the address bar) or the DevTools Application tab.

What is the difference between localStorage and cookies?

Cookies are sent to the server with every request and are limited to about 4 KB each. localStorage stays in the browser, holds around 5 MB, and is only read by JavaScript on the page.

Explore more diagnostics

Visit the DeviceScope homepage for a complete live dashboard, or browse all browser checks & tests.