The fastest way to close all tabs depends on your browser
Most browsers let you close all open tabs with a keyboard shortcut or a menu option. In Chrome, Firefox, Safari, and Edge, the quickest method is a single keystroke. On Windows, press Ctrl+Shift+W to close all tabs in Chrome, Firefox, or Edge. On Mac, press Command+Shift+W in any of these browsers. Safari uses Command+Option+W instead.
If you prefer not to use keyboard shortcuts, every major browser also offers a menu-based route. You can right-click on any tab and look for an option like "Close all tabs" or "Close other tabs" — though the exact wording and location varies by browser. Some browsers hide this option behind additional clicks through the main menu.
One important distinction: closing all tabs will also close the browser window itself in most cases. If you want to keep the browser open with a blank window, you may need to open a new tab after closing the rest, or use your browser's "New Window" command instead.
Key Takeaways
- Windows users can press Ctrl+Shift+W in Chrome, Firefox, or Edge to close all tabs instantly.
- Mac users should press Command+Shift+W in Chrome, Firefox, or Edge, or Command+Option+W in Safari.
- Right-clicking a tab reveals a context menu with close options in most browsers, though the exact wording differs.
- Closing all tabs typically closes the browser window too, so you may need to open a new window if you want the browser to stay running.
Chrome: Close all tabs with one command
In Chrome on Windows, press Ctrl+Shift+W. On Mac, press Command+Shift+W. Both close every tab and the window itself. If you want to close all tabs except the one you are currently viewing, right-click the tab you want to keep and select "Close other tabs" from the menu.
You can also access this through Chrome's menu. Click the three-line menu icon in the top right corner, then look under the window or tab management options. However, the keyboard shortcut is faster and works the same way across all devices.
Firefox: Close all tabs without closing the browser
In Firefox on Windows, press Ctrl+Shift+W to close all tabs and the window. On Mac, press Command+Shift+W. Unlike some other browsers, Firefox does not offer a built-in way to close all tabs while keeping the window open — closing all tabs closes the window too.
If you want to keep Firefox running, open a new window after closing all tabs, or use Ctrl+N (Windows) or Command+N (Mac) to create a new window before closing the old one. You can also right-click any tab and select "Close other tabs" to keep just one tab open.
Safari: Close all tabs on Mac
In Safari on Mac, press Command+Option+W to close all tabs and the window. Safari does not have a direct "close all tabs" option in its menu, so the keyboard shortcut is the fastest method.
If you want to close all tabs except one, right-click the tab you want to keep and select "Close Other Tabs." This leaves you with a single tab open in the same window, so the browser stays running.
Edge: Close all tabs on Windows or Mac
In Microsoft Edge on Windows, press Ctrl+Shift+W. On Mac, press Command+Shift+W. Both close all tabs and the window. Edge also lets you right-click any tab to access "Close other tabs" or "Close all tabs" options, depending on what you right-click.
Edge also has a feature called "Reopen closed tabs" — if you close all tabs by accident, press Ctrl+Shift+T (Windows) or Command+Shift+T (Mac) to bring back your last closed tab. You can repeat this to restore multiple tabs in reverse order.
What happens to your browsing history and saved passwords
Closing all tabs does not delete your browsing history, saved passwords, or cookies. Those remain stored in your browser. Closing tabs only removes the open windows from your screen — the data behind them stays intact.
If you want to clear your browsing history, cookies, or cached data, you need to use your browser's settings menu. In Chrome and Edge, this is under Settings > Privacy and Security > Clear browsing data. In Firefox, it is under Settings > Privacy & Security > Cookies and Site Data. In Safari, it is under Safari > Settings > Privacy. These are separate actions from closing tabs.
Closing tabs on mobile browsers
Mobile browsers work differently than desktop versions. On iPhone Safari, swipe up from the bottom of the screen to see all open tabs, then tap "Edit" in the bottom right corner and select "Close All" to close every tab at once. On Android Chrome, tap the tab counter icon (showing a number) in the top right, then tap the three-dot menu and select "Close all tabs."
Mobile browsers do not use keyboard shortcuts the same way desktop browsers do, so the menu-based approach is the standard method on phones and tablets.
Frequently Asked Questions
Will closing all tabs sign me out of websites?
Closing tabs does not automatically sign you out. Most websites keep you logged in through cookies, which remain stored even after you close the tab. However, some sites have security settings that log you out when you close your browser window. Check your account settings on sensitive sites like banking or email if you want to control this behavior.
Can I undo closing all tabs?
Yes, in most browsers. Press Ctrl+Shift+T (Windows) or Command+Shift+T (Mac) immediately after closing all tabs to reopen your last closed tab. You can repeat this to restore multiple tabs. However, this only works if you act quickly — the undo history is limited and clears when you close the browser completely.
What if I want to close all tabs except one?
Right-click the tab you want to keep open and select "Close other tabs" from the context menu. This closes every tab except the one you clicked on, and keeps the browser window open with just that single tab remaining.
Does closing all tabs free up memory?
Yes. Each open tab uses some of your computer's memory. Closing all tabs releases that memory back to your system, which can make your browser and computer run faster if you had many tabs open. This is especially noticeable on older computers or devices with limited memory.