Browser-side helper for exporting and re-importing localStorage data during debugging, QA, migration, and repro workflows.
When you need to reproduce a bug, move browser state between environments, or inspect app storage without copying keys one by one, this script gives you a quick in-page utility.
It runs directly in the browser console and opens a small overlay that can:
- export every
localStoragekey from the current page origin as JSON - copy the exported JSON to your clipboard
- import a previously exported JSON payload into the current page origin
- clear
localStoragewith an explicit confirmation step
- QA and bug reproduction
- moving non-sensitive test state between local, staging, and preview environments
- validating how a frontend behaves with a known
localStoragepayload - inspecting browser-side state during development
The script only works in the page context where you run it. If you want to move state between two apps or environments, run it once on the source page to export the JSON, then run it again on the destination page to import the JSON there.
- Open the target page in your browser.
- Open DevTools.
- Paste the contents of
copy_localstorage.jsinto the console. - Use the overlay to export or import data.
- This is designed for development and troubleshooting workflows.
- Only use it on apps and environments you own or are authorized to test.
- The exported payload is plain JSON, so treat it carefully if it contains sensitive application state.

