The fastest way to close all Safari tabs
On Mac, hold Option and click the red close button (the X) in the top-left corner of any tab. Safari closes every tab in that window at once. On iPhone and iPad, swipe left across the "Tabs" button at the bottom of the screen, then tap "Close All [number] Tabs".
If you want to close all tabs except the one you're reading, right-click the tab you want to keep and select "Close Other Tabs". This saves you from closing and reopening a single tab by mistake.
Safari does not have a built-in way to close all tabs across all open windows at the same time. You have to close each window separately using the Option+click method, or close windows one at a time the normal way.
Key Takeaways
- On Mac, hold Option and click the red close button on any tab to close all tabs in that window when ready.
- On iPhone and iPad, tap the Tabs button, swipe left on the Tabs button itself, then confirm "Close All Tabs".
- Right-click any tab and choose "Close Other Tabs" to keep one tab open and close everything else in that window.
- Safari closes tabs one window at a time — there is no command to close all tabs across multiple windows at once.
Closing tabs on Mac using the keyboard shortcut
The Option+click method works on any Mac running Safari. Find the red close button in the top-left corner of the Safari window — it sits to the left of the yellow minimize button and the green maximize button. Hold down the Option key on your keyboard, then click that red button while still holding Option. Every tab in the current window closes when ready.
This method closes tabs without saving them to your reading list or history. If you close a tab by mistake, you can reopen it by pressing Command+Shift+T, which brings back the last closed tab. Pressing the same keys again brings back the second-to-last closed tab, and so on.
Closing all tabs on iPhone and iPad
On iPhone and iPad, the process is different because Safari's interface is touch-based. Look at the bottom-right corner of the screen and tap the overlapping squares icon — this is the Tabs button. The number inside shows how many tabs you have open.
Once the Tabs view opens, swipe left across the Tabs button itself (the icon with the number). A red "Close All [number] Tabs" button appears. Tap it to confirm. All tabs in Safari close at once, and you return to the Safari start page.
Using "Close Other Tabs" to keep one tab open
If you have many tabs open but want to keep just one, right-click (or Control+click on Mac trackpad) the tab you want to save. A menu appears with several options, including "Close Other Tabs". Click that option and Safari closes every tab except the one you right-clicked.
This is faster than closing all tabs and reopening one. It also works on iPad if you long-press a tab instead of right-clicking. On iPhone, you cannot use this method because the tab bar is not always visible — you have to use the Tabs view and swipe instead.
What happens to your browsing history when you close tabs
Closing tabs does not delete your browsing history. Safari keeps a record of every page you visit in the History menu, even after you close the tab. You can see your history by pressing Command+Y on Mac, or by tapping the clock icon in Safari's menu on iPhone and iPad.
If you want to remove a page from your history, open the History menu, find the page, and delete it. Closing the tab does nothing to the history record. This is different from closing a private browsing tab, which Safari does not record in your history at all.
Preventing tabs from reopening when you restart Safari
By default, Safari remembers your open tabs and reopens them the next time you launch the app. If you close all your tabs and then quit Safari, the tabs will come back when you open Safari again. To stop this, go to Safari menu > Settings > General, then change "Safari opens with" from "All windows from last session" to "Start page" or "Empty page".
On iPhone and iPad, go to Settings > Safari and toggle off "Show Tabs from Last Session". Now when you close all tabs and quit Safari, they stay closed. If you change your mind later, you can turn this setting back on.
Closing tabs in Safari windows you are not currently viewing
If you have multiple Safari windows open, the Option+click method only closes tabs in the window you are looking at. To close tabs in a different window, click that window first to bring it to the front, then use Option+click on its close button.
You can see all your open Safari windows by clicking the Window menu at the top of the screen. Each open window is listed there. Click the one you want to switch to, then close its tabs. There is no way to close tabs in a background window without bringing it to the front first.
Frequently Asked Questions
Can I undo closing all tabs?
Yes. Press Command+Shift+T on Mac to reopen the last closed tab. Press it again to reopen the second-to-last tab, and so on. On iPhone and iPad, swipe left from the left edge of the screen to go back, which sometimes reopens a closed tab, but this is not reliable. The keyboard shortcut on Mac is the most dependable way to recover closed tabs.
What if I close all tabs by accident?
Use Command+Shift+T on Mac to bring back your tabs one at a time. On iPhone and iPad, there is no quick recovery method — you will have to visit the pages again. To prevent accidents, consider closing tabs one at a time instead of all at once, or use "Close Other Tabs" to keep important pages open.
Does closing all tabs clear my cookies and passwords?
No. Closing tabs does not affect cookies, passwords, or cached data. Safari keeps all of that information stored on your device. If you want to clear cookies and passwords, go to Safari menu > Settings > Privacy on Mac, or Settings > Safari > Clear History and Website Data on iPhone and iPad.
Can I close all tabs except pinned tabs?
Safari does not have a pinned tabs feature like some other browsers do. Every tab closes the same way. If you want to protect certain tabs from being closed, keep them in a separate Safari window and close only the window with the tabs you want to remove.