bookmarklet.one

Clear Local Storage Bookmarklet

Clear localStorage for the current site in one click. See how many keys will go before you confirm. Free bookmarklet, no extension or DevTools needed.

Clear Local Storage
← Drag this button to your bookmarks bar.Click it here to try it on this page first.

On a phone? Use Copy code, then save it as a bookmark's URL — step-by-step guide.

Web Dev Debugging PrivacyUpdated 2026-11-27Free · No extension · Runs locally

Clear Local Storage deletes every localStorage entry for the site you are on. Before anything is removed, it tells you how many keys exist, how much data they hold and lists the first few key names, so you can back out if you clicked the wrong bookmark.

It is built for front-end developers and QA testers who keep resetting app state: onboarding flows that only show once, feature flags cached in the browser, stale auth tokens, cart data or A/B test buckets. Instead of opening DevTools, finding the Application tab and right-clicking the origin, you click one bookmark and confirm.

Only the current origin is touched. Cookies, sessionStorage, IndexedDB and other sites stay exactly as they are, which makes it safer than the browser's "clear site data" button when you only want a clean localStorage.

What it does

  • Counts the localStorage keys for the current origin and estimates their size
  • Shows up to 15 key names in a confirmation dialog before deleting anything
  • Calls localStorage.clear() only after you confirm
  • Confirms the result with a small on-page message (or tells you storage was already empty)
  • Leaves cookies, sessionStorage and IndexedDB untouched

How to install the Clear Local Storage bookmarklet

  1. Show your bookmarks bar. Press Ctrl+Shift+B on Windows/Linux or Cmd+Shift+B on a Mac (Chrome, Edge, Brave, Firefox). In Safari choose View › Show Favorites Bar.
  2. Drag the blue button above onto the bar. That's it — the bookmark now holds the code.
  3. Open any website and click the bookmark to run it on that page. Click it again to close it.

Can't drag (phone, tablet, locked-down browser)? Copy the code below, create any bookmark, then edit it and paste the code as its URL. See how to add a bookmarklet in every browser.

How to use it

  1. Open the site or web app whose saved state you want to reset.
  2. Click Clear Local Storage in your bookmarks bar.
  3. Read the key count and names in the dialog, then press OK to delete or Cancel to keep them.
  4. Reload the page so the app starts again without its saved data.

When clearing localStorage helps

Many single-page apps read settings from localStorage on startup, so a reload after clearing is what actually shows the "fresh install" experience. If the app writes its keys back immediately (some do on every page load), clear and then reload without interacting. Remember that localStorage is per origin: www.example.com and app.example.com have separate storage, so run the bookmarklet on each. If you want to inspect or keep some keys, use Local Storage Explorer instead and delete rows one by one.

Bookmarklet code

This is the exact code inside the button above (1,803 characters). It runs only in your browser and sends nothing to us. Paste it into the Bookmarklet Decoder to read it formatted.

Frequently asked questions

Does this log me out of websites?

Only if the site keeps its login token in localStorage. Sites that use cookies for sessions will keep you signed in.

Can I undo it?

No. Cleared localStorage cannot be restored, which is why the bookmarklet asks for confirmation first. Export the data with Local Storage Explorer if you might need it.

Does it clear storage for other sites?

No. JavaScript can only reach the storage of the page's own origin, so other sites and subdomains are not affected.

Related bookmarklets

Browse localStorage and sessionStorage in a clean table with sizes and pretty JSON. Copy or delete single keys and export…

Wipe sessionStorage for the current tab in one click and see how many keys were removed. A free bookmarklet for testing…

Delete all JavaScript-visible cookies for the current site, across every path and domain variant, and see how many were…

See the cookies a page can read in a clean table: name, decoded value, size and JWT payloads, with copy buttons. Free…