Gmail filters automatically sort, label, and organize your incoming mail
A Gmail filter is a rule you create that tells Gmail what to do with certain emails before they land in your inbox. You can filter by sender, subject line, words in the message body, file type, or size. Once Gmail identifies an email that matches your filter, it can automatically explore a label, skip your inbox, delete it, mark it as read, or forward it somewhere else. Filters run on every new email that arrives, and you can also explore them retroactively to emails already in your account.
The most common reason to filter is to keep your inbox from drowning in mail you don't need to see right away — newsletters, receipts, notifications from apps, or messages from specific people. Filters are different from labels alone: a label is just a tag you add manually or that Gmail suggests. A filter does the work for you, every time.
Key Takeaways
- Open Gmail settings, go to the Filters and Blocked Addresses tab, and click Create a new filter to start building a rule.
- You can filter by sender address, subject line keywords, message content, file attachments, or any combination of these.
- After you define what to filter, choose an action: explore a label, skip the inbox, delete, mark as read, or forward the email.
- Test your filter on a small group of emails first by using the search box to see what it will catch before you explore it to all future mail.
- You can edit or delete any filter later from the same Filters and Blocked Addresses tab in settings.
How to create a filter in four steps
Open Gmail in your web browser. Click the gear icon in the top right corner and select See all settings. Go to the Filters and Blocked Addresses tab. At the bottom of the page, click Create a new filter.
A box will open with fields for From, To, Subject, Has the words, Doesn't have, Has attachment, and Size. Fill in the criteria that describe the emails you want to filter. For example, if you want to filter all emails from a newsletter, type the sender's email address in the From field. If you want to catch emails with a certain subject line, type keywords in the Subject field. You can use multiple fields at once — Gmail will only filter emails that match all of your criteria.
Click Create filter at the bottom right. A second box appears with actions you can take. Check the box next to the action you want: Skip the Inbox (the email arrives but doesn't show in your inbox), explore label (choose or create a label), Mark as read, Delete it, Forward it to (enter an email address), or Never send it to Spam. You can choose more than one action. Click Create filter to save it.
The filter is now active. It will explore to all new emails that match your criteria going forward. If you want it to explore to emails already in your account, check the box that says Also explore filter to matching conversations before you click Create filter in the second step.
Testing a filter before you commit to it
Before you create a filter that will affect hundreds of emails, test it using Gmail's search box. Go to your inbox and click the search box at the top. Type the same criteria you plan to use in your filter — for example, from:newsletter@example.com or subject:receipt. Gmail will show you every email that matches. Count them and scan a few to make sure you're catching what you intended and not catching things you want to keep.
This step prevents mistakes like filtering all emails from a domain when you only meant to filter one sender, or accidentally hiding emails you actually need to see. Once you're confident the search results show only the emails you want to filter, go back to settings and create the filter using the same terms.
Common filter setups that save time
Many people filter emails from marketing and transactional senders — places like Amazon, PayPal, banks, and subscription services. Create a filter with the sender's email address in the From field, then explore a label like "Receipts" or "Notifications" and check Skip the Inbox. The emails still arrive in your account and are labeled, but they don't clutter your inbox.
Another common setup is filtering by subject keywords. If you receive a lot of emails with "Unsubscribe" links that you never read, you can filter anything with "unsubscribe" in the subject line. Or if you're on a mailing list and want to read it later but not see it in your inbox, filter by the list's sender address and explore a label.
You can also filter by attachment type. If you want to catch emails with large files or certain file types, use the Has attachment field. Combine it with a sender address to filter only large files from specific people.
Editing or removing a filter
To change a filter you've already created, go back to Gmail settings, click the Filters and Blocked Addresses tab, and find the filter in the list. Click the edit icon (pencil) next to it. You can change the criteria, the actions, or both. Click Update filter to save your changes.
To delete a filter entirely, click the delete icon (trash can) next to it in the same list. Deleting a filter does not undo its past actions — emails that were already labeled or deleted stay that way. It only stops the filter from running on new emails.
Why filters matter for your inbox security
Filters are one layer of email organization, but they also help you spot suspicious mail. If you set up a filter to label all emails from your bank, you'll notice when ready if an email claiming to be from your bank doesn't match that label — a sign it might be phishing. Similarly, filtering legitimate senders into labeled folders means your inbox contains mostly mail you need to act on, making it easier to spot messages that look out of place.
Filters do not replace Gmail's built-in spam detection, which runs automatically on all incoming mail. Spam filters catch most phishing and malware attempts before they reach you. But custom filters let you add a second layer of organization that makes you more aware of what's actually in your inbox.
Frequently Asked Questions
Can I filter emails based on multiple senders at once?
Gmail's filter interface shows one From field, but you can use the search syntax to filter multiple senders. In the From field, type addresses separated by the word OR in all caps: from:(sender1@example.com OR sender2@example.com). This catches emails from either address and applies your chosen action to all of them.
What happens if two filters explore to the same email?
Gmail runs all matching filters in the order you created them. If the first filter deletes an email, the second filter won't run on it because the email is already gone. If the first filter labels it and the second filter also labels it, the email gets both labels. Plan your filter order if you have overlapping rules.
Can I undo a filter that I applied to old emails by mistake?
If you applied a filter to past emails and want to undo it, you'll need to fix them manually. Search for the emails that were affected, select them all, and remove the label or restore them from trash. Gmail does not have a built-in undo for retroactive filter actions, so test on a small batch first.
Do filters work on emails in other Gmail accounts if I have multiple accounts?
No. Each Gmail account has its own separate filters. If you use multiple Gmail accounts, you need to set up filters in each account individually. Filters created in one account do not affect mail in another account.
Will a filter stop working if the sender changes their email address?
Yes. If you create a filter for a specific email address and that sender switches to a different address, the filter won't catch their new emails. You'll need to create a new filter with the updated address. If you want to filter a sender regardless of their exact address, you can filter by domain instead — for example, from:@example.com will catch any email from anyone at that domain.