The fastest way to close all tabs on Mac
The quickest method is to use the keyboard shortcut Command+Shift+W, which closes all tabs in your current browser window at once. This works in Safari, Chrome, Firefox, and most other Mac browsers. If you want to close the entire window along with all its tabs, use Command+Q instead, which quits the application completely.
If you prefer using the menu, open your browser and click the menu bar at the top. In Safari, select File and then Close All Tabs. In Chrome and Firefox, you will not find a single "close all tabs" option in the menu — you must use the keyboard shortcut or close tabs individually.
The difference between these two approaches matters: Command+Shift+W closes all tabs but leaves the browser window open and empty. Command+Q closes the entire browser application. Choose based on whether you want to keep the browser running or shut it down completely.
Key Takeaways
- Press Command+Shift+W to close all tabs in your current browser window while keeping the browser open.
- Press Command+Q to close all tabs and quit the browser application entirely.
- Safari has a menu option under File > Close All Tabs, but Chrome and Firefox do not.
- If you close tabs by accident, press Command+Shift+T to reopen the last closed tab, or Command+Z in some browsers to undo the action.
Closing tabs in Safari
Safari offers the most straightforward menu path. Click File in the menu bar, then select Close All Tabs. This closes every tab in the active window but leaves Safari running. If you have multiple Safari windows open, this command only affects the window you are currently using.
You can also use Command+Shift+W from anywhere in Safari to close all tabs instantly without touching the menu. If you want to close Safari entirely along with all its tabs and windows, press Command+Q.
Closing tabs in Chrome
Chrome does not have a dedicated menu option to close all tabs at once. Your options are the keyboard shortcut Command+Shift+W, which closes all tabs in the current window, or Command+Q, which closes Chrome entirely.
If you have multiple Chrome windows open and want to close all tabs in just one window, use Command+Shift+W while that window is active. To close all Chrome windows and all tabs across your entire browser, use Command+Q instead.
Closing tabs in Firefox
Firefox also lacks a menu option for closing all tabs at once. Use Command+Shift+W to close every tab in your current window, or Command+Q to close Firefox and all its windows.
Firefox does preserve your tab history better than some browsers. If you close all tabs by accident, you can often recover them by going to History in the menu bar and selecting Restore Previous Session, which reopens all the tabs that were open before you closed them.
What happens to your browsing history when you close tabs
Closing tabs does not delete your browsing history. The websites you visited remain in your browser's history, and you can find them by pressing Command+Y (in Chrome and Firefox) or Command+Y (in Safari) to open the history panel. Closing a tab simply removes it from your current window — it does not erase the record that you visited that site.
If you want to delete your browsing history along with closing tabs, you must do that separately. In Safari, go to History > Clear History. In Chrome, go to Chrome > Settings > Privacy and Security > Clear Browsing Data. In Firefox, go to Firefox > Settings > Privacy & Security > Cookies and Site Data > Clear Data.
Recovering tabs you closed by accident
If you close all your tabs and immediately regret it, press Command+Shift+T to reopen the last closed tab. Pressing it multiple times will reopen tabs one by one in reverse order — the most recently closed tab opens first.
In Safari, you can also go to File > Reopen Last Closed Tab to get the same result. In Firefox, History > Restore Previous Session will reopen all tabs from your last session at once, which is faster if you closed many tabs.
This recovery method only works if you have not closed the browser entirely. Once you quit the application with Command+Q, you cannot use Command+Shift+T to bring tabs back. Firefox's session restore is your best option in that case.
Closing tabs without using the keyboard
If you prefer not to use keyboard shortcuts, you can close tabs one at a time by clicking the X button on each tab. This is slower than using Command+Shift+W, but it gives you control over which tabs stay open and which ones close.
You can also right-click on any tab and select Close Tab from the menu that appears. Right-clicking on a tab also shows options like Close Other Tabs (in Safari and Chrome), which closes every tab except the one you right-clicked on — useful if you want to keep one tab open and close the rest.
Frequently Asked Questions
Does Command+Shift+W close all windows or just all tabs in one window?
Command+Shift+W closes all tabs in the current window only. If you have multiple browser windows open, the other windows and their tabs remain open. To close all windows and quit the browser entirely, use Command+Q instead.
Can I close all tabs except one?
Yes. Right-click on the tab you want to keep and select Close Other Tabs (available in Safari and Chrome). Firefox does not have this option in the context menu, so you would need to close the other tabs individually or use Command+Shift+W and then reopen the tab you wanted to keep.
What is the difference between closing a tab and closing a window?
Closing a tab removes one page from your browser but leaves the browser window open. Closing a window closes all tabs in that window at once. Command+Shift+W closes all tabs but leaves the window open; Command+W closes just the current tab; Command+Q closes the entire browser application.
Will closing all tabs log me out of websites?
Closing tabs does not automatically log you out. Most websites keep you logged in through cookies, which remain on your computer even after you close the tab. The next time you visit that website, you will likely still be logged in. If you want to log out, you must do so on the website itself before closing the tab.
Can I set my browser to close all tabs when I quit the app?
By default, most browsers remember your open tabs and reopen them the next time you launch the app. You can change this in browser settings. In Chrome, go to Settings > On Startup and select Open the New Tab Page. In Safari, go to Settings > General and change the "Safari opens with" setting to A new window instead of All windows that were open last time.