A Rust-based CLI tool and WebAssembly library that converts Chrome Manifest V3 extensions to Firefox-compatible format.
Live Demo: https://otsobear.github.io/chrome2moz/
Firefox natively supports chrome.* APIs, but some Chrome-only APIs don't exist in Firefox. This tool:
chrome.offscreen, chrome.declarativeContent, chrome.tabGroups)Read more: ARCHITECTURE.md covers Chrome API detection system, detection scope, and keyboard shortcuts in detail.
.crx, .zip, or unpacked directories./build-wasm.sh
cd web && python3 -m http.server 8080
# Open http://localhost:8080
Drag & drop your Chrome extension ZIP, analyze, and download the converted Firefox version.
# Install
git clone https://github.com/OtsoBear/chrome2moz.git
cd chrome2moz
cargo build --release
# Analyze
./target/release/chrome2moz analyze -i ./chrome-extension
# Convert
./target/release/chrome2moz convert -i ./chrome-extension -o ./output
# List Chrome-only APIs
./target/release/chrome2moz chrome-only-apis
Options: --report (generate report), --yes (skip prompts), --preserve-chrome (keep both namespaces)
Chrome-Only APIs → Runtime shims provided for:
- chrome.storage.session → In-memory polyfill
- chrome.sidePanel → Firefox sidebarAction
- chrome.offscreen → Web Workers/content scripts
- chrome.declarativeContent → Content script patterns
- chrome.tabGroups → No-op stub (Firefox doesn't support)
- And more... (see ARCHITECTURE.md)
Manifest Changes:
- background.service_worker → background.scripts (event page)
- Add browser_specific_settings.gecko for Firefox ID
- Separate permissions from host_permissions
- Convert web_accessible_resources format
- Handle importScripts() → Add to manifest
Firefox Compatibility Fixes:
- Automatically disables browser.management.uninstallSelf() calls
- Prevents extensions from self-destructing when detecting Firefox
- See docs/FIREFOX_SELF_UNINSTALL_FIX.md for details
about:debugging#/runtime/this-firefoxmanifest.json or .xpi fileCheck Browser Console (Ctrl+Shift+J) for any errors.
chrome.* namespace natively - no need to rewrite to browser.*Contributions welcome! See ARCHITECTURE.md for architectural details.
cargo fmt && cargo clippy && cargo test
MIT License - See LICENSE file for details.
$ claude mcp add chrome2moz \
-- python -m otcore.mcp_server <graph>