Export and Import Tab Snapshots as JSON
Exporting snapshots writes them to a plain JSON file you own. You can keep that file as a backup or copy it to another machine, then import it there to load the snapshots back. The file is made on your device, and nothing is uploaded.
Why it matters
Snapshots saved to your device are protected by your device. But what if your device fails or you need to move to a new machine? Export takes your snapshots and writes them to a JSON file you can save, back up, or email to yourself. It lives on your computer, not a server. You own it, you control it, and you can keep it for as long as you want.
Once you have exported, you can move that file anywhere. Copy it to a USB stick, email it to yourself, throw it in a cloud folder you control, or just keep it as a backup. When you want to restore the snapshots (whether on the same machine after a reinstall, or on a completely different machine), import the file and the snapshots load back in.
This is how you sidestep vendor lock-in. There is no account, no login, no proprietary format. Just plain JSON and your data.
How it works
Export creates a JSON file by wrapping your snapshots in an envelope. The envelope contains metadata: a format version so the importer knows what it is reading, a timestamp of when the export happened, and the array of snapshot objects. Each snapshot holds the windows and tabs exactly as they were saved, including URLs, titles, pinned states, and group information.
The file creation happens entirely in your browser. The extension builds a Blob object containing the JSON, creates a temporary download link with URL.createObjectURL(), and triggers a browser download. The file lands in your downloads folder as a plaintext JSON file. Nothing is sent to a server.
Importing works the opposite way. You select a JSON file from your computer. The extension reads it with FileReader, parses the JSON, and checks whether it is wrapped in an envelope or just a bare array of snapshots. If the format version is missing or newer than the extension understands, it warns you. It then tries to load each snapshot. If a snapshot is corrupted or incomplete, the importer skips it and reports how many it dropped.
This tolerance matters. If a file is partly corrupted or was edited by hand, you do not lose everything. The importer salvages what it can and tells you what it could not read.
What does not matter
The JSON file is unencrypted. If someone else reads the file on your computer, they can see your URLs and page titles. If you want privacy, encrypt the file yourself before storing it anywhere. The extension does not add a password or encryption; it assumes you trust the place where the file lives.
Cloud storage is fine. Dropbox, Google Drive, iCloud, whatever you use: the importer does not care where the file lives. You select it from your computer and upload it yourself. The extension never touches any cloud service; it just reads the file you give it.
Snapshots are window-specific. If you export from Windows 10, then import on Windows 11 or Mac, the snapshots import exactly as you saved them. The URL and tab data are portable; the window state (position, size) might not matter on a different monitor setup, but the tabs still open.
Code example
Here is how the extension exports snapshots to a JSON file and how it imports them back:
async function exportSnapshots(snapshots) {
const envelope = {
format: 'scalpel-tab-snapshots',
version: 1,
exportTime: new Date().toISOString(),
snapshots: snapshots
};
const json = JSON.stringify(envelope, null, 2);
const blob = new Blob([json], { type: 'application/json' });
const url = URL.createObjectURL(blob);
// Trigger download
const link = document.createElement('a');
link.href = url;
link.download = `scalpel-snapshots-${Date.now()}.json`;
link.click();
URL.revokeObjectURL(url);
}
async function importSnapshots(file) {
const text = await file.text();
const data = JSON.parse(text);
// Handle both envelope and bare array
const snapshots = data.snapshots || data;
let loaded = 0, dropped = 0;
for (const snap of snapshots) {
try {
await chrome.storage.local.set({
[`snapshot_${Date.now()}`]: snap
});
loaded++;
} catch (e) {
dropped++;
}
}
return { loaded, dropped };
}
How Scalpel Manage Tabs shows it
Scalpel Manage Tabs adds export and import buttons to the snapshots panel. Click export and your snapshots download as a timestamped JSON file. Click import and select a JSON file from your computer; the extension reads it and restores the snapshots. If any snapshots in the file fail to load, you see a count of how many were imported and how many were dropped. The JSON is self-describing. It carries its own version and export time, so you can always see when a backup was created and whether it is compatible with your current version.