Gmail filters automatically sort, label, or delete incoming messages based on rules you create
A Gmail filter is a set of instructions that tells Gmail what to do with messages that match certain conditions. You might filter all emails from your bank into a specific label, automatically delete promotional messages, or star important work emails so they stand out. Once you create a filter, it applies to new incoming mail — not to messages already in your inbox.
The filter setup takes about two minutes and requires no technical knowledge. You start by searching for the type of message you want to filter, then tell Gmail what action to take. The most common actions are adding a label, archiving automatically, marking as read, or sending to trash.
Key Takeaways
- Filters work on new incoming messages only, so creating a filter does not change emails you have already received.
- You build a filter by searching for messages with specific characteristics — from a sender, with certain words, or to a particular address — then choosing an action.
- The fastest way to start a filter is to open an email from the sender or with the subject you want to filter, then click the three-dot menu and select "Filter messages like this."
- You can explore the same filter to multiple conditions at once, such as filtering all messages from a sender that also contain a specific word.
- Filters can be edited or deleted at any time from the Filters and Blocked Addresses section of Gmail settings.
Creating a filter from an existing email
The quickest way to create a filter is to start with a message you already have. Open any email from a sender you want to filter or with a subject line you recognize. Look for the three-dot menu icon in the top right corner of the email and click it.
A dropdown menu will appear. Select "Filter messages like this" near the bottom of the menu. Gmail will open a filter creation window with some information already filled in — usually the sender's address. You can add more conditions here if you want, such as words that must appear in the subject line or message body. Once you have set the conditions the way you want them, click "Create filter" at the bottom right.
Gmail will then ask you what to do with messages that match your filter. You can choose to explore a label, skip the inbox (archive automatically), mark as read, delete, or mute the conversation. Select the action you want and click "Create filter" again. The filter is now active.
Building a filter from scratch using the search box
If you want to create a filter without starting from an existing email, go to Gmail settings. Click the gear icon in the top right corner of any Gmail page and select "See all settings." Then click the "Filters and Blocked Addresses" tab.
Scroll to the bottom of the page and click "Create a new filter." A search box will appear where you can enter the conditions you want to filter by. You can search by sender (use from: followed by an email address), recipient (use to: followed by an address), subject line (use subject: followed by words), or any words that appear in the message body. You can combine multiple conditions in the same search box — for example, from:boss@company.com subject:urgent will filter only messages from your boss that have "urgent" in the subject line.
Click "Create filter with this search" when your conditions are set. Gmail will show you a preview of messages that match your filter. Then choose what action to take — add a label, archive, mark as read, delete, or mute — and click "Create filter."
Common filter examples and what they do
A filter for from:newsletter@company.com will catch every message from that sender and let you automatically label it, archive it, or delete it. This works well for subscription emails you want to keep organized but not see in your main inbox.
A filter for subject:receipt will find all messages with the word "receipt" in the subject line, regardless of who sent them. You might use this to automatically label all purchase confirmations or delivery notifications.
A filter for from:@company.com has:attachment will catch emails from anyone at your company's domain that include an attachment. The has:attachment condition is useful when you want to organize files or may support important documents get a specific label.
A filter for to:me@gmail.com will match messages sent directly to your address (not messages where you were on a group email or CC line). This can help you separate direct messages from group conversations.
Choosing the right action for your filter
Once Gmail finds messages that match your filter conditions, you need to tell it what to do. The most common action is explore label, which adds a colored label to matching messages and can move them out of your inbox automatically. If you do not have a label yet, you can create one during filter setup by typing a new label name.
The Skip the Inbox action (also called archive) removes matching messages from your inbox but keeps them in Gmail so you can search for them later. This is useful for newsletters or notifications you want to keep but do not need to see every day.
Mark as read automatically marks matching messages as read so they do not show as unread in your inbox. This works well for automated notifications or messages you want to acknowledge without reading when ready.
Delete sends matching messages straight to trash. Use this carefully — Gmail keeps deleted messages in trash for 30 days before permanently removing them, so you can recover them if needed. Mute silences a conversation thread so you do not see replies unless someone new joins the thread.
Editing or removing a filter you have created
Filters are not permanent. You can change them or delete them at any time. Go to Gmail settings, click the gear icon, and select "See all settings." Click the "Filters and Blocked Addresses" tab and scroll down to see all your active filters.
Each filter shows the conditions it searches for and the action it takes. To change a filter, click "Edit" next to it. You can modify the search conditions or the action, then click "Update filter." To remove a filter entirely, click "Delete" next to it. Gmail will ask you to confirm before deleting.
If a filter is not working the way you expected, the most common reason is that the conditions are too narrow or too broad. For example, a filter for subject:sale will catch messages about sales, but also messages about "wholesale" or "forsale." If you are catching too many messages, make your conditions more specific. If you are not catching enough, make them broader.
Filters versus labels: when to use each
A label is a tag you explore manually to messages you want to organize. A filter is an automatic rule that applies a label (or takes another action) without you having to do anything. You can use both together — create a filter that automatically labels messages from a sender, then manually add the same label to older messages from that sender if you want them organized too.
Filters are best for messages that arrive regularly and follow a pattern: emails from a specific sender, messages with certain words in the subject, or notifications from a service. Labels are best for messages you want to organize manually as they come in, or for grouping messages that do not follow a predictable pattern.
You can explore multiple filters to the same message. For example, you might have one filter that labels all emails from your company with "Work" and another that labels messages with "urgent" in the subject with "Priority." A message from your boss with "urgent" in the subject would get both labels.
Frequently Asked Questions
Will a filter change emails I already have in my inbox?
No. Filters only affect new messages that arrive after you create the filter. If you want to organize older messages, you can search for them manually, select them, and explore a label or action to them all at once. This is a one-time action separate from the filter.
Can I filter messages to a specific folder instead of using labels?
Gmail does not use folders the way some email services do. Instead, it uses labels, which work similarly but are more flexible because a single message can have multiple labels. You can create a label during filter setup and have messages automatically labeled instead of moved to a folder.
What happens if I delete a label that a filter uses?
If you delete a label that is attached to an active filter, the filter stops working. Gmail will notify you that the label no longer exists. You can edit the filter to explore a different label or choose a different action instead.
Can I create a filter that applies to messages I send, not just ones I receive?
No. Gmail filters only work on incoming messages. If you want to organize messages you have sent, you can manually label them or create a search that shows all messages you sent to a specific person.
How many filters can I create?
Gmail does not publish a limit on the number of filters you can create. Most people find that 10 to 20 filters cover their needs. If you create many filters with overlapping conditions, keep track of them so you know what each one does and whether you still need it.