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:
.mhtml, selected SingleFile captures as .html, or a ZIP bundle containing all selected snapshot data and local artifactsWhen 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:
snapshots/YYYYMMDD/example.com/{uuid}/chrome_extension_screenshot/screenshot.pngsnapshots/YYYYMMDD/example.com/{uuid}/chrome_extension_mhtml/snapshot.mhtmlsnapshots/YYYYMMDD/example.com/{uuid}/chrome_extension_singlefile/snapshot.htmlScreenshots 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.
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.
>= v0.8.5: users of the new BETA releases can use an API key generated at /admin/api/apitoken/ instead.archivebox config --set PUBLIC_ADD_VIEW=True
# (make sure to restart the server after if you apply this change)
http://localhost:8000, https://archivebox.example.com, etc.)Save to ArchiveBox, or by clicking the extension icon in the menubar.✨ 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 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.
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.
tjhorner/archivebox-exporter to Archivebox/archivebox-browser-extension:dev brancharchivebox-exporter extensionOther browser extensions that also do web archiving which may be a better fit if ArchiveBox doesn't suit your needs.
.html file, built-in to ArchiveBox already)Other projects that help with ingest URLs into ArchiveBox from various sources.
MIT License