Introduction
When developing a web app, I often need to test with multiple accounts, such as an administrator and a regular user. And when regular users have several permission levels, the number of account types grows even more.
I used to go through “log out → log in with another account” every time I switched. It quietly ate up time and broke my rhythm, which got stressful.
Why I Didn’t Use an Existing Tool
If you’ve ever looked for “a tool to switch browser cookies,” you know there are a few options out there. What bothered me, though, was trust.
Cookies contain login session IDs. That means if a tool that handles cookies were malicious, it could in theory use that data to break into your accounts.
With closed-source tools, you can’t check what’s inside. I just couldn’t get comfortable using a tool while being unable to answer the question “Is this tool safe?”
What I Built: Switch Browser Data
So I decided to build one myself. One of the goals was to publish the code as open source so that anyone can look inside and check it.
Switch Browser Data is a Chrome / Edge extension that saves snapshots of browser data per domain and lets you switch between them with one click.
It supports the following data:
| Data type | What it holds |
|---|---|
| Cookie | Login sessions and the like |
| localStorage | Data stored persistently in the browser |
| sessionStorage | Data that disappears when the tab is closed |
| IndexedDB | Structured data storage |
All data is stored only on your device and is never sent anywhere.
How to Use It
1. Save a Snapshot
While logged in, open the popup, enter a snapshot name, and save. Naming them per account, like “Admin” or “Regular user A,” makes them easy to manage.
2. Switch with One Click
Just pick the snapshot you want from the dropdown. Reload the page, and that account’s state is restored.
Data is managed per domain, so it doesn’t affect other services’ data.
Source Code
The code is public on GitHub.
https://github.com/istb16/switch-browser-data-extension
It’s under the MIT license. Feel free to use it to see how it works or to verify that it doesn’t do anything suspicious.
Summary
- Switch between multiple accounts with one click, without “log out → log in”
- Cookies include login sessions, so I decided I needed a tool I could trust and built my own
- It’s open source, so you can read the code and check that it’s safe
- Works on both Chrome and Edge, and all data is stored locally
Related Posts
I Used Only dev-orchestra's Review to Show My Local Changes to Several AIs
How to use only dev-orchestra's review, without its design and implementation stages. With three commands, review snapshot, review run and review show, I had Claude and Codex review a local branch. I also cover how to choose --base, the options I use most, and using it to review blog posts.
I Had dev-orchestra Review the Whole Change Once More at the End
I tried the closing review of the whole change (review.whole_change_recheck) added in dev-orchestra 1.3.0 on a small Python package. After a fix-only round came back with nothing, the whole-change round found one clash between the fix and the earlier change. With a fix that clashed on purpose, the fix-only round caught it first.
[Released] dev-orchestra: Start the Review While the Tests Run v1.3.1
A roundup of dev-orchestra v1.3.1. The code review can now start without waiting for the tests to finish (off by default). Plan approval now defaults to auto, which skips the approval when nobody is watching, such as in CI, and the conditions are met. Claude write runs now start with only the tools they use and no MCP servers.