View Local Storage - Web Storage Inspector

Inspect, manage, and debug localStorage data for the current domain. View keys, values, and total storage usage.

Storage Usage

0 B used
Key
Value
Size
Action
Local Storage is empty for this domain.

What is Local Storage?

Local Storage is a web storage API that allows websites to store key-value pairs in a web browser. Unlike cookies, data stored in Local Storage has no expiration date (it persists until manually deleted) and is not sent to the server with every HTTP request. This makes it ideal for storing large amounts of data (up to 5MB or 10MB) locally without affecting network performance.

Local Storage vs. Cookies vs. Session Storage

  • Cookies: Small (4KB), sent to server every request, expire. Used for auth tokens.
  • Local Storage: Large (5MB+), client-side only, persistent. Used for user preferences, themes, cached data.
  • Session Storage: Large (5MB+), client-side only, clears when tab/window closes. Used for form data preservation.

Common Use Cases

  • Theme Preference: Storing "dark mode" choice so it persists on next visit.
  • Shopping Cart: Holding cart items locally before user logs in.
  • Form Drafting: Saving partially filled forms so users don't lose work.
  • Application State: Saving the state of a Single Page Application (SPA).

Security Considerations

Local Storage is accessible by any JavaScript running on the same domain. This means it is vulnerable to Cross-Site Scripting (XSS) attacks. If an attacker can inject malicious scripts into your site, they can read everything in Local Storage.

Never store sensitive information like passwords, credit card numbers, or highly sensitive API keys in Local Storage. Session cookies with the `HttpOnly` flag are safer for authentication tokens because they cannot be accessed via JavaScript.

Managing Local Storage

Browsers provide a limit (quota) per origin, typically around 5MB. If you exceed this, the browser throws a `QuotaExceededError`. Developers must handle this error gracefully. Users can clear Local Storage by clearing their browser's "Cookies and Site Data" or using a tool like this one to inspect and remove specific items.