Overview
Gmail filters are powerful, but they often feel confusing at first.
Many people run into issues like:
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 do | What to type in the search field | Notes |
|---|---|---|
| Group multiple domains | from:(@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 domain | from:@example.com -@spam.com | - means exclude |
| Filter by subject | subject:(outage OR urgent) | OR works in subject |
| Emails with attachments | has:attachment | Any attachment |
| Only PDF files | filename:pdf | File extension |
| Emails sent directly to you | to:myaddress@gmail.com | Excludes CC |
| Mailing list emails | -to:myaddress@gmail.com | Not sent directly |
| Large emails | larger:5M | Size-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:
This method avoids most common filter issues.
Common Mistakes
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.




