The short answer

Open Gmail on the web, click the gear icon, then See all settings, then Filters and Blocked Addresses, then Create a new filter. Fill in the sender, subject, or keyword to match. Click Create filter, then pick an action like Skip the Inbox, Apply a label, or Forward. Click Create filter again to save. Filters run automatically on new mail from that moment forward.
Gmail filters are the fastest way to tame a busy inbox. One rule written in 30 seconds can archive hundreds of newsletters per month, flag every email from your boss, or auto-forward client receipts to your accountant. This guide shows you how to create Gmail filters on both desktop and mobile, the exact recipes that save the most time, and the fix for filters that look saved but never actually run.
Create a Gmail filter on the web
The web version of Gmail is where you build and manage filters. The Gmail mobile apps can trigger filter creation from an open email but cannot write new filter conditions from scratch.
- Go to mail.google.com and sign in.
- Click the gear icon at the top right.
- Click See all settings.
- Click the Filters and Blocked Addresses tab.
- Scroll down and click Create a new filter.
- Fill in one or more match conditions: From, To, Subject, Has the words, Doesn’t have, Size, or Has attachment.
- Click Create filter at the bottom right of the match conditions box.
- Tick the actions you want the filter to perform. Common picks: Skip the Inbox (Archive it), Apply the label, Mark as read, Forward it to, or Always mark it as important.
- Optionally tick Also apply filter to matching conversations to clean up existing mail that fits the rule.
- Click Create filter.
The filter is now active and will run on every new incoming email from this point forward. There is no cap on how many filters you can create per Gmail account.
Create a Gmail filter from an existing email
If you already have an example of the kind of mail you want to filter, Gmail can prefill the sender address for you so you do not have to type it.
- Open the email in Gmail.
- Click the three-dot menu at the top right of the open message.
- Click Filter messages like these.
- Gmail opens the filter builder with the From field already filled with the sender’s address.
- Adjust any other conditions you want to add (Subject, Has the words, etc.), then click Create filter.
- Pick the actions and save as described above.
This shortcut is handy for turning a specific annoying newsletter into a one-click archive rule.
Create filters on the Gmail mobile app
The Android and iPhone Gmail apps have a limited filter builder. You cannot write a new rule from scratch, but you can create a filter based on an open email.
- Open the Gmail app and open the email.
- Tap the three-dot menu at the top right of the message.
- Tap Filter messages like these on Android. On iPhone, this option is under Block [sender name] and then Filter messages like these.
- The app opens a browser view with the Gmail web filter builder. Finish the rule there.
For any filter that does not start with an existing email, use the web version of Gmail. There is no way to type a new From or Subject condition from scratch inside the mobile app itself.
Best filter recipes (copy and paste)
Five rules that cover 80 percent of what people use Gmail filters for.
Auto-archive all newsletters. In the Has the words field, type unsubscribe. Pick actions: Skip the Inbox, Apply the label Newsletters, Mark as read. Every marketing email with an unsubscribe footer now skips the inbox and lands under the Newsletters label for when you want to read them.
Flag emails from your manager as important. In From, type your manager’s email address. Pick actions: Always mark it as important, Never send it to Spam, Apply the label Priority.
Auto-forward client receipts to your accountant. In Subject, type receipt OR invoice OR order confirmation. Pick actions: Forward it to (your accountant’s email), Apply the label Receipts. The OR operator lets one filter catch all three subject patterns.
Archive calendar invite responses. In Subject, type Accepted: OR Declined: OR Tentative:. Pick actions: Skip the Inbox, Apply the label Calendar replies. No more 15 emails per meeting cluttering your main view.
Catch work emails sent after hours. In From, type @yourcompany.com. In Doesn’t have, type alert OR critical OR emergency. Pick actions: Apply the label Not urgent, Mark as read. Great for Sundays when you want a visible queue but not a notification storm.
Edit or delete a Gmail filter
All your filters live on the same Filters and Blocked Addresses settings page. To change one, follow these steps.
- Open Gmail Settings and go to the Filters and Blocked Addresses tab.
- Find the filter in the list. Each row shows the Matches and Do this details.
- Click Edit to change match conditions or actions.
- Click Delete to remove the filter entirely.
- If editing, click Continue, then make changes, then Update filter.
Deleted filters do not reverse their past actions. Emails already archived or labeled stay that way. New mail matching the deleted rule simply comes to the inbox normally.
Troubleshoot filters that are not running
If you created a filter and new matching emails keep showing up in the inbox anyway, one of these is usually the cause.
Cause 1: the filter was saved but the action list was empty. Go back to Filters and Blocked Addresses, find the row, and click Edit. If the Do this column shows nothing, re-tick an action and update.
Cause 2: the Has the words condition is too strict. Gmail does exact phrase matching inside Has the words unless you use operators like OR. If you typed order confirmation expecting to catch emails with just “confirmation” too, the filter will not fire. Use the OR operator or widen the condition.
Cause 3: the filter uses Also apply to existing conversations but was not saved with that box ticked. Old mail matching the rule will not be touched. Only new incoming mail triggers an active filter unless you tick that box at creation time.
Cause 4: Gmail is treating the sender as important. Filters that say Skip the Inbox still override themselves for senders you reply to often (Gmail’s Important markers can win). Add Never send it to Priority Inbox as a belt-and-suspenders action for critical rules.
Quick step-by-step summary (click to expand)
- Create a Gmail filter on the web. The web version of Gmail is where you build and manage filters. The Gmail mobile apps can trigger filter creation from an open email but cannot write new filter conditions from scratch.
- Create a Gmail filter from an existing email. If you already have an example of the kind of mail you want to filter, Gmail can prefill the sender address for you so you do not have to type it.
- Create filters on the Gmail mobile app. The Android and iPhone Gmail apps have a limited filter builder. You cannot write a new rule from scratch, but you can create a filter based on an open email.
- Best filter recipes (copy and paste). Five rules that cover 80 percent of what people use Gmail filters for.
- Edit or delete a Gmail filter. All your filters live on the same Filters and Blocked Addresses settings page. To change one, follow these steps.
Frequently asked questions
How many filters can I create in Gmail?
There is no official cap, and accounts with 500 or more filters are documented. In practice, more than about 200 filters makes the settings page slow to load in some browsers, so most heavy users consolidate overlapping rules once they pass 100.
Do Gmail filters work on Google Workspace accounts?
Yes. The filter settings page and all actions are identical on Google Workspace (formerly G Suite) accounts. Workspace admins can also push organization-wide filter rules through the Admin Console, which apply on top of each user’s personal filters.
Can I export my Gmail filters and import them elsewhere?
Yes. In Filters and Blocked Addresses, scroll to the bottom and click Export. Gmail downloads a mailFilters.xml file containing every active filter. On another Gmail account, go to the same tab and click Import filters to upload the XML and recreate every rule in one go.
What is the difference between a Gmail filter and a label?
A label is a tag you can apply to emails for organization (like a folder, but one email can have many labels). A filter is a rule that performs an action on incoming email automatically, and one of the common actions is Apply a label. Filters create the automation. Labels organize the result.
Will a Gmail filter forward sensitive emails without me knowing?
Only if you explicitly set Forward it to as a filter action. Forwarding also requires that the destination address be verified first under Settings, Forwarding and POP/IMAP, so a malicious actor cannot silently add a forward rule. Review all forwarding addresses periodically if you share a device.
Do Gmail filters apply to emails already in the Trash or Spam folder?
No. Filters only run on incoming mail that lands in your inbox or on existing conversations you ask the filter to apply to. Anything already in Trash or Spam is excluded because Gmail treats those folders as already handled.
Official documentation
We are hoping these filter recipes help you take back control of your inbox. If you build a rule that saves you hours and want it added to this list, drop it in the comments below and we will feature the best ones in the next revision.