Gmail’s a Google product, so of course it has powerful search features. But some of Gmail’s search features are hidden and don’t appear in the Search Options pane. Learn Gmail’s search tricks to master your massive inbox.
You can also create filters from any search you can perform. Filters automatically perform actions on incoming emails, such as deleting them, applying a label, or forwarding them to another email address.
Basic Search Features
Instead of just typing a search query in the search box, click the down arrow to reveal more search options.
The search options dialog exposes many of Gmail’s basic search operators. But there are some search options that don’t appear in this dialog.
You can skip this dialog for basic searches. Perform a search with the search options dialog and you’ll see the search operator you’ll need in the future. For example, if you type howtogeek.com into the search box, you’ll see the following search appear in the search box:
Useful search operators you can access from the basic dialog include:
- to: – Search for messages sent to a specific address.
- from: – Search for messages sent from a specific address
- subject: – Search the subject field.
- label: – Search within a specific label.
- has:attachment – Search only for messages that have attachments
- is:chat – Search only chats.
- in:anywhere – Also search for messages in the spam and trash. By default, Gmail’s search ignores messages in the spam and trash.
To put together more complicated searches, you’ll need to know the basics.
- ( ) – Brackets allow you to group search terms. For example, searching for subject:(how geek) would only return messages with the words “how” and “geek” in their subject field. If you search for subject:how geek, you’d get messages with “how” in their subject and “geek” anywhere in the message.
- OR – OR, which must be in capital letters, allows you to search for one term or another. For example, subject:(how OR geek) would return messages with the word “how” or the word “geek” in their titles. You can also combine other terms with the OR. For example, from:howtogeek.com OR has:attachment would search for messages that are either from howtogeek.com or have attachments.
- “ “ – Quotes allow you to search for an exact phrase, just like in Google. Searching for “exact phrase” only returns messages that contain the exact phrase. You can combine this with other operators. For example, subject:”exact phrase” only returns messages that have “exact phrase” in their subject field.
- - – The hyphen, or minus sign, allows to search for messages that don’t contain a specific term. For example, search for -from:howtogeek.com and you’ll only see messages that aren’t from howtogeek.com.
Hidden Search Tricks
You can access many search operators from the search options dialog, but some are hidden. Here’s a list of the hidden ones:
- list: – The list: operator allows you to search for messages on a mailing list. For example, list:firstname.lastname@example.org would return all messages on the email@example.com mailing list.
- filename: – The filename: operator lets you search for a specific file attachment. For example, file:example.pdf would return emails with a file named example.pdf attached.
- is:important, label:important – If you use Gmail’s priority inbox, you can use the is:important or label:important operators to search only important or unimportant emails.
- has:yellow-star, has:red-star, has:green-check, etc. – If you use different types of stars (see the Stars section on Gmail’s general settings pane), you can search for messages with a specific type of star.
- cc:, bcc: – The cc: and bcc: features let you search for messages where a specific address was carbon copied or blind carbon copied. For example, cc:firstname.lastname@example.org returns messages where email@example.com was carbon copied. You can’t use the bcc: operator to search for messages where you were blind carbon copied, only messages where you bcc’d other people.
- deliveredto: – The deliveredto: operator looks for messages delivered to a specific address. For example, if you have multiple accounts in the same Gmail inbox, you can use this operator to find the messages sent to a specific address. Use deliveredto:firstname.lastname@example.org to find messages delivered to email@example.com.
Saving a Filter
Create a filter to automatically perform actions when a message matches a specific search.
To create a filter, click the down arrow again, then click the “Create filter with this search” option.
Select an action and click the “Create filter” button.
You can manage your filters from the Filters pane on Gmail’s settings page.
Filters can also be used to block email addresses. We’ve covered using filters to block your crazy ex in the past.