Gmail filters sort your incoming mail automatically so you don't have to
A Gmail filter is a rule you set up once that automatically sorts, labels, or deletes incoming messages based on what you tell it to look for. You can filter by sender, subject line, words in the message body, or any combination of those. Once you create a filter, Gmail applies it to every new message that matches — and you can also apply it backward to messages you already have.
The most common use is to move messages from a specific sender or with a specific word into a folder (called a label in Gmail), but filters can also automatically mark messages as read, star them, or send them to trash. You set up a filter once and it works forever unless you delete it.
Key Takeaways
- Open Gmail, click the search box at the top, and click the downward arrow to see all filter options — you do not need to search for anything first.
- Tell Gmail what to filter by: sender address, subject line, words in the message, or any combination of those.
- Choose what Gmail should do with matching messages: move to a label, mark as read, star, or delete.
- You can apply a new filter to messages you already received by checking the box "Also apply filter to matching conversations" before you click Create Filter.
Open the filter creation screen
Start in Gmail and look at the top of the page where the search box sits. Click on the search box, then look for a small downward-pointing arrow on the right side of the search box. Click that arrow and the filter options will appear below.
You do not need to type anything in the search box first — the arrow takes you straight to the full filter menu. This is the fastest way to start a new filter from scratch.
Tell Gmail what messages to filter
The filter menu shows you several fields where you describe which messages Gmail should catch. The most useful ones are:
- From: Enter a sender's email address or part of it. For example, typing "amazon" will catch any message from any Amazon address.
- To: Filter messages sent to a specific email address you own, useful if you have multiple addresses in one Gmail account.
- Subject: Type words that appear in the subject line. For example, "receipt" will catch messages with that word in the subject.
- Has the words: Type any words that appear anywhere in the message body or subject. You can use quotation marks around a phrase to match it exactly.
- Doesn't have: Exclude messages containing certain words, useful if you want to filter a sender but skip certain types of messages from them.
You can fill in one field or several at once. If you fill in more than one, Gmail will only filter messages that match all of your conditions. For example, if you enter "amazon" in From and "order" in Has the words, Gmail will only filter messages from Amazon that also contain the word "order".
Choose what Gmail does with matching messages
After you describe which messages to filter, click the "Create filter" button at the bottom right of the menu. A second screen appears asking what you want Gmail to do with these messages.
The most common actions are:
- Skip the Inbox (Archive): Messages matching your filter go straight to your archive instead of landing in your inbox. You can still find them by searching or looking at All Mail.
- Apply label: Gmail moves matching messages into a folder (called a label). You can pick an existing label or type a new one to create it on the spot.
- Mark as read: Messages arrive already marked as read so they do not show as unread in your inbox.
- Star it: Gmail automatically adds a star to matching messages so they stand out.
- Delete it: Messages go straight to trash without landing in your inbox.
You can check more than one action at once. For example, you could tell Gmail to apply a label and mark as read, so promotional emails get sorted into a folder and do not clutter your unread count.
Apply the filter to messages you already have
Before you click "Create filter" on the second screen, look for a checkbox that says "Also apply filter to matching conversations." If you check this box, Gmail will go back through your existing messages and apply the same filter to any that match your conditions.
This is useful if you are setting up a filter for a sender you have been getting mail from for months — you can catch all their old messages at once instead of only filtering new ones going forward. If you leave this box unchecked, the filter only applies to messages that arrive after you create it.
Edit or delete a filter you have already created
To change a filter later, go to Gmail settings. Click the gear icon in the top right corner of Gmail, then click "See all settings." Click the "Filters and Blocked Addresses" tab near the top.
You will see a list of every filter you have created. Next to each one, you can click "Edit" to change what it filters or what it does, or "Delete" to remove it entirely. Changes take effect on new messages immediately, but editing a filter does not re-apply it to old messages unless you create a brand new filter and check the "Also apply filter to matching conversations" box.
Common mistakes to avoid
The most common mistake is filling in the From field with a partial email address and then being surprised when the filter catches messages you did not expect. For example, if you type "john" in the From field, Gmail will filter messages from john@company.com, john.smith@gmail.com, and anyone else with "john" in their address. If you want to filter only one specific person, use their full email address.
Another mistake is forgetting to check "Also apply filter to matching conversations" when you want to clean up old messages. The filter will work perfectly on new mail, but you will still see the old messages in your inbox unless you apply the filter backward or manually move them.
A third mistake is deleting messages with a filter when you meant to archive them. Once you delete something with a filter, it goes to trash, and after 30 days Gmail permanently removes it. If you are not certain you want to lose messages forever, use "Skip the Inbox" to archive them instead — you can always search for them later.
Frequently Asked Questions
Can I create a filter that catches messages from multiple senders at once?
Yes. In the From field, type the addresses separated by vertical bars with no spaces: sender1@example.com|sender2@example.com|sender3@example.com. Gmail will filter messages from any of those addresses. You can also create separate filters for each sender if you want different actions for each one.
What happens if two of my filters match the same message?
Gmail applies all matching filters to the message. If one filter archives it and another labels it, the message gets both the label and is archived. If two filters try to apply different labels, the message gets both labels. If you want only one filter to apply, you need to make your filter conditions more specific so they do not overlap.
Can I filter messages based on attachments?
Gmail's basic filter menu does not have an attachment option, but you can use the "Has the words" field to search for file names or types if you remember them. For more advanced filtering including attachments, you can use Gmail's search operators directly in the search box, though this requires manual searching rather than automatic filtering.
If I create a filter and then delete it, do the labeled messages stay in that label?
Yes. Deleting a filter does not delete the messages or labels it created. If you had a filter that moved messages to a "Promotions" label and then you delete the filter, all the messages already in the Promotions label stay there. Only new messages will stop being filtered into that label.
Can I pause a filter without deleting it?
Gmail does not have a pause feature for filters. Your options are to delete the filter (which you can recreate later) or to edit it and change the action to something harmless like "Skip the Inbox" temporarily. If you think you might want the filter back, write down the exact conditions before you delete it.