How to restore closed tabs in Firefox

Martin Brinkmann
Updated •
Firefox

To restore a closed tab in Firefox, press Ctrl+Shift+T (Command+Shift+T on a Mac), right-click any tab and choose Undo Close Tab, or open History and pick Recently Closed Tabs. The shortcut reopens the most recently closed tab first, while the History menu lets you jump straight to one specific tab.

This guide covers each built-in method, how to bring back a whole session, and what the old Undo Close Tab Replacement add-on did.

Reopen the last closed tab with a shortcut or the tab menu

The fastest way to restore a closed tab in Firefox is Ctrl+Shift+T on Windows and Linux or Command+Shift+T on macOS. Mozilla lists the shortcut as reopening the last closed tab or window, and pressing it again steps back to the one closed before.

You can also right-click any open tab and select Undo Close Tab. Both routes work well when the tab you want is the one you just closed. If you closed several tabs since, each press restores the most recent one first, and that is where the next method helps.

Restore a specific tab from the History menu

Use History, then Recently Closed Tabs, to choose exactly which closed tab comes back. Open the menu button (or the menu bar, which you can show by pressing Alt), select History, and hover over Recently Closed Tabs. Click a title in the list to reopen only that tab, without restoring the ones you closed after it.

The same menu has Recently Closed Windows for a whole window, and Ctrl+Shift+N (Command+Shift+N on macOS) reopens the last closed window. For older pages, the History sidebar (Ctrl+H on Windows, Command+Shift+H on macOS) and the Library window (Ctrl+Shift+H on Windows) let you search by title or site name.

Firefox right-click tab menu listing recently closed tabs

Bring back your whole previous session

To restore all tabs from your last Firefox session, choose History, then Restore Previous Session. If you want Firefox to do this every time, open Settings and, in the General panel under Startup, select "Open previous windows and tabs". Changes save automatically.

This is the safer choice if Firefox crashed or you closed the whole window by accident. If you rely on saved groups of tabs, a session add-on such as Tab Session Manager keeps them across restarts, and tab groups in Firefox help you keep related tabs together.

Which method to use

Method Best for Needs an add-on
Ctrl+Shift+T The tab you just closed No
Undo Close Tab (right-click) Mouse users, last closed tab No
History, Recently Closed Tabs One specific earlier tab No
Restore Previous Session Everything after a crash or accidental close No

The Undo Close Tab Replacement add-on (history)

In 2015 this page covered Undo Close Tab Replacement, an add-on that swapped the context menu entry for a Recently Closed Tabs list, with an option to restore all closed tabs. The extension is no longer available. If you want a similar clickable list, Undo Close Tab was our 2019 alternative, so check its Mozilla Add-ons page for current status before installing it. The built-in History menu covers most needs without installing anything. If you restore closed tabs only once or twice a month, the History menu is the simpler choice.

Related: Restore multiple closed tabs in Chrome for Android, Bookmark all tabs in Firefox

Comments

  1. jimbo said on
    Reply

    A bit late now for a comment but for anyone using FireGestures the Recently Closed Tabs popup is available as a gesture. (FireGestures is unlikely to exist in v.57 …)

  2. Decklan said on
    Reply

    Sorry for my english it’s not my native language. Martin, I have seen dotted square appears on your screen capture instead of favicons. For people who dislike and have disabled favicons with about:config try to put this code in userChrome.css for a more elegant solution:

    /* Replace dotted square on bookmarks bar and tabs */
    #tabbrowser-tabs .tab-icon-image:not(src),
    #personal-bookmarks .bookmark-item .toolbarbutton-icon:not(src) {
    list-style-image: url(“chrome://global/skin/icons/folder-item.png”)!important;
    -moz-image-region: rect(0px, 16px, 16px, 0px)!important;
    }

    /* Replace dotted square on bookmarks menu and submenu */
    menuitem.bookmark-item > .menu-iconic-left {
    list-style-image: url(“chrome://global/skin/icons/folder-item.png”)!important;
    -moz-image-region: rect(0px, 16px, 16px, 0px)!important;
    }

  3. trek100 said on
    Reply

    Not compatible with Palemoon browser…

    But this other addon _is_ 100% compatible
    with Palemoon and Firefox
    and far easier to select previously closed tabs:
    (been using for over 2 years – very happy with it!):

    “Undo Closed Tabs Button”
    https://addons.mozilla.org/en-US/firefox/addon/undo-closed-tabs-button/?src=search

    Try it and compare…

  4. Yuliya said on
    Reply

    I moved the History button from menu (I think that’s where it is by default) to toolbar. It also shows your recently closed tabs.
    https://i.imgur.com/i3IEAll.png

  5. Robert said on
    Reply
  6. fokka said on
    Reply

    good to have this choice, but personally i find it easiest to just hit ctrl-shift-T until the desired tab pops open. it can be a bit messy, but it’s still more convenient for me than to click through menus.

    thinking about it, it might be an even better idea to just open a little overlay with your closed tabs when hitting ctrl-shift-T and you can simply click your desired site, or ctrl-click if you want to open multiple entries. just click outside the overlay and it’s gone.

    but maybe i’m overthinking it.

  7. Lucky Limat said on
    Reply

    Thanks

  8. 424 said on
    Reply

    Session Manager also provides similar functionality in addition to its capabilities.

  9. David said on
    Reply

    This article is brought to you by the letter “U” and the year “2003” :)

    I middle-click in the tab bar to undo close tab. The middle-click feature has been in various extensions since 2004. I one I use now is integrated into FLST.

    1. A different Martin said on
      Reply

      I almost never have free space on the tab bar.
      Also, some of us don’t have middle-click functionality (e.g., laptops with pointing sticks and some “travel” mice).

    2. Hy said on
      Reply

      Middle-clicking in the tab bar works well, provided you have only one tab or a few tabs open, and thus have a blank area on the tab bar to middle-click.

      Depending on one’s setup, as soon as you have five tabs or so or more open, there is no blank area left in the tab bar to middle-click.

  10. Henk van Setten said on
    Reply

    The very same feature has already present for ages in the widely used extension Tab Mix Plus: see TMP options -> Tab Features -> Enable undo closed tabs. Here you can also set a preference for the max number of closed tabs to show . It will appear as a submenu under “Closed Tabs List” in the tabs context menu.

    So if you already have Tab Mix Plus, there is no reason to install this extension on top of that.

    1. A different Martin said on
      Reply

      I’ve been using TabMixPlus for a very long time; it’s one of my my essential extensions. Among other things, I’ve configured it so that double-clicking on any tab or anywhere on the tab bar reopens the most recently closed tab. I also configured TMP to display its “Closed Tabs List” item in the tab context menu, and I customized my toolbars to display TMP’s “Closed Tabs List” button (as well as TMP’s “Opened Tabs List” button). All of these configurations are very handy compared to the defaults, but double-clicking to reopen a mistakenly closed tab is probably the one I use most.

    2. Tom Hawack said on
      Reply

      Indeed ‘Tab Mix Plus’ combines many features found independently on other add-ons making it a must IMO for Firefox. Otherwise ‘Undo Close Tab Replacement’ will appear most useful for those who prefer a one/one add-on/feature approach. But if, with time, they add one-one one to another then an all-in-one solution may be a better choice.
      That’s six ones … :)

      1. fokka said on
        Reply

        i’m one of those people who prefer lighter addons for specific tasks, instead of those all in one solutions. not that i don’t like having options, but addons like tab mix plus or classic theme restorer almost feel overwhelming when i only want to change one or two little things. but to each their own of course and as such it’s good to have something for everybody.

    3. Martin Brinkmann said on
      Reply

      Good point Henk, thanks for mentioning it.

Leave a Reply

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