Overview
Many websites give their tabs long or changing titles: unread counts, notifications, or the same name on every page. That makes tabs hard to tell apart. Smart Tab Renamer lets you decide what each tab is called.
There are two ways to use it, and most people only need these:
- Rename one tab by hand. Right-click it, type a name, done.
- Write a rule. Name a website once and every tab from it is renamed for you.
The name you choose is kept when the page reloads and when the site tries to change it back. Everything else on this page is optional and can be learned one step at a time.
Install
Smart Tab Renamer needs Firefox 142 or later.
- Open the latest release on GitHub.
-
Download the file that ends in
.xpiand open it with Firefox. - Confirm when Firefox asks to add the extension.
Try it without installing
- Download or clone the source code.
-
In Firefox, open
about:debugging#/runtime/this-firefox. -
Choose Load Temporary Add-on… and select the file
manifest.json.
An add-on loaded this way is removed when Firefox is closed.
Basic Usage
Rename one tab
- Right-click the tab, or anywhere on the page, and choose Rename Tab…. You can also click the Smart Tab Renamer button in the toolbar.
- Type the name and choose Apply, or press Enter.
The name belongs to that exact page address and is used every time you open the page. To go back to the page's own title, right-click the tab and choose Clear Custom Name.
“Exact” includes anything after ? or #
in the address. When the address has such parts, the popup says so,
because the name stops applying if they change. See
exact addresses for what to do
instead.
Rename every tab from a website
A rule does the renaming for you. First open the settings page:
click the toolbar button and choose
Open all rules and settings. (You can also go to
about:addons, choose Smart Tab Renamer, then
Preferences.)
-
In Website, type the site, for example
github.com. -
In Tab title, type the title you want, for
example
GitHub. - Choose Add rule.
Every tab from that website now shows your title, including tabs that are already open. The rule appears under Your rules section.
Shortcut
To make a rule for the page you are on, right-click the tab and choose Copy Rule From Current Tab…. The settings page opens with the website and title already filled in.
Advanced Settings
Each step adds one idea, and you can stop after any of them. Steps 1 to 8 go from simplest to most advanced.
Step 1: Build a title from parts of the page
A fixed title such as “GitHub” makes every tab from the site look the same. A placeholder keeps part of the page in the title, so tabs stay different.
- Click in the Tab title field.
- Choose one of the buttons under it, such as Page title. The placeholder is added where the cursor is.
| Placeholder | Button | Replaced with | Example |
|---|---|---|---|
%title% |
Page title | The page's own title | Pull requests |
%hostname% |
Website name | The website's address | github.com |
%path% |
Page path | The part of the address after the website | /mozilla/web-ext |
%container% |
Container name | The tab's container, or “Default” | Work |
%url% |
(type it) | The full page address | https://github.com/mozilla/web-ext |
Example
The title GH: %title% turns a page titled “Pull
requests” into “GH: Pull requests”, and a page titled “Issues”
into “GH: Issues”.
Step 2: Choose exactly which pages match
A new rule matches a whole website. To match more or fewer pages, open More options in the rule form and change Match. The first field's label and example change to show what to type.
| Match | Which pages | What to type |
|---|---|---|
| A website and all its subdomains |
The site and every address in front of it, such as
jira.company.com
|
*.company.com |
| A website |
Every page on that one site, with or without
www.
|
github.com |
| Pages whose address starts with… | One section of a site | https://github.com/mozilla/ |
| One exact page | Only that address | https://mail.google.com/mail/u/0/ |
| A regular expression | Any address the expression matches. See step 8. | ^https://.*\.example\.com/ |
For the last three, type the full address, starting with
https://.
Addresses often carry URL parameters after ? or
#, and those parts change as you move around a site.
When the address you type has them, a note appears under the field
and says what the rule will and will not match:
- One exact page matches only while the whole address, including those parts, stays the same.
- Pages whose address starts with… works best with those parts left out, so that every page under the address matches.
- A website uses only the site. If you paste a whole address, the note shows which site will be used.
Step 3: Test a rule before you save it
- Fill in the rule, then open More options and find Try the rule.
- In Sample page address, paste the address of a real page.
- In Sample page title, type that page's title.
Resulting tab title shows what the tab would be called. It updates as you type, so you can adjust the title until it reads the way you want.
Step 4: Decide which rule wins
Two rules can match the same tab. Each rule has a Priority number, and the rule with the lowest number wins.
The number is set for you from the match type, so that a narrower rule beats a wider one: one exact page is 10, an address prefix is 20, a website is 30, a website and its subdomains is 40, and a regular expression is 50. You can type a different number under More options.
Example
You have a rule for the website github.com with the
title GitHub, and a rule for addresses starting with
https://github.com/mozilla/ with the title
Mozilla: %title%. Pages under
/mozilla/ match both. The second rule wins, because
its priority (20) is lower than the first rule's (30).
When two matching rules have the same priority, the one higher in the list wins. Use the ↑ and ↓ buttons to change the order.
Step 5: Give one site different names per container
If you use Firefox containers, a rule can apply to one container only. This is how you tell apart two accounts on the same website.
- Add a rule for the website as usual.
- Open More options and choose a Container.
- Add a second rule for the same website and another container.
Example
Two rules for mail.google.com: one for the container
“Work” with the title Work Mail, and one for
“Personal” with the title Personal Mail. Or use a
single rule for any container with the title
%container% Mail.
Step 6: Sort tabs into tab groups
A rule can also move its tabs into a Firefox tab group. This is off until you turn it on.
- On the settings page, under Preferences, turn on Move matching tabs into tab groups.
- Add or edit a rule, open More options, and type a Group name. Groups that are open now are suggested as you type.
- Pick a Group color and save the rule.
How grouping behaves:
- A tab joins the group with that name in its own window. The group is created if it does not exist.
- Tabs are moved when they load a page. A tab you drag out of its group stays out until it loads a page again.
- Pinned tabs are left alone, because grouping a pinned tab would unpin it.
- Tabs that match no rule are never removed from a group.
Example
To keep all work sites together without renaming them, give each
site's rule the group name Work and the title
%title%, which leaves the page's own title as it is.
Step 7: Let bookmarks name your tabs
With Use bookmark names turned on in Preferences, a page you have bookmarked takes its bookmark's name as the tab title. This happens before any rule is applied, so a bookmark's name beats a rule. It is on when you first install the extension; turn it off if you would rather have your rules decide.
Step 8: Capture part of the address with a regular expression
This is the most flexible match type, for people who are comfortable
with regular expressions. The expression is tested against the full
page address. Text captured by round brackets can be used in the
title as $1, $2, and so on up to
$9.
- Open More options and set Match to A regular expression (advanced).
- Type the expression in the first field.
-
Use
$1in Tab title where the captured text should go. - Check the result with Try the rule (step 3).
Example
Expression:
^https://jira\.company\.com/browse/([A-Z]+-\d+)
Tab title: $1 - %title%
The page https://jira.company.com/browse/PROJ-123
titled “Fix login” becomes “PROJ-123 - Fix login”.
An expression that is not valid is reported when you save the rule.
Step 9: Review your rules
Rules are listed under Your rules section. The list shows a few rules at a time and scrolls when there are more. Each rule has these controls:
- On. Untick the box to switch a rule off without deleting it.
- Edit. Loads the rule into the form. Change anything, then choose Save changes, or Cancel to leave it as it was.
- Duplicate. Makes a copy just below the rule, as a starting point for a similar one.
- ↑ and ↓. Change the order of rules that have the same priority.
- Delete. Removes the rule. Choose Undo in the message that appears to bring it back.
With many rules, use the search box and the two filters above the list to find one by its website, title, group, match type or container.
Step 10: Review manually renamed tabs
Every tab you renamed with Rename Tab… is listed on the settings page under Manually renamed tabs, below your rules.
-
Edit. Change the tab name, the page address, or
both. Press Enter or choose Save to
keep the change, or Esc to cancel. The address must be
the page's full address, beginning with
https://. - Duplicate. Opens a copy just below, ready to edit. Give the copy a different page address and choose Save. Use this to give a similar name to another page without opening it first.
- Delete. The page goes back to its own title or to a matching rule. Undo brings the name back.
- Old names are forgotten. A name for a page you have not opened for 30 days is deleted. Change the number of days, or turn this off, in Preferences.
Good to know: the whole address has to match
A manual name applies to one exact page address, including
anything after ? or #. If that part
changes, the name no longer applies.
For example, a name given to
https://docs.google.com/spreadsheets/d/xxx/edit?gid=984582641#gid=984582641
stops applying when you open another sheet in the same file,
because the number after gid= changes.
On the settings page, every address in the list that has such parts carries a short note saying so. The same note appears under the address while you edit it. Choose the i button in the note, or the one next to the description, to read this explanation there.
To name the page whatever comes after, use a rule instead: set
Match to “Pages whose address starts with…” (step 2) and enter
the part that stays the same, such as
https://docs.google.com/spreadsheets/d/xxx/.
Rule Precedence
When more than one name could apply to a tab, Smart Tab Renamer uses the first of these that exists:
- The name you gave that page with Rename Tab….
- The page's bookmark name, if Use bookmark names is on.
- The matching rule with the lowest priority number.
- The page's own title.
Preferences
Preferences are on the settings page, below the rules. A change is saved as soon as you make it.
| Preference | What it does | Starts as |
|---|---|---|
| Use bookmark names | A bookmarked page takes its bookmark's name, before any rule is applied. | On |
| Move matching tabs into tab groups | Lets a rule name a tab group and moves matching tabs into it. | Off |
| Forget old manual tab names | Deletes names for pages you have not opened for this many days. Enter 0 to keep them forever. | 30 days |
| Debug logging | Writes detailed messages to the browser console. See Troubleshooting. | Off |
Backup and reset
- Export saves your rules and preferences to a JSON file. Manually renamed tabs are not included.
- Import replaces your rules with the ones in an exported file. The file is checked first, and nothing is changed if it has a mistake in it.
- Reset deletes every rule and every manually renamed tab. You are asked to confirm first.
Troubleshooting
A tab is not renamed
- Check that the rule's On box is ticked.
- Paste the page's address into Try the rule (step 3) to see whether the rule matches it.
- Another name may be winning. See Which title wins.
- If the rule is limited to a container, check that the tab is in that container.
-
A name given with Rename Tab…, and a rule set to
One exact page, match the whole address. If the
part after
?or#has changed, they no longer match. See exact addresses. -
Firefox's own pages, whose addresses begin with
about:, and the Firefox Add-ons website cannot be renamed by any extension.
A rule's tab group does nothing
- Check that Move matching tabs into tab groups is on.
- Reload the tab. Tabs are moved when they load a page.
- Pinned tabs are never moved into a group.
A change is not saved
If a change cannot be saved, a message appears at the top of the settings page, or in the rename popup. Reload the page and try again. If it keeps happening, turn on debug logging and report it.
Collect details for a bug report
-
On the settings page, turn on Debug logging under
Preferences.
Debug logging, turned on. - Open the Browser Console with Ctrl+Shift+J (on a Mac, Cmd+Shift+J).
- Repeat what went wrong.
-
Copy the lines that begin with
[SmartTabRenamerinto a new issue on GitHub. - Turn Debug logging off again.
Debug messages include the addresses and titles of your tabs. They are written only to your own browser's console and are never sent anywhere, but read them before you share them.
| Level | Meaning | Written |
|---|---|---|
| Error | An action failed and did not complete. | Always |
| Warning | Something went wrong, but a fallback was used and work continued. | Always |
| Info | Occasional events, such as start-up or rules being reloaded. | Always |
| Debug | Step-by-step detail, such as which rule renamed a tab. | Only while Debug logging is on |
Permissions used
Each permission is needed for one part of the extension.
-
tabs: to see a tab's address and title and to set its title. -
storage: to save rules, manual names and preferences. menus: to add the right-click menu entries.-
contextualIdentities: to read container names for container rules. -
cookies: required by Firefox to tell which container a tab is in. -
bookmarks: to read bookmark names for the bookmark names option. -
tabGroups: to read tab group names and move tabs into a group. - Access to all websites: to keep the chosen title in place on any page.
Privacy
Smart Tab Renamer collects no data. It has no analytics, no tracking and loads no remote scripts. Your rules and names are kept in Firefox's own extension storage. If you use Firefox Sync, they sync between your devices through your Firefox account.
About
- Maintained by
- Naveenchandar
- Contributors
- Everyone who has contributed on GitHub
- License
- MIT License
- Feedback
- Report a problem or suggest a feature