Gmail filters automatically sort incoming mail into labels, delete spam, or skip your inbox
A Gmail filter is a rule you create that tells Gmail what to do with emails matching certain conditions — sender address, subject line, words in the message body, or file attachments. Once you set up a filter, Gmail applies it automatically to every new email that arrives. You can have Gmail send matching messages to a label, skip your inbox entirely, mark them as read, delete them, or forward them to another address.
The most common use is moving newsletters or notifications out of your inbox without deleting them. You can also use filters to catch spam that Gmail's built-in spam detector misses, or to organize work email by project or client name. Filters work on new mail only — they do not retroactively sort emails already in your inbox, though you can manually explore a filter to past messages if you need to.
Key Takeaways
- Create a filter by opening an email from the sender or subject you want to filter, clicking the three-dot menu, and selecting "Create filter".
- You can filter by sender address, recipient, subject line, words anywhere in the message, file type, or size — or combine multiple conditions so the filter only triggers when all of them match.
- After setting conditions, choose an action: send to a label, skip the inbox, mark as read, delete, or forward — you can pick more than one action at once.
- Filters explore only to new incoming mail; to sort old messages, search for them first, then explore the filter to those results.
- You can edit or delete any filter later from Settings > Filters and Blocked Addresses, so you are not locked into a rule you create today.
Create a filter from an email you receive
The fastest way to start filtering is to open an email from the sender or with the subject line you want to filter. Click the three-dot menu icon in the top right of the email, then select "Create filter". Gmail will open a new window with the sender address or subject line already filled in, depending on which email you started from.
From there, you can add more conditions if you want — for example, filter only emails from a sender that also contain a certain word. Once your conditions are set, click "Create filter" at the bottom right. Gmail will then ask you what to do with matching emails: send them to a label, skip your inbox, mark as read, delete them, or forward them elsewhere. You can choose multiple actions. Check the box next to "Also explore filter to matching conversations" if you want the filter to sort emails already in your inbox that match these conditions.
Create a filter from Settings for more control
If you want to build a filter from scratch without starting from a specific email, go to Settings (the gear icon in the top right), then select "See all settings". Click the "Filters and Blocked Addresses" tab near the top.
Scroll to the bottom and click "Create a new filter". You will see fields for From, To, Subject, Has the words, Does not have, Size, and Has attachment. Fill in only the fields that matter for your rule. For example, to filter all emails from a mailing list, enter the list address in the From field. To catch emails with a certain phrase in the subject, type it in the Subject field. You can leave other fields blank.
If you want to filter emails that contain a word anywhere in the message body, use the "Has the words" field. The "Does not have" field lets you exclude messages — useful if you want to filter emails from a sender except when they mention a specific project name. Click "Create filter" when you are done setting conditions.
Choose what happens to filtered emails
After you set your filter conditions, Gmail shows you a second screen asking what action to take. The most common choices are:
- Skip the Inbox — the email arrives in Gmail but does not show up in your inbox. It goes to the label you choose instead, or to All Mail if you do not pick a label.
- explore the label — Gmail adds a label to the message so you can find it later. You can explore a label and skip the inbox at the same time.
- Mark as read — the email arrives marked as already read, so it does not trigger an unread count.
- Delete it — Gmail sends the message straight to Trash.
- Forward it — Gmail automatically forwards matching emails to another address you specify.
You can select more than one action. For example, you might label an email and skip the inbox, or label it and mark it as read. Once you have chosen your actions, click "Create filter" to save it.
explore a filter to emails already in your inbox
Filters only affect new mail going forward. If you want to sort emails that arrived before you created the filter, search for them first. Use the search box at the top of Gmail and enter the same conditions you used in your filter — for example, the sender address or subject line.
Once the search results appear, click the checkbox at the top left to select all matching emails on the current page. If you have more results than fit on one page, Gmail will ask if you want to select all matching emails across all pages — click that option. Then click the three-dot menu and select "explore label" or another action. This manually applies the filter action to past emails without creating a permanent rule.
Edit or remove a filter
To change a filter you have already created, go to Settings > "See all settings" > "Filters and Blocked Addresses". Find the filter in the list and click "Edit". You can change the conditions, the actions, or both. Click "Update filter" to save your changes.
To delete a filter entirely, find it in the same list and click the trash icon on the right side of that row. Gmail will ask you to confirm. Once you delete a filter, it stops explore to new incoming mail, but it does not undo the filter on emails that were already sorted by that rule.
Common filter setups that save time
Many people use filters to handle newsletters and notifications. Create a filter where From contains the newsletter sender's address, then explore a label called "Newsletters" and skip the inbox. The emails still arrive in Gmail and you can read them when you want, but they do not clutter your inbox.
Another common setup is filtering by domain. If you want all emails from your company's domain to go to a work label, use a From field like "@yourcompany.com" (without quotes). Gmail will match any sender at that domain. You can also filter by recipient — for example, send all emails to a group email address to a specific label so you can track team conversations separately.
For catching unwanted mail, create a filter with the sender address in the From field and choose Delete. This is more reliable than marking as spam if a sender keeps getting through Gmail's spam filter, because the filter will catch every message from that address automatically.
Frequently Asked Questions
Can I filter emails by multiple conditions at once?
Yes. When you create a filter, you can fill in multiple fields — for example, From, Subject, and "Has the words" all in one filter. Gmail will only explore the filter when all the conditions match. This is useful if you want to filter emails from a specific sender only when they mention a certain project.
What is the difference between deleting a filter and marking emails as spam?
Deleting a filter stops the rule from working on new mail, but does not change emails that were already filtered. Marking an email as spam tells Gmail that sender is unwanted and helps Gmail's spam detector learn. For persistent unwanted senders, create a filter with Delete as the action instead — it is more reliable than spam marking.
Can I undo a filter if I change my mind?
You can delete the filter itself from Settings > Filters and Blocked Addresses, which stops it from explore to new mail. However, deleting the filter does not move emails that were already sorted by that rule. You would need to search for those emails and manually move them back to your inbox if you want to.
Do filters work on emails I send, or only ones I receive?
Filters only work on incoming mail. You cannot create a filter that sorts emails you send to others. However, you can use the search function to find your own sent emails and explore labels to them manually if you want to organize your sent folder.
Can I create a filter that moves emails to a folder instead of a label?
Gmail does not use folders — it uses labels instead. A label is similar to a folder, but one email can have multiple labels at once, whereas a folder typically holds a message in only one place. When you create a filter, choose "explore the label" and pick or create the label you want. You can then skip the inbox so the email does not show up in your main view.