Undo Closed Tab in Firefox: Shortcut, History Menu and the Undo Close Tab Add-on

Ashwin Karthik
Updated •
Firefox

To undo a closed tab in Firefox, press Ctrl + Shift + T on Windows and Linux or Command + Shift + T on a Mac. Firefox reopens the last tab you closed, and each extra press brings back the tab closed before it. To pick one specific tab from a list, open History > Recently Closed Tabs or Firefox View, or install the Undo Close Tab add-on.

This guide covers every built-in way to reopen closed tabs in Firefox, what "undo close tab" actually means, and how the free Undo Close Tab extension turns the feature into a clickable list on the toolbar and in the right-click menus.

What does undo close tab mean?

Undo close tab is the browser command that reopens a tab you closed, as if the close never happened. Firefox keeps a short list of recently closed tabs in the current session, and the command restores the newest entry from that list. The restored tab comes back at its old address, so you can continue where you left off.

The command works in order of recency, like an undo stack. If you closed six tabs and need the first of them, you press the shortcut six times and reopen all six on the way. That is why a list view, either in the History menu, in Firefox View or through an add-on, is faster when the tab you want is not the last one you closed.

Undo close tab is different from restoring a previous session. Session restore brings back all windows and tabs from the last time Firefox was running, while undo close tab reopens single tabs during the session you are in now.

How to undo a closed tab in Firefox with the keyboard

The keyboard shortcut is the fastest way to undo a closed tab in Firefox, and it is the same command that Chrome uses. Follow these steps:

  1. Switch to the Firefox window where you closed the tab.
  2. Press Ctrl + Shift + T (Windows, Linux) or Command + Shift + T (macOS).
  3. Press the shortcut again to reopen the tab closed before that one; repeat as needed.

Two related shortcuts are worth remembering:

Action Windows and Linux macOS
Undo close tab Ctrl + Shift + T Command + Shift + T
Undo close window Ctrl + Shift + N Command + Shift + N
Show all history Ctrl + Shift + H Command + Shift + H

Mozilla lists all of them on its Firefox keyboard shortcuts page. If you prefer the mouse, right-click a tab and use the reopen closed tab entry in the tab context menu. Our Firefox Tab Mastery guide collects more tab tips.

How to reopen a specific closed tab from History or Firefox View

Firefox lists your recently closed tabs in two places, so you can reopen any one of them without cycling through the rest. The History menu is the classic route:

  1. Open the History menu from the menu bar (press Alt on Windows if the menu bar is hidden) or from the application menu.
  2. Hover over Recently Closed Tabs.
  3. Click the tab you want, or choose Restore All Tabs to bring back the whole list.

Firefox View is the newer option. Click the Firefox View button at the left end of the tab strip, or choose View All Tabs from the tab list menu at the right end of the tab strip, then open the Recently closed section. Click an entry to reopen it, or click the X next to it to remove it from the list. With Firefox Sync turned on, Firefox View also shows tabs from your other devices. Mozilla documents both views in its Firefox View help article.

If the tab is no longer in either list, open the Library with Ctrl + Shift + H and search your browsing history for the page title or address.

Undo Close Tab add-on: a clickable list of recently closed tabs

Undo Close Tab is a free Firefox extension by Manuel Reimer that puts the undo command and a list of closed tabs on a toolbar button. It is published on Mozilla's add-on site under the GPL 3.0 license and asks for only two permissions: access to recently closed tabs and access to browser tabs.

Undo Close Tab toolbar button with its list of recently closed tabs in Firefox

The extension works in two ways:

  • Left-click the toolbar button to reopen the last closed tab, the same as the keyboard shortcut.
  • Right-click the button to open a list of recently closed tabs and click the one you want back.

The list shows up to 25 entries, and longer lists move older items into a "More items" submenu. Note the name: the add-on is called Undo Close Tab, not Undo Closed Tab, which keeps it apart from the built-in Firefox command. The extension also runs on Firefox for Android (details in the FAQ below).

Undo Close Tab Firefox extension options page

How to set up the Undo Close Tab add-on

Undo Close Tab is most useful when you add its list to the right-click menus, so you never need to reach for the toolbar. Set it up like this:

  1. Install the extension from addons.mozilla.org and pin its button to the toolbar if Firefox hides it in the extensions menu.
  2. Open about:addons, select Undo Close Tab and open its options.
  3. Enable the list in the tab context menu, the page context menu, or both.
  4. Set how many closed tabs the menu should show.

The page context menu is the menu you get when you right-click inside a web page. With the list there, reopening a tab is one right-click and one click, which is faster than the toolbar for most people.

Undo Close Tab list of closed tabs in the Firefox page context menu

The add-on can only show what Firefox remembers. If you want the full 25 entries, open about:config and check that browser.sessionstore.max_tabs_undo is set to 25 or higher, as the developer recommends on the add-on page. If the button stops working after a Firefox bug, the developer advises resetting the browser session. For saved sets of tabs that survive a restart, a session manager such as Tab Session Manager is the better tool.

Undo closed tab in Chrome and other browsers

Undo closed tab uses the same shortcut in Google Chrome: Ctrl + Shift + T on Windows and Linux, Command + Shift + T on a Mac, per Google's Chrome shortcut list. Each press restores the next tab in order of recency, just as in Firefox. Most Chromium-based browsers keep this shortcut, so it is the first thing to try in any desktop browser. On phones the steps differ: see our guide to restoring closed tabs in Chrome for Android.

FAQ

How do I reopen a closed Firefox window?

Press Ctrl + Shift + N on Windows and Linux or Command + Shift + N on a Mac. The window comes back with all the tabs it had when you closed it.

How do I make Firefox remember more closed tabs?

The number is set by the about:config preference browser.sessionstore.max_tabs_undo. Raise it if you often need tabs you closed a while ago.

Does the Undo Close Tab add-on work on Firefox for Android?

Yes. On Android the extension adds an Undo Close Tab entry to the Firefox menu instead of a toolbar button.

Related: Tab groups in Firefox, Bookmark all open tabs in Firefox, The best Firefox add-ons

Comments

  1. George said on
    Reply

    Firefox: re-inventing the browser wheel in 2019… and it’ll never work as good as it used to.

  2. IowaMan said on
    Reply

    nice that Vivaldi already has this built into the browser with an icon at the top right of open tabs

  3. Peterc said on
    Reply

    I maintain the most recent version of Firefox with a modest complement of extensions as a fallback browser but almost never use it because of (in my view) inadequate extension functionality and a tendency to snoop in the absence of up-to-date countermeasures. My primary browser is still Pale Moon with a full complement of extensions, including Tab Mix Plus.

    I’ve configured Tab Mix Plus to reopen an accidentally closed tab by double-clicking pretty much anywhere on the Tab Bar that isn’t a function button (e.g., a Close Tab Button). It’s faster and easier than using Undo Close Tab in a tab context menu or doing Ctrl-Shift-T. Click-click and the tab reopens.

    If I have to reopen a somewhat older closed tab, I use Tab Mix Plus’s “Display Closed Tabs List” toolbar button.

    As for History, it’s my primary means of finding and revisiting older tabs/webpages, but even though I display the Menu Bar (like John Fenderson, above) in both Pale Moon and Firefox, I use Ctrl-Shift-H to get there. Actually, I probably use History more often than Tab Mix Plus’s closed tabs list, at least for tabs that weren’t closed *very* recently, since I can filter out the chaff in its Search History bar.

    It’s encouraging that Firefox is beginning to regain a small part of the functionality it lost when it ended support for old-school extensions, but from what I’ve seen so far, WebExtensions are still only pale, incomplete approximations. I prefer the powerful, pre-WebExtensions implementations of Tab Mix Plus, Session Manager, DownThemAll, Downloads Statusbar, MozArchiver, and the like because they make browsing considerably faster, easier, and more convenient for me. I know I’m in the minority and that Pale Moon might be living on borrowed time. But I find solace in the closing dialog of “Blade Runner” (1982):

    [Gaff:] It’s too bad she won’t live. But then again, who does?

    [Deckard :] Gaff had been there, and let her live. Four years, he figured. He was wrong. Tyrell had told me Rachael was special: no termination date. I didn’t know how long we had together. Who does?

  4. Malte said on
    Reply

    I just put the recent history icon in the toolbar. No need to install an addon. In Firefox go to -> customize and drag & drop the “clock icon” where you want it.

  5. Anonymous said on
    Reply

    I have absolutely no idea why this isn’t even a standard feature on all web browsers in 2019 when Opera Presto had it for decades, half a decade ago. Just madness.

  6. owl said on
    Reply

    This add-on is one of my favorites!
    Previously, it used Hotkeys (Shift + ctrl + T) and “history” function.
    Therefore, when I first saw (discovered) this add-on, I felt it as like “Junk” extension.
    However, according to the user review, it was highly rated as “Users: 33905, 5 ★: 179” and “Recommended” badge was also given, so I decided to give it a try.

    The conclusion:
    The correct judgment cannot be made unless it is actually used.
    With this add-on, everything is just a “one-click” away.
    “Decisive advantage” is that you don’t need to combine several keys (shift + ctrl + T) or click 2-3+ times.

    I prefer “open in new tabs” browsing, the number of tabs is usually around “50” and may exceed “100”.
    The bookmark function and the speed dial (FVD) function are also used, but browsing with separate tabs makes “comparison verification and related searches” easy and exciting.
    In order to open a lot of tabs:
    ● Tree style tab: Group management by tab hierarchy … etc
    ● Auto Tab Discard: The tab in the background is automatically paused by any timer setting, and memory in tab units is suppressed.
    ● Clear Cache: One click releases the browser cache
    ● Undo Close Tab: The last closed tab can be restored with one click, and the closed tab can be selected and restored from the “List of history menu” provided in the add-on.
    ● In addition, an add-on “Bookmarks Organizer” that can detect and delete or correct duplicate bookmarks or broken links is useful.
    For such a use, an add-on that can complete its purpose with just one click is very useful.

    Whether it is useful depends on how user of use it and values.
    And the evaluation of this add-on is of course the highest rating of “★★★★★”.

  7. Yoav said on
    Reply

    At this rate, by 2040, we will have 50 addons that together provide all the functionalities that Tab Mix Plus gave to Firefox users back in 2010.

    How will we ever be able to thank Mozilla enough for trashing Firefox?

    1. owl said on
      Reply

      Why Firefox Had to Kill Your Favorite Extension | How-To Geek(Justin Pot | November 18, 2017, 6:40am EDT )
      https://www.howtogeek.com/333230/why-firefox-had-to-kill-your-favorite-extension/

      1. Yoav said on
        Reply

        Yeah, I get why this was done. I just think it was a bad decision. I mean, what’s the benefit of having a chrome browser called “Firefox”? And where’s the fun in creating such a limited clone and developing for it?

      2. owl said on
        Reply

        WebExtensions API is a specification standard for “protecting the browser’s core program”.
        WebExtension API has nothing to do with “extension safety measures”.

        In measures against cyber attacks and personal information protection, browser vulnerability countermeasures have become an issue:
        Prevention of browser “core program” tampering,
        Measures to prevent historical data leakage,
        Measures against malware hidden in updates,
        Measures against privacy policy violations,
        etc.
        Based on those perspectives, Mozilla decided to abolish the “XUL” API, which can be directly involved in the program, and switch to the “WebExtension” API, which cannot be involved in the core program.

        What’s the WebExtensions API? | Browser Extensions – Mozilla | MDN |
        https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions

        Firefox’s WebExtension API is separate from the Chromium’s WebExtension API and is not just a subset. Many Firefox-specific APIs have been established:
        Browser support for JavaScript APIs – Mozilla | MDN |
        https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs

        A Classic Extension Reborn: Tree Style Tab – Mozilla Hacks – the Web developer blog
        Interview with an add-on developer (Piro) who rebuilt a very complex extension (Tree Style Tab) created on the legacy XUL platform for the new WebExtensions API
        https://hacks.mozilla.org/2017/12/webextension-tree-style-tab/

        Want more technical detail? Check out Piro’s post WebExtensions Migration Story of Tree Style Tab for his strategies, code snippets, and architectural diagrams of the XUL and WebExtensions platforms.
        WebExtensions Migration Story of Tree Style Tab | Piro’s post
        https://piro.sakura.ne.jp/latest/blosxom/mozilla/extension/treestyletab/2017-10-03_migration-we-en.htm

        About “malicious incidents such as tricks”:
        It is time to get rid of Stylish | gHacks Tech News
        https://www.ghacks.net/2018/07/03/it-is-time-to-get-rid-of-stylish/
        Stylus sees large user increase after Stylish removal | gHacks Tech News
        https://www.ghacks.net/2018/07/09/stylus-sees-large-user-increase-after-stylish-removal/

        A wave of malware add-ons hit the Mozilla Firefox Extensions Store | gHacks Tech News
        https://www.ghacks.net/2019/05/29/another-malware-wave-hit-the-mozilla-firefox-extensions-store/
        Reprinted the main part from the article:
        Malicious or spam extensions that use the names of popular extensions or programs are not anything new. Mozilla’s AMO store was hit with waves of spam extensions in 2017 and 2018, both happened after Mozilla switched the release process.
        Google’s Chrome Web Store was hit even harder by unwanted extensions in recent years. Chrome’s popularity and the fact that Google does not review any extensions manually by default play a role here.
        While it is easy to spot these particular fake extensions, others may not be as easy to spot. Back in 2017 I suggested Mozilla add a “manual reviewed” batch to extensions to give Firefox users more confidence in the legitimacy of extensions on the official add-ons repository.

        About “waves of spam extensions in 2017”:
        Mozilla’s AMO Extensions store has a spam infestation problem | gHacks Tech News
        https://www.ghacks.net/2017/12/13/mozillas-extensions-store-has-a-spam-infestation/

        About “waves of spam extensions in 2018”:
        Another wave of spam add-ons hits Mozilla Firefox AMO | gHacks Tech News
        https://www.ghacks.net/2018/04/09/another-wave-of-spam-add-ons-hits-mozilla-firefox-amo/

        About “Google’s Chrome Web Store was hit even harder by unwanted extensions in recent years”:
        Another Chrome extension horror story: coinhive and domain registration | gHacks Tech News
        https://www.ghacks.net/2017/10/15/another-chrome-extension-horror-story-coinhive-and-domain-registration/
        Google’s bad track record of malicious Chrome extensions continues | gHacks Tech News
        https://www.ghacks.net/2018/05/11/googles-bad-track-record-of-malicious-chrome-extensions-continues/
        Malicious Chrome extensions with Session Replay appear in Chrome Store | gHacks Tech News
        https://www.ghacks.net/2018/02/05/malicious-chrome-extensions-with-session-replay-appear-in-chrome-store/

      3. John Fenderson said on
        Reply

        @owl:

        We are all very aware of Mozilla’s reasoning for this action. Restating the reasons yet again doesn’t eliminate the fact that doing so seriously reduced the usefulness of the browser for a lot of people because of the lost functionality.

      4. owl said on
        Reply

        Append,
        About posting to Comments:
        I post with awareness of the presence of viewers.
        In other words, for comments that should not be left unattended, I add a reply to prevent misunderstandings and prejudice from spreading.
        This reply to @Yoav and @John Fenderson is also for people reading this topic (Undo Close Tab is an add-on that displays a clickable list of recently closed tabs in Firefox).

      5. owl said on
        Reply

        @John Fenderson said on September 24, 2019 at 5:35 pm
        > We are all very aware of Mozilla’s reasoning for this action.

        Perhaps it is “an old knowledge fact” for the old regulars of this site (Ghacks.net).
        However, the end user base is wide. Constantly, new beginner users are increasing in snowball style.
        Posting to this site is just the “top of the iceberg”.

        This site is not a closed world of membership:
        About gHacks
        Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.

        Old and young men and women around the world are browsing this site. The viewer’s skills are not uniform.
        I have been involved in several community forums for many years. From that experience, I realize that “common sense” and “degree of understanding” vary from person to person.

        It may be “I know”.
        But may not know.
        It may also be “misunderstood”.
        This perspective must always be kept in mind.

        John Fenderson, a programmer and experienced, is knowledgeable. But not everyone is on the same level as John Fenderson.

        What is expected of this site:
        ● The latest news and commentary,
        ● Introduction and explanation of software, etc.
        ● Providing emergency information,
        ● Skill exchange and sharing via this site

        Since it is a cyber space where hate and fake news are flooding, how to engage in “Comments” is important in order to share the truth.
        The important point is not the deepen relatives of the intellectuals, but the approach to misunderstood people and ignorant people.

      6. Jonas said on
        Reply

        I agree… and also, reducing the allowable functionality of _all_ extensions was a lazy substitute for what Mozilla should have done: continue to allow XUL, but screen individual extensions for security/privacy issues.

        After screening, Moz could have either banned from their web store extensions that failed the tests, or they could have left them up but only given a “checked OK by Moz” kind of badge to the ones that proved safe. Of course they would have to re-screen later updates to the extensions too, since malware can creep in to updates.

        Moz has a substantial budget. My suggestion would require their technical staff to actually do useful work (instead of their usual B.S.), which I guess is too much to ask.

  8. Dwight Stegall said on
    Reply

    Recent History extension for Chrome is very similar.

  9. Anonymous said on
    Reply

    Every built in function need an extension! I guess next we will get extension to close tab

  10. Rick said on
    Reply
  11. rickmv said on
    Reply

    Another good add-on is Tab2List. It combines history, closed tabs, search and save list of open tabs.

    Firefox have add-ons. The other one has extensions…

  12. Amir said on
    Reply

    @Ashwin; Its great addon indeed. Would you also please review https://addons.mozilla.org/en-US/firefox/addon/hd-quality-toggle-for-youtube if its best or you know better than that? Thank you.

  13. Q said on
    Reply

    Firefox actually already has the closed tab or closed window list functionality. It is found (tested on Firefox 24.x series) in the “History” menu, and called “Recently Closed Tabs”. The menu item is in a section together with the other similar options, “Recently Closed Windows” and “Restore Previous Session”.

  14. Anonymous said on
    Reply

    If you add the built in History button to the toolbar from the Customize… menu, you get the exact same functionality without installing an add on.

    1. Anonymous said on
      Reply

      I use Undo Close Tab.

      I tried you suggestion of adding the History button to the toolbar from the Customize menu.
      I noticed that some (but not all) of the items listed don’t use the site’s favicon. The History pulldown doesn’t show them either, but the History -> Recently Closed Tabs does. Is this a bug with Firefox?

      1. Anonymous said on
        Reply

        I know it’s not much help but it works on my machine (that is, all the favicons show up).

  15. George P. Burdell said on
    Reply

    If you close a tab too soon and want to resurrect it, try clicking on “History” and then on “Recently Closed Tabs”. This is a built in function that has been in Firefox and Pale Moon for a long time. I do not see the need for an add-on to duplicate a built-in function.

    1. Phylis Sophical said on
      Reply

      Never realized that was there. Thxs George

    2. Martin Brinkmann said on
      Reply

      I think the main issue here is that the Menu Bar is not displayed anymore by default. I do tap on Alt to bring it up whenever I need to restore a browser window, session, or some tabs, and it works well if you know that it is there.

      Most Firefox users who were not around when the menu bar was displayed by default probably don’t know that it exists anymore as there is no real indication that it is there.

      Still, a good point that you are making.

      1. Jonas said on
        Reply

        “…the Menu Bar is not displayed anymore by default…”

        It is on the Mac, because Mozilla doesn’t have a choice. With rare exceptions, the Mac menu bar is drawn by the operating system, not by individual apps the way it is on Windows, although the individual Mac apps typically populate most of the items within the menu bar. So the “Recently Closed Tabs” and “Recently Closed Windows” items never went away in Mac Firefox.

        I still do miss Tab Mix Plus, regardless. It had many great features, such as the ability to lock, protect, or freeze tabs… and many, many more. And I still haven’t forgiven Mozilla for dumbing down the customization options in FF.

      2. Martin Brinkmann said on
        Reply

        I did not know that, thanks for the info!

      3. John Fenderson said on
        Reply

        @Martin Brinkmann: “I think the main issue here is that the Menu Bar is not displayed anymore by default.”

        I always forget about this, because the first thing I do is reenable the menu bar, as I find it far too convenient to do without.

      4. Jozsef said on
        Reply

        Enabling the Menu Bar always made sense to me as well. Let’s hope the option to do that isn’t removed because it’s not used by enough people, which is Mozilla’s mantra these days.

  16. Anonymous said on
    Reply

    T_T i miss tabmixplus…i more used to the left click undo close tab list button in tmp…just the list to undo and clear list…this one right click and that extra entries and that width make it look ugly…dont get mad, im glad addon can do this now…that +1 for tabmixplus full revival…but can webextension now use left click instead of right click for this?

Leave a Reply

By commenting, you accept our privacy policy and keep the discussion respectful and on topic.