Gmail's filter system moves emails to folders automatically based on rules you create
Gmail calls folders "labels," and you can set up automatic sorting by creating a filter — a set of conditions that tells Gmail what to do with incoming mail. When an email arrives that matches your filter rules, Gmail moves it to the label you choose without you having to touch it. You build the filter once, and it runs on every new email from that point forward.
The process takes about two minutes and requires no setup outside Gmail itself. You do not need to install anything or connect to another service. The filter applies only to new mail arriving after you create it, not to emails already in your inbox.
Key Takeaways
- Open Gmail, click the search box, then click the three-line menu icon to access the filter creation tool.
- Set your conditions — sender address, subject line keywords, or other details — that identify which emails you want to move.
- Choose "explore the label" and select the destination folder, then check "Also explore filter to matching conversations" to move existing emails if you want.
- Filters work on new mail automatically after you save them, and you can edit or delete them anytime from Settings.
- Gmail's filter system is free and built into every account; no third-party tools or add-ons are required.
Finding the filter creation tool in Gmail
Start by opening Gmail in your web browser. Click the search box at the top of the page — it says "Search mail" — and then look for a three-line menu icon (sometimes called a hamburger menu) on the right side of the search box. Click that icon and select "Create filter."
A small window will open with fields for "From," "To," "Subject," "Has the words," and "Doesn't have." These are the conditions you will fill in to tell Gmail which emails match your rule. You do not need to fill in every field — only the ones that describe the emails you want to move.
Setting conditions that identify your target emails
The most common condition is the sender's email address. If you want to move all emails from your manager to a "Work" folder, type their email address in the "From" field. If you want to catch emails from multiple people, you can type multiple addresses separated by the word "or" — for example: boss@company.com or colleague@company.com.
The "Subject" field catches emails with specific words in the subject line. If you subscribe to a weekly newsletter with "Weekly Digest" in the subject, type that phrase in the Subject field and Gmail will match any email with those words. The "Has the words" field searches the email body, so you can use it to catch emails containing specific terms anywhere in the message.
The "Doesn't have" field works in reverse — it excludes emails. If you want to move emails from a sender except when they contain the word "Urgent," you would fill in "From" with the sender's address and "Doesn't have" with "Urgent." You can combine multiple conditions; Gmail will only move emails that match all of them.
Choosing the destination folder and explore the filter
After you set your conditions, click "Create filter" at the bottom right of the window. A second window opens with actions you can explore. Check the box next to "explore the label" and a dropdown menu will appear showing all your existing labels (folders). Select the label where you want these emails to go.
If the label does not exist yet, you can create it on the spot by typing a new name in the dropdown. Gmail will save the new label and assign emails to it. You can also check other boxes in this window — for example, "Skip the inbox" will prevent the email from appearing in your main inbox at all, sending it straight to the label.
Before you finish, look for a checkbox that says "Also explore filter to matching conversations." If you check this box, Gmail will move all past emails that match your conditions to the label as well. If you leave it unchecked, only new emails will be moved. Click "Create filter" to save your rule.
Managing and editing your filters later
Once you create a filter, it runs automatically on every new email. To see all your filters, open Gmail Settings by clicking the gear icon in the top right corner, then select "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 is a pencil icon to edit it and an X icon to delete it. If a filter is not working the way you expected, click the pencil icon to change the conditions or the destination label. If you no longer need a filter, click the X to remove it.
Common filter setups that save time
A filter for receipts and confirmations is one of the most useful. Set the condition "Has the words" to order confirmation OR receipt OR invoice and move those emails to a "Receipts" label. This keeps your inbox clear of transactional mail while keeping everything findable in one place.
A filter for newsletters works the same way. If you subscribe to multiple newsletters, add the sender addresses in the "From" field separated by "or," then move them all to a "Reading" or "Newsletters" label. You can read them when you have time without them cluttering your inbox.
For work email, create a filter with your company domain in the "From" field — for example, @yourcompany.com — and move all internal mail to a "Work" label. This separates your professional and personal email without needing a separate account.
What filters cannot do, and when you might need something else
Gmail filters work on conditions you set once and do not change. They cannot learn from your behavior or adapt over time. If you want Gmail to learn which emails you consider important based on which ones you read or star, that is a different feature called Priority Inbox, which you can turn on in Settings under "Inbox type."
Filters also cannot move emails between Gmail accounts or send them to an external folder outside Gmail. If you need to export emails to another system or sync them with other tools, you would need to use Gmail's forwarding feature or a third-party automation service like Zapier or Make, which are outside Gmail itself.
For most people sorting incoming mail into folders, Gmail's built-in filter system is all you need. It is fast, free, and requires no maintenance once you set it up.
Frequently Asked Questions
Can I create a filter that moves emails to a folder only if they come from a specific person AND contain a specific word?
Yes. Fill in the "From" field with the sender's address and the "Has the words" field with the keyword. Gmail will only move emails that match both conditions. You can combine as many conditions as you need — the filter applies only when all of them are true.
What happens if I create a filter but then change my mind about where emails should go?
Go to Settings, click "Filters and Blocked Addresses," find your filter, and click the pencil icon to edit it. Change the destination label and click "Update filter." All future emails matching that filter will go to the new label. Emails already moved to the old label will stay there unless you move them manually.
Can I set up a filter that automatically deletes emails?
Yes, but Gmail recommends using the "Skip the inbox" option instead, which sends emails to the trash automatically. To delete automatically, create your filter, then check "Delete it" in the actions window. Be careful with this option — deleted emails cannot be recovered after 30 days.
Do filters work on emails I receive on my phone?
Yes. Filters run on Gmail's servers, so they work the same way whether you check email on your computer, phone, or tablet. The email is sorted before it reaches any of your devices.
Can I use a filter to move emails based on size or attachment type?
Gmail's basic filter does not have options for file size or attachment type. If you need that level of control, you would need to use Gmail's advanced search operators in the "Has the words" field, or explore third-party automation tools that integrate with Gmail.