How to close just the tabs you searched for in Safari on iPhone and iPad

In this tutorial, we will share a hidden tip that lets you search for specific open tabs in Safari and close all matching options in one swoop.

Search for a term and close matching tabs in Safari on iPhone

You can search through open tabs in Safari if you’d like to find one or more specific web pages that you have open.

But did you know that you can quickly close all the matching tabs with a simple long press of a button? This is one of those little tricks that have been around for a while but remain hard to find unless you’re aware of its existence.

Close searched-for tabs in Safari

1) Launch Safari on your iPhone or iPad. I suppose you already have a bunch of open tabs here.

2) Hit the Tabs button denoted by a pair of overlapping squares.

3) Now, go to the top of the tabs interface until a search box reveals itself.

Tap tabs button in Safari on iPhone to see all open tabs with search bar

4) Next, type in your search term. I have many open tabs, including a few Apple support articles, that I no longer need. In order to show only those, I’m going to type “support” into the box.

Notice as you begin typing how the results immediately start to narrow down — tabs without the search keyword in their title instantly disappear, leaving only the ones that match the query. Don’t worry; your non-matching tabs are simply hidden from view rather than permanently closed.

5) Finally, touch and hold the Cancel button. Confirm the operation by tapping the option “Close x Tabs Matching searched word.

Close multiple tabs that match searched term

Will it work on Mac?

This trick won’t work in macOS because although Safari for Mac supports searching tabs, long-pressing or Option-clicking the X button does nothing.

More on Safari tabs: