This WebExtension enhances Firefox tab groups with powerful automation features. It automatically merges duplicate groups, suggests smart grouping by domain, and lets you create rules to organize tabs automatically.
- Watches for new tab groups or group rename events through the
tabGroupsAPI. - When a group is created or renamed, it looks for another group in the same window with the identical title that already has tabs.
- If it finds a match, the extension moves the new group's tabs into the existing group and lets Firefox remove the now-empty duplicate group automatically.
- Waits a moment after you finish typing the name (press Enter) before merging, so partial titles like
testdo not immediately collide withtesting. - Retries briefly when Firefox reports the new group before its tabs are attached, ensuring the merge still happens.
- Open
about:debugging#/runtime/this-firefoxin Firefox. - Click Load Temporary Add-on….
- Choose the
manifest.jsonfile from this project. - The extension will now run until you restart Firefox.
Version 2.0.0 adds customizable settings. To access them:
Quick access: Click the extension icon in the toolbar to open the settings popup directly below the icon.
Alternative methods:
- Right-click the extension icon in the toolbar and select Manage Extension (or go to
about:addons). - Click the Preferences button (or the gear icon) to open the full settings page in a new tab.
Note: If you don't see the extension icon, right-click the toolbar and select Customize Toolbar, then drag the extension icon to your preferred location.
Available settings:
- Enable automatic group merging: Toggle the extension on or off. When disabled, duplicate groups will not be merged.
- Debounce time: Adjust how long the extension waits (in milliseconds) after you finish typing a group name before checking for duplicates. Default is 1200ms. Higher values give you more time to type longer names without triggering merges.
Settings are saved automatically and sync across your Firefox devices if you have sync enabled.
The popup includes a "Group by Domain" section that analyzes your open tabs and suggests grouping tabs from the same website together.
How it works:
- Click the extension icon to open the popup.
- The extension scans all open tabs and identifies domains (e.g.
youtube.com,facebook.com) with ungrouped tabs. - Each suggestion shows the domain name and tab count.
- Click Group to create a new tab group, or Add to "GroupName" if a matching group already exists.
Smart matching: The extension checks for existing groups with similar names (case-insensitive). For example, if you have a group named "YouTube", "youtube", or "youtube.com", new YouTube tabs will be added to that group instead of creating a duplicate.
Example: If you have 4 YouTube tabs, 3 Reddit tabs, and several one-off tabs, the extension suggests grouping YouTube and Reddit. If you already have a "YouTube" group, the button will say "Add to YouTube" instead of "Group".
Note: Only ungrouped tabs appear in suggestions. Domains need 2+ ungrouped tabs to show up, unless there's already a matching group (then even 1 tab can be added).
You can set up rules to automatically group tabs from specific domains. For example, automatically send all YouTube tabs to a "YouTube" group.
How to create a rule:
- Click the extension icon to open the popup.
- In the "Auto-Group Rules" section, enter a domain pattern (e.g.
youtubeorgithub.com) and a group name. - Click Add Rule.
How rules work:
- When you open a new tab or navigate to a URL, the extension checks if it matches any rule.
- If a match is found, the tab is automatically moved to the specified group.
- If the group doesn't exist, it's created automatically.
- Rules are matched case-insensitively and support partial matches (e.g.
youtubematchesyoutube.com). - Only the first matching rule is applied.
- You can toggle rules on/off or delete them from the popup.
Example rules:
| Pattern | Group Name | Effect |
|---|---|---|
youtube |
YouTube | All youtube.com tabs → "YouTube" group |
github |
Dev | All github.com tabs → "Dev" group |
docs.google |
Docs | All Google Docs tabs → "Docs" group |
- Works alongside the native tab grouping UI—just create or rename groups as usual.
- Names are de-duplicated per window. If you intentionally reuse a name in a different window, the tab will stay there.
- Only groups that already contain tabs are considered the "source of truth"; empty duplicates are ignored.
- Check the Browser Console (
Ctrl+Shift+J) for diagnostic logs prefixed with[BetterTabGroups]if you need to troubleshoot.
- Requires Firefox 139 or newer for the
tabGroupsAPI. - Background script lives in
background.js. - Update
manifest.jsonas needed (e.g. version bumps, icons, localization).
- Prepare assets:
- Supply at least a 128×128 PNG icon and list it under the
iconsfield inmanifest.json. - Gather screenshots (1280×800 or larger) to showcase the extension.
- Supply at least a 128×128 PNG icon and list it under the
- Bump the
versioninmanifest.jsonwhenever you upload a new package. - Install
web-ext(npm install -g web-ext) and runweb-ext lintto catch validation issues locally. - Create a distributable archive with
web-ext build(output lives inweb-ext-artifacts/). - Confirm
browser_specific_settings.gecko.data_collection_permissions.requiredreflects your data practices (set to["none"]if you do not collect data). - Visit addons.mozilla.org/developers, start a new submission, and upload the generated
.zip. - During submission, provide a unique name, description (you can adapt this README), and privacy policy if required.
- Wait for AMO review. Once approved, Firefox users can install the published version directly from AMO.
For self-hosted signing, add your own browser_specific_settings.gecko.id (e.g. better-tab-groups@yourdomain.com) before running web-ext sign.