The fastest way to close all Safari tabs

To close all open tabs in Safari at once, hold down the Option key (Alt on some keyboards), then click the X button on any open tab. Safari will close every tab in that window when ready. This works on Mac, iPad, and iPhone — the method is the same across all devices.

If you have multiple Safari windows open, this closes all tabs only in the window you are currently using. Each window's tabs close separately. If you want to close an entire window instead, use Command+W or click the red close button in the top-left corner of the window.

You can also close all tabs by going to the File menu at the top of your screen, then selecting Close All Tabs. This option appears only when you have more than one tab open.

Key Takeaways

  • Hold Option and click the X on any tab to close all tabs in that Safari window at once.
  • The File menu also has a Close All Tabs option that does the same thing.
  • Closing all tabs does not close the Safari window itself — the window stays open with a blank page.
  • If you close tabs by accident, use Command+Z to undo and bring them back.
  • On iPhone and iPad, swipe left on a tab in the tab bar, then tap Close All Tabs from the menu that appears.

Closing tabs on iPhone and iPad

On iPhone and iPad, the process is slightly different because you do not have a keyboard with an Option key. Instead, open the tab bar by tapping the tab icon in the bottom-right corner (it shows a number, like "5"). This displays all your open tabs in a grid or list.

Tap Edit in the bottom-right corner of the tab bar. Then tap Close All Tabs at the bottom of the screen. Safari will close every tab and return you to a blank page. You can undo this action by tapping the undo button that appears at the bottom of the screen, or by using the three-finger swipe gesture if you have it enabled.

When you might want to close all tabs at once

Closing all tabs is useful when Safari feels slow or you want a fresh start. Multiple open tabs use memory and can make your device run slower, especially on older iPhones or iPads. Closing them all clears that memory and often speeds things up noticeably.

You might also close all tabs before handing your device to someone else, or before you stop using Safari for the day. Some people close all tabs every evening as a way to reset their browsing — it is a small habit that keeps your browser feeling clean and organized.

Recovering tabs you closed by accident

If you close all your tabs and when ready realize you needed one of them, use Command+Z on Mac or the undo gesture on iPhone and iPad. This brings back all the tabs you just closed, in the same order they were in.

If you closed the tabs more than a few seconds ago, undo may not work. In that case, you can reopen recently closed tabs one at a time. On Mac, go to History in the menu bar and select Reopen Last Closed Tab, or use the keyboard shortcut Command+Shift+T. On iPhone and iPad, tap the tab icon, then look for a Recently Closed section at the bottom of the tab bar.

Closing tabs versus closing Safari entirely

Closing all tabs leaves Safari running — you will see an empty window or a blank page. If you want to close Safari completely, use Command+Q on Mac, or swipe up from the bottom of the screen on iPhone and iPad and hold until the app switcher appears, then swipe Safari away.

When you close Safari entirely and then reopen it, Safari remembers your tabs by default. On Mac, go to Safari in the menu bar, then Settings, then the General tab. Look for the option that says Safari opens with and choose whether you want it to reopen your last session or start with a blank page. On iPhone and iPad, this setting is in Settings > Safari > Tabs.

Organizing tabs before you close them

If you have many tabs open and are not sure which ones to keep, you can group related tabs together before closing the rest. On Mac, right-click on a tab and select Move Tab to New Window. This puts that tab in its own window, letting you keep important tabs separate from ones you want to close.

You can also use Safari's Tab Groups feature on Mac to save sets of tabs for later. Click the + button next to your open tabs, name the group, and Safari saves all those tabs together. You can close them now and reopen the whole group whenever you need them again. This feature is available in Safari 15 and newer on Mac.

Frequently Asked Questions

Does closing all tabs delete my browsing history?

No. Closing tabs only closes the windows that are currently open. Your browsing history remains in Safari and can be viewed in the History menu. If you want to delete your browsing history, go to History > Clear History on Mac, or Settings > Safari > Clear History and Website Data on iPhone and iPad.

Will closing all tabs log me out of websites?

Usually not. Most websites keep you logged in even after you close the tab, because they store your login information in cookies. However, some websites log you out when you close the tab, depending on their security settings. If you are concerned about staying logged in, check the website's settings before closing all tabs.

Can I close all tabs except one?

Not with a single command. You will need to close tabs individually or close all tabs and then reopen the one you want to keep. On Mac, you can right-click a tab and select Close Other Tabs to close everything except that one tab.

What is the keyboard shortcut to close all tabs on Mac?

There is no single keyboard shortcut. The fastest method is to hold Option and click the X button on any tab. Alternatively, use the File menu and select Close All Tabs. You can also close tabs one at a time using Command+W.