The shortcut key to close tab in Chrome, Edge and Firefox is Ctrl + W. The current tab closes and the one beside it becomes active. Ctrl + F4 does the same, and on a Mac the key is Command + W.
Closed one too many? Ctrl + Shift + T reopens the most recently closed tab, and pressing it again brings back the one before that, with its back history intact.
Quick facts
Close tab
Ctrl + WClose tab, alternative
Ctrl + F4Reopen closed tab
Ctrl + Shift + TClose window
Ctrl + Shift + WMouse
Middle click the tabMac
Command + W
Shortcut for closing tab with the mouse
Click the small cross on the tab, or click the tab with the middle mouse button or scroll wheel, which closes it without needing to aim at the cross. To close several at once, hold Ctrl and click tabs to select them, then press Ctrl + W. Right click any tab to find Close other tabs and Close tabs to the right, which tidy up after a long research session. Close tabs to the right is especially handy after a search: keep the results page at the left, open each result to its right, and clear them all in one go once you have found what you need. Firefox and Edge also offer Close duplicate tabs in the same menu, which removes repeated copies of one page.
Close tabs in other programs
Ctrl + W also closes the current document in office programs, a tab in text editors and File Explorer, and a file in most code editors. Unsaved work prompts a save question first. To close an entire program window, use Alt + F4; see close window shortcut.
Bring back what you closed
- Press Ctrl + Shift + T to reopen the last closed tab.
- Repeat to reopen earlier ones in order.
- For older tabs, open History with Ctrl + H and click the page.
- If the whole browser closed, reopening it and pressing Ctrl + Shift + T often restores the last session.
Private windows keep no history, so tabs closed there cannot be reopened after the window is closed. To make the browser always reopen your last tabs, turn on Continue where you left off in Chrome or Edge startup settings, or Open previous windows and tabs in Firefox.
When Ctrl + W does not close the tab
| Problem | Fix |
|---|---|
| Page asks Leave site? | The page has unsaved form data; choose Leave or Cancel |
| Key does nothing | Focus is in the address bar of some apps; click the page first |
| Whole window closed | It was the last tab; reopen the browser and press Ctrl + Shift + T |
| Web app catches the key | Some online editors use Ctrl + W; click the tab cross instead |
Frequently asked questions
Which keys close the current browser tab?
How do I reopen a tab I closed?
How do I close all tabs at once?
Close the window with Ctrl + Shift + W.
How do I close a tab with the mouse?
Middle click the tab, or click its cross.
What is the close tab shortcut on a Mac?
Can I reopen tabs from a private window?
Not after the private window is closed.