ArchiveBoxBrowser Extensions

🗃 ArchiveBox Browser Extension

This is a browser extension that lets you send individual browser tabs or all URLs matching certain patterns to your ArchiveBox instance for offline preservation. This has a couple of benefits:

Get the Extension

Screenshots

Browse all screens →

Saved URLs

The gallery is captured from the current extension on every commit to main, at desktop, tablet, and mobile sizes. It includes the browser store listings, popup, Saved URLs, Configuration, Cookies, and populated bookmark and history imports.

Recent Changes

Local Captures

When local capture saving is enabled in the options page, the extension stores capture artifacts in the browser's extension-local OPFS storage before the popup is shown:

Screenshots are shown as thumbnails in the Saved URLs table when at least one saved URL has a screenshot, and can be exported as PNG from the Export menu. MHTML and SingleFile HTML snapshots can also be exported from the same menu. The ZIP export includes the selected CSV/JSON metadata plus local artifacts under the same snapshots/YYYYMMDD/example.com/{uuid}/... paths used in OPFS. When a SingleFile HTML or MHTML snapshot is available, the Saved URLs table title opens an extension-local framed viewer for that snapshot.

In Configuration, After saving on server, remove local copies after defaults to 30 days; you can choose 1 minute, 1 day, 30 days, 90 days, or never. The clock starts (or restarts) when the server confirms a successful submission, including queued jobs. Cleanup runs approximately once a minute while the browser is running and checks again on startup. It removes the local Saved URLs entry, capture files, and snapshot metadata, without deleting the server copy.

Cleanup requires access to the same server that accepted the submission and a fresh API response confirming the exact snapshot ID and URL. Offline, unauthenticated, missing, and unverifiable server snapshots stay local. Captures/uploads in progress are left until a later check. Existing records without a recorded submission time and destination stay local until successfully resubmitted. Shared cookie profiles and browser history/bookmarks are independent data and are not removed.

MHTML capture uses Chromium's pageCapture.saveAsMHTML() extension API and is available in Chrome / Edge / Chromium builds. Firefox and Safari builds still save the URL and screenshot where the browser supports tab capture, but skip MHTML capture because the page capture API is not available there.

SingleFile HTML capture uses the SingleFile browser extension through its external capture API. The first request opens SingleFile's options page so the user can approve or deny ArchiveBox as an allowed caller, then subsequent captures can run silently and save the returned HTML into ArchiveBox's local OPFS snapshot tree.

Setup

  1. Set up an ArchiveBox server and make sure it's accessible to the machine you're browsing on
  2. Configure your ArchiveBox server to allow URL submissions without requiring login (more info here...)
    >= v0.8.5: users of the new BETA releases can use an API key generated at /admin/api/apitoken/ instead.
    Alternatively: if you stay signed in to your ArchiveBox instance in the same browser, it will share your login credentials.
    archivebox config --set PUBLIC_ADD_VIEW=True
    # (make sure to restart the server after if you apply this change)
    
    Screenshot of ArchiveBox CLI configuring PUBLIC_ADD_VIEW=True
  3. Configure the extension to point to your ArchiveBox server's base URL (e.g. http://localhost:8000, https://archivebox.example.com, etc.) Extension configuration
  4. Test it out by right-clicking on any page and selecting Save to ArchiveBox, or by clicking the extension icon in the menubar. ArchiveBox popup

Development

✨ Originally contributed by TJ Horner (@tjhorner), now maintained by @benmuth and the ArchiveBox team.

If you wish to contribute to (or just build for yourself) this extension, you will need to download and install Node.js and pnpm.

git clone https://github.com/ArchiveBox/archivebox-browser-extension
cd archivebox-browser-extension/

pnpm install
pnpm compile
pnpm build
pnpm build:edge
pnpm build:firefox
pnpm build:safari

For local development:

pnpm dev           # Chrome / Chromium
pnpm dev:edge      # Edge
pnpm dev:firefox   # Firefox
pnpm dev:safari    # Safari WebExtension build

For a production-style local build, load .output/chrome-mv3 into Chrome / Chromium using the Load Unpacked Extension UI, load .output/edge-mv3 into Edge using edge://extensions, load .output/firefox-mv3 into Firefox using about:debugging, or load .output/safari-mv3 in Safari with Settings → Developer → Add Temporary Extension.

To verify local retention with real server responses and the real one-minute clock, start a disposable ArchiveBox server without archive workers (so submissions remain queued), build the extension, and run:

ARCHIVEBOX_TEST_SERVER=http://127.0.0.1:18763 \
ARCHIVEBOX_TEST_KEY_FILE=/path/to/disposable-server-api-key \
node scripts/test-retention-live.mjs

The live test imports bookmarks through the options UI, submits them, checks disconnected/missing-server preservation, verifies OPFS and metadata deletion, restarts the service worker, and waits for automatic expiration after resubmission. It creates server test records and deletes one of its own records to test a missing snapshot; use a disposable collection. UI default/persistence and layout checks run with pnpm exec playwright test tests/retention.test.ts tests/options-responsive.test.ts.

The extension website renders this README directly. Edit this file to change the site’s text; there is no second copy to maintain.

Every push to main runs the Extension website and screenshots workflow. It builds the extension, captures its screens in a disposable browser profile with populated saved URLs, cookies, bookmarks, and history, then publishes the README and screenshot gallery together. Pull requests build the same artifact without deploying. The gallery records the source revision and capture time.

To reproduce the site locally:

pnpm exec playwright install chromium
pnpm build
pnpm screenshots
pnpm site:build --baseurl /archivebox-browser-extension/

GitHub Pages must use GitHub Actions as its publishing source. Capture or validation failures stop deployment so an incomplete gallery cannot replace the current site. Generated screenshots and site output are build artifacts, not committed files.

To create store upload bundles:

pnpm zip
pnpm zip:edge
pnpm zip:firefox
pnpm zip:safari

To submit store uploads with WXT, add the store credentials to .env using .env.example as the template, then run the matching submit script:

pnpm submit:chrome
pnpm submit:edge:dry-run
pnpm submit:edge
pnpm submit:firefox

Edge publishing uses WXT's Microsoft Edge Add-ons API support. Set EDGE_PRODUCT_ID from the Partner Center extension dashboard, plus the API credentials in EDGE_CLIENT_ID and EDGE_API_KEY.

All browser-side code, including Safari's optional native-connection reader, lives here. Safari can use a manually configured server/key pair or automatically read the ArchiveBox app's connection when those fields are empty. Its persona selector stays independent of the native share sheet. Other browsers configure their own connection and do not request native-messaging permission.

The native iOS/macOS apps, share extensions, Safari Swift handler, signing, and packaging live in ios-archivebox. That repo bundles this repo's unmodified Safari build output.

Safari publishing is not handled by wxt submit. Build the Safari WebExtension output, then convert/package it for macOS and iOS/iPadOS with Apple's Safari Web Extension tooling:

pnpm convert:safari

For App Store/TestFlight distribution, upload the generated Xcode app project through App Store Connect, or use Apple's Safari Web Extension Packager flow.

Please open an issue to discuss any proposed changes before starting work on any PRs.

Changelog


Alternative Extensions for Archiving

Other browser extensions that also do web archiving which may be a better fit if ArchiveBox doesn't suit your needs.

Other ArchiveBox Helper Projects

Other projects that help with ingest URLs into ArchiveBox from various sources.


License

MIT License