How to Set Up Email Filters in Gmail
In this article
Gmail filters let you automatically sort, label, archive, or delete incoming mail based on rules you define, so you can keep your inbox focused without manual sorting. To set one up, open Gmail on the web, click the search options icon in the search bar, fill in your criteria, then choose Create filter and pick the actions you want. The whole process takes about a minute per filter, and you can create as many as you need.
What You'll Need
- A Gmail account (personal or Google Workspace).
- A web browser on desktop for the full filter editor. The Gmail mobile app does not offer the full filter creation screen, so use a computer for setup.
- Optional: existing labels if you want filtered mail to land in a specific folder.
Step-by-Step
- Open Gmail in a web browser and sign in to the account you want to filter.
- In the search bar at the top, click the small icon on the far right that looks like sliders or a funnel. This opens the advanced search panel. Menu labels can differ slightly by version, device, or region.
- Fill in one or more fields to define your rule. Common fields include From (sender address), To, Subject, Has the words, and Doesn't have. You can also use the search box directly with operators like
from:newsletter@example.comorsubject:invoice. - If you want to test the criteria first, click Search to preview which existing messages match. This step is optional but useful before committing.
- Click Create filter at the bottom of the search panel.
- On the next screen, tick the actions you want. Typical choices: Skip the Inbox (Archive it), Apply the label, Mark as read, Star it, Delete it, Never send it to Spam, or Always mark it as important.
- If you choose Apply the label, pick an existing label from the dropdown or click New label to create one on the spot.
- Decide whether to also apply the filter to matching conversations that already exist. Tick the box if you want past mail sorted too; leave it unticked if you only want future mail affected.
- Click Create filter to save. The rule is active immediately.
- To edit or remove a filter later, go to Settings (the gear icon) > See all settings > Filters and Blocked Addresses. You'll see a list of your filters with Edit and Delete links next to each one.
Common Mistakes
- Using too broad a criterion. A filter with only "Has the words: invoice" will catch every message containing that word, including personal mail. Combine fields (sender plus subject) to narrow it.
- Forgetting to tick "Also apply filter to matching conversations." Without it, only new mail is filtered; your existing inbox stays cluttered.
- Deleting instead of archiving. Delete sends mail to Trash, where it is permanently removed after 30 days. Archive is usually safer because messages remain searchable under All Mail.
- Creating filters on the mobile app. The Gmail app does not expose the full filter editor; use a desktop browser.
- Overlapping filters. Multiple filters can match the same message. Gmail applies all matching filters, so a message can be labeled by one and archived by another. Review the list periodically.
- Typo in the sender address. A single wrong character means the filter never fires. Copy addresses directly from a received message when possible.
Tips
- Use the "Has the words" field with operators like
list:for mailing lists orhas:attachmentto catch messages with files. - Create a label first (left sidebar > Create new label) so it is ready to select when building the filter.
- Test with the Search button before saving; it shows exactly which messages will match.
- Keep a short naming convention for labels (for example, "Receipts" and "Newsletters") so filters are easy to audit.
- Filters run in the order Gmail processes them, but you cannot reorder them manually. If two filters conflict, simplify by merging them into one with combined criteria.
- For recurring senders, a filter that archives and labels is usually better than deleting, because you keep a searchable record.
Troubleshooting
If a filter does not seem to work, check these in order:
- Confirm the filter exists under Settings > See all settings > Filters and Blocked Addresses and that it is not listed with an error.
- Re-open the filter and verify the criteria match the actual sender address or subject exactly. Copy the address from the message header.
- Check whether another filter is overriding the action. For example, one filter archives while another marks as important; the combined result may look wrong.
- Look in All Mail and Spam. A filter that archives mail still leaves it searchable; if you expected it in the inbox, that is the filter working as designed.
- If mail is going to Spam despite a filter, add "Never send it to Spam" to the filter actions.
- Sign out and back in, or try a different browser, if the settings page will not save. Clearing the browser cache is a safe next step; it does not delete mail.
- As a last resort, delete the filter and recreate it. Deleting a filter does not delete any messages.
Frequently Asked Questions
Can I create filters in the Gmail mobile app?
No. The Gmail app does not include the full filter creation screen. Use a web browser on a computer to create and edit filters; the filters you create there apply to mail on all devices.
Do filters apply to existing emails?
Only if you tick "Also apply filter to matching conversations" when creating the filter. Otherwise, the filter affects only new mail that arrives after it is saved.
Can I have multiple actions in one filter?
Yes. You can tick several boxes at once, such as Apply the label, Mark as read, and Skip the Inbox. Gmail performs all selected actions on matching messages.
What happens if two filters match the same email?
Gmail applies all matching filters. That can produce combined results, such as a label from one filter and archiving from another. Review your filter list if behavior seems unexpected.
Does deleting a filter delete the emails it sorted?
No. Deleting a filter only removes the rule. Messages already labeled or archived stay where they are until you move or delete them manually.
Can I filter by attachment or mailing list?
Yes. Use the "Has the words" field with operators such as has:attachment or list: followed by the list name. These operators work in the advanced search panel and in the main search bar.