Extensions

How to convert a Chrome extension to Firefox

By Adeel Khan, Senior Firefox Extension Developer

Technically reviewed by Mustafa Ahmed, Lead Firefox Extension Developer

Published 6 min read

Title card reading "Chrome extension to Firefox" with a panel of the manifest changes: extension ID, data collection declaration, background scripts and Mozilla signing.
Most of a Chrome extension runs in Firefox as it is. The work is in the manifest, a few APIs and Mozilla signing.

Search for how to convert a Chrome extension to Firefox and you mostly find converter add-ons and old forum threads. This guide is the current, step-by-step version, with every difference checked against Mozilla’s documentation. For the Manifest V3 basics, see our Manifest V3 extension guide.

Does a Chrome extension work on Firefox?

Mostly, yes. Firefox uses largely the same WebExtensions APIs and accepts chrome.* calls, so most code runs unchanged. You still need to change the manifest, replace the few Chrome-only APIs you use, and have Mozilla sign the extension before release Firefox will install it.

Mozilla’s Chrome incompatibilities page says the WebExtensions APIs aim to work across the main browsers, so extensions should run with minimal changes, but that support for APIs and manifest keys still differs. In practice the port has five parts:

What changes when you port a Chrome extension to Firefox
PartChromeFirefox
Extension IDAssigned by the Chrome Web StoreYou set it in browser_specific_settings.gecko.id
Backgroundbackground.service_workerbackground.scripts (event page)
Data collectionPrivacy answers in the store dashboarddata_collection_permissions in the manifest
Blocking requestsdeclarativeNetRequestdeclarativeNetRequest, or blocking webRequest
InstallChrome Web StoreSigned by Mozilla, listed on AMO or self-hosted

What do you change in manifest.json for Firefox?

Add browser_specific_settings.gecko with an extension ID, which Manifest V3 extensions need for signing, and a data_collection_permissions declaration, which new extensions need. Add background.scripts next to background.service_worker, because Firefox does not support extension service workers.

Step 1: Which manifest keys does Firefox need?

  • An extension ID. MDN’s browser_specific_settings page says the ID is mandatory for signing Manifest V3 extensions, and that addons.mozilla.org does not assign one for you. Pick it once and never change it.
  • A data collection declaration. Mozilla’s Extension Workshop says that from 3 November 2025, all new extensions must use Firefox’s built-in data collection consent. You list the data types in data_collection_permissions, or none.
  • Background scripts. MDN’s background page says Firefox does not support background.service_worker, but runs background.scripts even when a service worker is also listed (from Firefox 121). Chrome ignores background.scripts in a Manifest V3 extension from Chrome 121. So one manifest can list both. Chrome 120 and earlier refuse to load a Manifest V3 extension that lists background.scripts, so set minimum_chrome_version to 121 or later. Built-in data consent works from Firefox 140 on desktop and 142 on Android, which is why the sample sets strict_min_version.
manifest.json (the Firefox-relevant parts)
{
  "manifest_version": 3,
  "minimum_chrome_version": "121",
  "background": {
    "service_worker": "background.js",
    "scripts": ["background.js"]
  },
  "browser_specific_settings": {
    "gecko": {
      "id": "your-extension@example.com",
      "strict_min_version": "140.0",
      "data_collection_permissions": { "required": ["none"] }
    }
  }
}

The same background.js then runs as a service worker in Chrome and as an event page in Firefox. Avoid service-worker-only globals, and keep state in storage, as you already should for Chrome.

Step 2: Should you keep one manifest or two?

One manifest works for a simple extension. If the browsers need different permissions or keys, generate a manifest per browser at build time from one shared file. On our ports we keep Chrome and Firefox in one source tree, with the manifest keys and a thin API layer where the two browsers differ.

Should you use chrome.* or browser.* in a cross-browser extension?

Either works now. Firefox supports chrome.* with callbacks as well as browser.* with promises, and Chrome supports browser.* from Chrome 148. If you still support older Chrome versions, use Mozilla’s webextension-polyfill.

MDN’s JavaScript APIs page explains the history. Firefox has always used browser.* with promises, and as a porting aid it also supports chrome.* with callbacks. Chrome supports the browser namespace from Chrome 148 (for all extensions from Chrome 152), and Mozilla’s webextension-polyfill covers older Chrome versions.

Which Chrome extension APIs does Firefox not support?

The main gaps are chrome.sidePanel, identity.getAuthToken, the debugger API and declarativeContent. Firefox has its own sidebar_action instead of the side panel, and launchWebAuthFlow for sign-in. Check every API you call against MDN’s compatibility tables.

Chrome extension APIs and their Firefox status (MDN)
Chrome APIIn Firefox?What to do
chrome.sidePanelNoUse Firefox’s sidebar_action manifest key
identity.getAuthTokenNoUse identity.launchWebAuthFlow (desktop only)
externally_connectableNoMessage the page through a content script instead
debuggerNoNo direct equivalent
declarativeContentNoCheck the page in a content script instead
declarativeNetRequestYes, from Firefox 113Port as it is
scriptingYes, from Firefox 102Port as it is
actionYes, from Firefox 109Port as it is
userScriptsYes, from Firefox 136Check the details on MDN
tabGroupsYes, from Firefox 139Check the details on MDN

The versions come from MDN’s browser compatibility data, and the debugger and declarativeContent gaps from the Chrome incompatibilities page. Firefox for Android supports fewer APIs again; for example, launchWebAuthFlow and tabGroups are desktop only. If your extension signs users in with getAuthToken or a web page message, our Chrome extension for SaaS guide covers the alternatives.

What can a Firefox extension do that a Chrome extension cannot?

Firefox still lets any Manifest V3 extension block and change requests with webRequest, still supports Manifest V2, and has a sidebar_action key for a sidebar. Chrome supports none of these for normal store extensions.

  • Blocking webRequest. Mozilla’s add-ons blog says Firefox keeps blocking webRequest. Ad blockers and privacy tools can keep request-level logic in Firefox. Chrome allows blocking webRequest in Manifest V3 only for extensions installed by enterprise policy; everyone else uses declarativeNetRequest rules.
  • A sidebar. Firefox’s sidebar_action key, which Chrome does not support.

How do you test a Chrome extension in Firefox?

Load it temporarily from about:debugging, or run Mozilla’s web-ext tool: web-ext run starts Firefox with the extension, and web-ext lint checks the package for problems before you submit it.

Terminal
npm install --global web-ext
web-ext lint          # check the package
web-ext run           # start Firefox with the extension loaded
web-ext build         # make the zip to submit
web-ext sign          # submit for signing from the command line

Mozilla’s web-ext guide covers each command. You can also load the extension by hand from about:debugging, as a temporary add-on. Test the background script running as an event page, and host permissions the user has not granted.

Users can grant or revoke host permissions at any time, in Firefox as in most browsers, says MDN’s host_permissions page. Firefox shows them in the install prompt only from Firefox 127, and does not show new ones added in an update. Check with permissions.contains and ask with permissions.request when needed.

How do you publish a Firefox extension?

Submit it to addons.mozilla.org (AMO) for signing. You can list it publicly on AMO or have it signed for self-distribution and host the file yourself. Either way, release and beta Firefox only install signed extensions.

  • Signing is required. Mozilla’s signing and distribution overview says extensions must be signed by Mozilla before release and beta Firefox will install them, and that signing happens through AMO whether or not you list there.
  • Listed or self-distributed. List the extension publicly on AMO, or have it signed for self-distribution and host the file yourself, for example for customers or employees.
  • Readable source. If your code is bundled or minified, Mozilla’s source code submission guide explains how to give reviewers the source and build steps. On our ports we send a readable source archive, build steps and a complete data collection declaration with the first submission.

For the Chrome side of publishing, see our Chrome Web Store publishing guide.

Final takeaway

Porting a Chrome extension to Firefox is mostly manifest work plus a short list of API gaps. Keep one codebase, check every API on MDN, and plan time for Mozilla signing.

Frequently asked questions

Can I install a Chrome extension in Firefox directly?

No. Release and beta versions of Firefox only install extensions signed by Mozilla, so a package from the Chrome Web Store will not install as it is. You adjust the manifest, then have the extension signed through addons.mozilla.org.

Do I need a separate codebase for Firefox?

Usually not. Most of the code runs unchanged, so keep one source tree with a small per-browser layer: a manifest for each browser and a few wrappers where the APIs differ.

Does Firefox still support Manifest V2?

Yes. Mozilla said in March 2024 that Firefox has no plans to deprecate Manifest V2 and will support it for the foreseeable future. For a new port, Manifest V3 keeps your Chrome and Firefox code closest.

Bringing your Chrome extension to Firefox?

Send us the extension. We will map the differences, port it from the same codebase and handle signing and AMO review. See our Firefox extension development service.

Send a project brief