Your inbox can explode with new emails when you sign up for apps, newsletters, and other promotional content, making it hard to spot the ones that matter. You can set up different email accounts for specific types of emails so that your primary inbox remains clutter-free. This may not be a practical or easy solution for everyone. You can also mass delete emails, which might cause you to lose important communication.

This issue becomes harder to deal with if you use a compact smartphone, given the limited screen space. You can use Gmail's advanced search filters and chips to sort through your communication and spot the emails you want.

This guide goes over the basics of Gmail search and explains how to get the most out of the advanced filters. Whether you want to find specific messages from a recipient or set up long-term filters to help with an overflowing inbox, you've come to the right place.

Gmail has a search bar at the top of the screen, typically used for searching by entering names or simple phrases. When you type in the search bar, recent results populate below the bar. To view more of these results, press Enter (or click the Search button).

Using Gmail's search bar on the desktop

Gmail's regular text search includes results from an email's subject field, senders, and message contents. That means searching for common words and phrases can give you too many messages to look through. Going through dozens of search results isn't productive and can be time-consuming. That's where filters come in. They trim the results to more manageable sizes.

Gmail chips

A few buttons appear on the search page when you search for an email using Gmail's search bar. These buttons are called chips, and they help you filter results without opening the Advanced Search panel or typing your own filters. For example, clicking the Has attachment chip hides all messages that don't have an attached file.

Gmail chips that help users look up relevant emails

Since Conversations and Spaces are available via Gmail on the web, you can use the relevant chips and search for results in your direct messages and Spaces. To do this, select the Conversations or Spaces tab.

Using Gmail chips to filter results from direct messages and Spaces

You don't need to click the search bar every time. Instead, use the / key and search for keywords. Read our dedicated post to level up your Gmail experience with keyboard shortcuts.

Gmail chips aren't limited to the web version. Chips are available in the mobile apps. Chips narrow the search results on a small screen when you search for an email in Gmail for Android or iOS. You can't search for results that come up via Conversations and Spaces using chips on Gmail mobile apps.

Advanced search filters in Gmail

Simple words and phrases combined with Gmail's chips help you find the messages you want. Use Gmail's advanced search functionality to set up permanent filters for a search.

Follow the steps below to use Gmail's advanced search filters on the web:

  1. Visit Gmail on the web and select the search bar at the top.
  2. Search for an email and press the Enter key.
  3. The Advanced search button appears below the search bar.
    Using Advanced search filters on Gmail
  4. The Advanced search includes fields to narrow the results. For example, filter messages by the sent date, message size, sender name, subject phrase, and more.
    Creating a search filter in Gmail

Here's an explanation of each field:

  • From: Search for emails from a specific address.
  • To: Search for sent emails to the mentioned address.
  • Subject: Search for an email subject field.
  • Has the words: Search for specific words in an email.
  • Doesn't have: Exclude mentioned words from an email.
  • Size: Search for a specific message size.
  • Date within: Narrow the search to the mentioned timeframe.
  • Search: Search within a label or folder.

The advanced search popup has two buttons at the bottom. The Search button shows the results for what you typed. The Create filter button creates a message filter with the options you entered. Clicking the latter option takes you to a second screen, where you define what happens to messages that the filter catches.

Creating filers on Gmail

When everything is set to your preference, click the Create filter button to activate the filter. By default, filters don't do anything to existing messages. You can change this by clicking the Also apply filter to matching conversations checkbox.

Gmail advanced filters in action

Let's go over a few examples of Gmail's advanced filters. Maybe you subscribed to a few newsletters but don't want them mixed in with regular messages in your inbox. In this case, create a Gmail filter to add such messages to a Newsletter label automatically.

Before you start, create a new label in Gmail. After creating a label, follow the steps below.

  1. Open Gmail on the web and click the search options menu at the top.
  2. Type Unsubscribe in the Has the words field.
  3. Click Create Filter.
    Creating a Gmail filter on web
  4. Select Skip the inbox, select Apply the label, and choose a label.
    Enabling a condition for Gmail filter

Let's create another filter to auto-delete spam emails from your Inbox. Gmail allows you to block addresses, but automated messages sometimes use multiple addresses. Even though you can unsubscribe to such emails, companies often find a way to email you with spam.

You can create a filter with an asterisk (*) in parts of the field, which functions as a wildcard. For example, typing *@newegg.com in the From field matches all emails with the domain newegg.com.

  1. Click the search options menu from the Gmail search bar.
  2. Type *newegg.com in the From field and select Create Filter.
    Creating a gmail filter
  3. Select Delete it to delete all such emails and select Create Filter.
    Enabling a condition for Gmail filter

Manage search filters in Gmail

Unlike chips, Gmail's advanced search filters aren't available on mobile apps. It's the only major omission from the feature-packed Gmail Android and iOS apps. However, you can create as many filters as you prefer and manage them from Gmail settings on the web.

  1. From the Gmail homepage, click Settings in the upper-right corner (represented by a gear icon).
    Head to Gmail settings
  2. Select See all settings.
    Select See all settings on Gmail
  3. Move to the Filters and Blocked Addresses tab.
    Filters and blocked addresses in Gmail
  4. Check all the created filters in action.
  5. Click the edit button to make changes or select delete to remove the filter.
    Edit or delete a gmail filter

Export and import search filters in Gmail

You can export search filters from your main account if you have several Gmail addresses and want to use the same filters for every email address. You don't need to create new filters for each account. You can import the file into your second Gmail account and enjoy the same convenience.

  1. Open Gmail settings on the web (check the steps above).
  2. Move to Filters and Blocked Addresses.
    Filters and blocked addresses in Gmail
  3. Select the search filters you want to export.
  4. Scroll down and select Export. Gmail creates and downloads an XML file. Your browser may detect it as a harmful file and block the download. Ignore the warning and save the file on your desktop.
    Export Gmail filters from your primary account
  5. Open Filters and Blocked Addresses in another Gmail account.
  6. Select Import filters.
  7. Click Choose File.
    Importing Gmail filters
  8. Select the exported file and select Open.
    Select the relevant Gmail filter file
  9. Select Open file in Gmail.
    Open the imported file on Gmail
  10. You can check all filters from the imported file. Select the filters you want to use in your secondary Gmail account.
  11. Select Create filters. You can also apply new filters to existing email messages.
    Import Gmail filters and apply it to your inbox

Gmail's default search fields, combined with the filter options on the second screen, should suffice for most cases. If you need layered searches (for example, do this OR that if X is true) or a filter option that Gmail doesn't show in the popup, read on.

Multistep filters and basic operators in Gmail

Gmail's search and filter interface adds terms like "from:" or "to:" or "subject:" to the search field. These are called search operators, which can be combined to trim your results. Gmail types these for you when you use the search interface. You can make complex searches and filters by typing in the search bar.

Let's say you want to search for all your delivery emails from Amazon. You could type something like this in the search bar, which shows messages sent from any Amazon address with the word "delivery" in the email:

from:*@amazon.com "delivery"

This might not catch all delivery emails. If your package wasn't delivered, the email might not say "delivery." Adding terms like "package" or "order" could give better results. This is where Gmail's OR operator comes in. Here's an example:

from:*@amazon.com ("delivery" OR "package" OR "order")

Using parentheses adds nested logic to the filter. In the above example, two factors must be true. The email must be from Amazon, and it must contain either "delivery," "package," or "order." If you want to keep going and add more retail stores, do something like this:

from:(*@amazon.com OR *@target.com OR *@walmart.com) ("delivery" OR "package" OR "order")

Now, you have a search that looks for emails from Amazon, Target, and Walmart with the phrases specified in the second half. If it helps with readability, add AND to the middle (between the two sets of parentheses), and Gmail should still be able to understand it.

Use the hyphen or minus sign to avoid messages from a specific term. For example, when searching for –airtable, Gmail hides emails containing the word airtable.

Hidden operators and filters in Gmail

Gmail has more operators and filter options than the advanced search popup shows. You can sort by attachments, file type, links to Google Drive files or YouTube videos, dates, direct messages, message size, and more. You'll find a complete list of filters on the Gmail support website.

Let's go over a few helpful examples that use the above operators. Imagine you're a student and your professor sent a message with an attached document, but you can't find it. Something like the search prompt below can help:

from:teacher@school.edu has:attachment

Another helpful search is using the "size" operator to look for large messages that may cut into your Gmail and Google account storage. The below example finds messages that are 5MB or larger:

size:5MB

In terms of filters, maybe your friends and family send you videos, and you want to keep them in an easy-to-access location. Use a search like the one below, then create a filter with it that adds a label like Videos:

has:youtube OR "twitch.tv" OR "tiktok.com" OR "dailymotion.com"

One issue affects filters like the one above. Gmail can't search by link URLs. For example, the above filter only works for messages where the link's text is the URL. The filter catches messages that spell out "youtube.com" or "tiktok.com" but not messages where the link text says something different.

Experience a clutter-free inbox with Gmail's advanced search filters

Google's advanced search filters make searching for relevant emails straightforward. The steps above help you find most emails in seconds. You can also keep your inbox organized by reducing spam.

You can delete promotional emails from your Gmail account to spot relevant emails without much effort. If you run low on storage because of messages and attachments, consider upgrading to Google One to enjoy more space and other perks.