How to Gmail Filters: Useful Search Rules Explained Simply (Copy & Paste OK)

Overview

Gmail filters are powerful, but they often feel confusing at first.
Many people run into issues like:

  • “The filter doesn’t work as expected”
  • “It says 0 matching conversations
  • “Why didn’t my old emails get labeled?”

The good news is that Gmail filters are not complicated.
They simply save search conditions.

If a search works, the filter will work too.
This article lists common and reliable filter rules in a simple format, so you can copy and use them without worrying about breaking anything.

What You Can Do with Gmail Filters (and How to Write Them)

Gmail filters use the same syntax as the search bar.
Here are some commonly used and practical examples.

What you want to doWhat to type in the search fieldNotes
Group multiple domainsfrom:(@example.com OR @example.net)

If you have subdomains, such as from: example.com OR example.net, you can simply specify the main domain.
OR must be uppercase
Exclude a domainfrom:@example.com -@spam.com- means exclude
Filter by subjectsubject:(outage OR urgent)OR works in subject
Emails with attachmentshas:attachmentAny attachment
Only PDF filesfilename:pdfFile extension
Emails sent directly to youto:myaddress@gmail.comExcludes CC
Mailing list emails-to:myaddress@gmail.comNot sent directly
Large emailslarger:5MSize-based filter

※ Replace myaddress@gmail.com with your own email address.

Apply the filter to existing emails

To make sure the filter also applies to emails you already have:

  1. Enter the condition in Gmail’s search bar
  2. Confirm that matching emails are shown
  3. Click the three-dot menu → Create filter

This method avoids most common filter issues.

Common Mistakes

  • Using lowercase or instead of uppercase OR
  • Separating conditions with commas
  • Creating a filter without testing the search first
  • Putting conditions in the wrong field

Especially important: OR must be written in uppercase.

Summary

Gmail filters are simpler than they look.
If your search works, your filter will work.

Instead of creating many separate rules,
writing slightly better search conditions makes filters easier to manage.

You can treat the table above as a personal cheat sheet and reuse it whenever needed.