The fastest way to close all tabs in Safari

You can close all open tabs in Safari in one action by holding down the Shift key, then clicking the X button on any tab. This closes every tab at once without closing the browser window itself. On a Mac, you can also use the keyboard shortcut Command+Option+W to close all tabs in the current window.

If you are on an iPhone or iPad, the process is slightly different: tap and hold the tab switcher button (the overlapping squares icon in the bottom right), then tap "Close All [X] Tabs" from the menu that appears. The exact wording changes depending on how many tabs you have open.

Both methods leave Safari running so you can open new tabs when ready afterward. If you want to close Safari entirely instead, use Command+Q on Mac or swipe up from the bottom of the screen on iPhone and iPad to close the app.

Key Takeaways

  • On Mac, hold Shift and click the X on any tab to close all tabs in that window at once.
  • The keyboard shortcut Command+Option+W closes all tabs in the current Safari window without closing the browser.
  • On iPhone and iPad, tap and hold the tab switcher button, then select "Close All Tabs" from the menu.
  • Closing all tabs does not close Safari itself, so you can when ready open new tabs or windows.
  • Safari does not warn you before closing tabs, so make sure you have saved or bookmarked anything you need first.

Why you might want to close all tabs at once

A browser with dozens of open tabs uses more memory and can slow down your computer or device. Closing all tabs is a quick way to reset and start fresh, especially if you have been browsing for hours and accumulated tabs you no longer need.

Closing tabs also reduces visual clutter. When your tab bar is crowded, it becomes harder to find the tab you actually want to use. Starting over with a clean slate can make Safari feel faster and easier to navigate.

Some people close all tabs as a privacy step before handing their device to someone else, or before closing Safari for the day. It ensures no one can accidentally click back into a tab you were viewing.

What happens to your tabs after you close them

When you close all tabs using the Shift+click method or the keyboard shortcut, those tabs are gone when ready. Safari does not automatically save them unless you have turned on tab recovery in your settings.

If you close Safari itself (not just the tabs), Safari can reopen your tabs the next time you launch the browser — but only if you have enabled "Reopen windows from last session" in Safari's settings. To check this on Mac, go to Safari menu > Settings > General, then look for the "Reopen windows from last session" checkbox. On iPhone and iPad, this setting is in Settings > Safari > Tabs.

If you close all tabs but leave Safari open, there is no automatic recovery. You would need to manually reopen any sites you want to return to.

Closing tabs in a specific window without closing others

If you have multiple Safari windows open and only want to close tabs in one of them, make sure that window is active (in focus) before using Command+Option+W. This closes all tabs in the active window only, leaving other Safari windows and their tabs untouched.

On iPhone and iPad, each window has its own set of tabs, so closing all tabs in one window does not affect the other. Tap and hold the tab switcher for the window you want to clear, then select "Close All Tabs."

Recovering tabs you closed by accident

If you close all tabs and when ready realize you needed one of them, you can undo the action on Mac by pressing Command+Z right away. This works only if you act within a few seconds — once you perform another action in Safari, the undo option disappears.

On iPhone and iPad, there is no undo button for closing tabs. Your best option is to check your browsing history to find the site again. Swipe left from the left edge of the screen to open the sidebar, tap the history icon (the clock), and search for the site you need.

If you have tab recovery enabled in your settings and you close Safari entirely, your tabs will reopen the next time you launch the browser. This is different from closing individual tabs — it only works when you close the app itself.

Managing tabs before they pile up

Instead of waiting until you have dozens of tabs open, you can prevent the buildup by bookmarking sites you want to return to later. Press Command+D on Mac or tap the Share button and select "Add Bookmark" on iPhone and iPad. This saves the page without keeping a tab open.

You can also use Safari's Reading List feature to save articles for later without cluttering your tabs. Press Command+Shift+D on Mac, or tap the Share button and select "Add to Reading List" on iPhone and iPad. The Reading List is separate from your bookmarks and is designed specifically for pages you plan to read soon.

If you find yourself regularly opening the same sites, consider pinning them as favorites in your tab bar. On Mac, right-click a tab and select "Pin Tab." Pinned tabs stay open and take up less space, so they do not contribute to tab clutter the same way regular tabs do.

Frequently Asked Questions

Does closing all tabs delete my browsing history?

No. Closing tabs only closes the open pages — it does not erase your browsing history. Your history remains in Safari until you manually clear it through Settings > Safari > Clear History and Website Data on iPhone and iPad, or Safari menu > Settings > Privacy on Mac.

Can I close all tabs except one?

Not with a single action. You would need to close all tabs, then reopen the one you want to keep. Alternatively, you can close tabs individually by clicking the X on each tab, or right-click a tab and select "Close Other Tabs" to close everything except that one tab.

What is the difference between closing tabs and closing Safari?

Closing tabs removes the open pages but leaves Safari running so you can open new tabs. Closing Safari shuts down the entire browser. If you have tab recovery enabled, closing Safari will reopen your tabs next time you launch it — but closing individual tabs will not.

Will closing all tabs speed up my Mac or iPhone?

Yes, usually. Each open tab uses memory and processing power. Closing unused tabs frees up those resources, which can make your device feel more responsive. The effect is more noticeable on older devices or when you have many tabs open.

Can I set Safari to automatically close tabs after a certain time?

Safari does not have a built-in auto-close feature for tabs. However, on iPhone and iPad, you can go to Settings > Safari > Close Tabs and choose "After One Day," "After One Week," or "After One Month" to have Safari automatically close tabs that have been inactive for that period.