Hotkey to Close Tab: Shortcuts for Chrome, Edge, Firefox and Safari
Short answer: The hotkey to close a tab is Ctrl+W on Windows and Linux, or Command+W (Cmd+W) on a Mac. It works in Chrome, Edge, Firefox and Safari, and it closes only the tab you are looking at — not the whole browser window. If you closed the wrong tab, press Ctrl+Shift+T (Windows) or Cmd+Shift+T (Mac) to bring it straight back. Below are the shortcuts for every browser, plus how to close several tabs at once and what to do when the hotkey does not work.
The Hotkey to Close a Tab in Every Browser
| Browser | Windows / Linux | Mac |
|---|---|---|
| Google Chrome | Ctrl+W or Ctrl+F4 | Cmd+W |
| Microsoft Edge | Ctrl+W or Ctrl+F4 | Cmd+W |
| Mozilla Firefox | Ctrl+W | Cmd+W |
| Safari | — | Cmd+W |
| Opera / Brave / Vivaldi | Ctrl+W | Cmd+W |
On Windows you can also use Ctrl+F4 in Chrome and Edge — handy on laptops where the W key is awkward to reach, since F4 sits in the top row. On a Chromebook the shortcut is the same as on Windows: Ctrl+W, and our guide to Chromebook keyboard shortcuts covers the rest of the keys that differ on ChromeOS.
Close Tab vs Close Window vs Quit: Don’t Mix Them Up
The three shortcuts look similar and do very different things. Mixing them up is the most common way people lose a whole session of tabs.
| Action | Windows / Linux | Mac |
|---|---|---|
| Close one tab | Ctrl+W | Cmd+W |
| Close the current window (all its tabs) | Ctrl+Shift+W | Cmd+Shift+W |
| Close the whole browser | Alt+F4 | Cmd+Q |
| Close a tab in the background | Middle-click the tab | Middle-click the tab |
One important detail: if you press Ctrl+W (or Cmd+W) when only one tab is open, it closes that tab — and with it, the window. Browsers give no warning by default, so if you really mean to close just the tab, make sure you have another one open first. If you meant to close the window instead, use Ctrl+Shift+W (Windows) or Cmd+Shift+W (Mac) and it will close all of the window’s tabs at once.
How to Reopen a Closed Tab
Closed the wrong tab? The reopen shortcut is the mirror image of the close shortcut:
- Windows / Linux: Press Ctrl+Shift+T to reopen the last tab you closed. Press it again to reopen the one before that, and so on.
- Mac: Press Cmd+Shift+T for the same result.
- Whole window: If you closed an entire window by mistake, Ctrl+Shift+T (or Cmd+Shift+T) reopens the whole window with all its tabs.
- After restarting: If you closed the browser completely, use the History menu (Ctrl+H on Windows, Cmd+Y on Mac in Chrome) and choose the tab from your recent history.
One limit to know: browsers only remember a certain number of recently closed tabs, and a tab closed in a private or incognito window cannot be reopened once that window is gone.
How to Close Multiple Tabs at Once
Ctrl+W closes one tab at a time, but a tab pile-up needs faster tools. These work in Chrome, Edge and Firefox:
- Close other tabs: Right-click the tab you want to keep and choose Close other tabs. Every other tab in the window closes instantly.
- Close tabs to the right: Right-click a tab and choose Close tabs to the right — useful when you have finished a research trail and the useful tabs are on the left.
- Close selected tabs: Hold Ctrl (or Cmd on Mac) and click several tabs to select them, then right-click and choose Close tabs.
- Close a background tab: Middle-click the tab with your mouse wheel — you never have to switch to it first.
How to Close a Tab Without a Keyboard
If your keyboard is out of reach, you have three mouse options: click the × on the tab itself, middle-click the tab, or right-click the tab and choose Close tab from the menu. On a touchscreen laptop, tap the tab’s × icon. There is no way to close a tab by touching the screen with a gesture in most browsers — the × is the touch method. And if a page is stuck and will not close, use your browser’s task manager (Shift+Esc in Chrome) to end the tab’s process.
What If the Hotkey Doesn’t Work?
- The browser window is not focused. Click once on the page (not in a text box) and try again.
- You are in a web app that captures keys. Some installed web apps and browser-based editors intercept Ctrl+W for their own use. Click the browser’s tab bar first, or close the tab with the mouse.
- An extension remapped the shortcut. Check your extensions, especially keyboard-customisation ones, and disable any that change tab shortcuts.
- You pressed Shift by accident. Ctrl+Shift+W closes the whole window, which feels like the hotkey “did nothing” until you look for your tabs. Reopen them with Ctrl+Shift+T.
- The tab has unsaved work. Some pages warn you before closing if a form is half-filled. Click “Leave” on the warning to close it, or save your work first and try again.
Bonus: Handy Tab Shortcuts Worth Learning
Once Ctrl+W is muscle memory, these five make tab management almost touch-free:
| Action | Windows / Linux | Mac |
|---|---|---|
| Open a new tab | Ctrl+T | Cmd+T |
| Reopen a closed tab | Ctrl+Shift+T | Cmd+Shift+T |
| Switch to the next tab | Ctrl+Tab | Ctrl+Tab |
| Jump to a tab by number | Ctrl+1 to Ctrl+8 | Cmd+1 to Cmd+8 |
| Jump to the last tab | Ctrl+9 | Cmd+9 |
| Open a new window | Ctrl+N | Cmd+N |
Ctrl+1 jumps to the first tab, Ctrl+8 to the eighth, and Ctrl+9 always jumps to the last tab, however many you have open. Combine that with Ctrl+Tab to cycle through recent tabs, and you rarely need the mouse at all. Speaking of keys, if you mix up the keys on the right of your keyboard, our guide to the difference between the Enter and Return keys clears that up.
Hotkey to Close Tab FAQs
What is the shortcut to close a tab in Chrome?
Press Ctrl+W on Windows, Linux or a Chromebook, or Cmd+W on a Mac. Ctrl+F4 also works in Chrome on Windows.
How do I close a tab on a Mac?
Press Cmd+W in any browser, including Chrome, Safari, Edge and Firefox. To close the whole window instead, press Cmd+Shift+W, and to quit the browser use Cmd+Q.
How do I reopen a tab I closed by accident?
Press Ctrl+Shift+T on Windows or Cmd+Shift+T on a Mac. Each press reopens the next most recently closed tab, and it can also restore a whole window you closed.
Does Ctrl+W close the browser?
No — it closes only the current tab. The browser itself stays open. The exception is when the closed tab is the last one open: then the window closes with it. To close the browser on purpose, use Alt+F4 on Windows or Cmd+Q on a Mac.
What is Ctrl+Shift+W?
Ctrl+Shift+W closes the entire browser window and all the tabs in it. On a Mac the equivalent is Cmd+Shift+W. It is easy to press by accident, so check your other tabs before you use it.
Conclusion
The hotkey to close a tab is Ctrl+W on Windows and Linux and Cmd+W on a Mac, and it works the same in Chrome, Edge, Firefox and Safari. Learn its partner, Ctrl+Shift+T (Cmd+Shift+T on Mac), and a wrongly closed tab is never more than a keypress away. For a tidier browser overall, see our guide to clearing the cache in Google Chrome — and if Chrome starts misbehaving, that is usually the first fix to try.