What Gmail filters do and why you need them

A Gmail filter is a rule that automatically sorts, labels, or deletes incoming emails based on what you tell it to look for. Instead of manually moving emails around after they arrive, you set up a filter once and Gmail does the work for every matching message from that point forward. Filters can catch emails from a specific sender, emails with certain words in the subject line, or messages from entire domains.

The most common use is moving emails into labeled folders so your inbox stays clean. You might filter all receipts from online shopping into a "Receipts" label, or send newsletters to a "Reading List" folder. Filters can also mark emails as read automatically, star them, or skip your inbox entirely and go straight to a label.

Key Takeaways

  • Open Gmail settings, click the Filters tab, and select "Create a new filter" to start building a rule.
  • Tell Gmail what to search for — a sender's email address, words in the subject line, or specific keywords in the message body.
  • Choose what Gmail should do with matching emails: apply a label, archive them, delete them, or mark them as read.
  • Test your filter on existing emails first by using the "Create filter" button instead of "Skip to Actions" to see what it will catch.
  • You can edit or delete filters anytime from the Filters tab in settings without affecting emails already sorted.

How to open the filter creation screen

Start by opening Gmail in your web browser and signing in to your account. Click the gear icon in the top right corner of the page, then select "See all settings" from the dropdown menu.

Once you are in Settings, look for the "Filters and Blocked Addresses" tab near the top of the page. Click it. You will see a list of any filters you have already created. At the bottom of this list, click the blue "Create a new filter" button.

Setting up what the filter should look for

A new window will open with search fields. This is where you tell Gmail what kind of emails to catch. You do not have to fill in every field — only the ones that match what you are looking for.

The most common fields are: From (emails from a specific person or company), To (emails sent to a specific address), Subject (emails with certain words in the subject line), and Has the words (emails containing specific text anywhere in the message). If you are filtering emails from your bank, for example, you would type the bank's email address in the From field. If you want to catch all emails with "invoice" in the subject, type that in the Subject field.

You can also use the Has attachment checkbox to catch only emails with files attached, or the Size field to filter by message size. Leave fields blank if they do not apply to what you are filtering.

Testing your filter before you apply it

Before you commit to a filter, you should see what emails it will actually catch. At the bottom of the search window, click "Search" to see a list of existing emails that match your criteria. This step prevents you from accidentally filtering important emails into the wrong place.

Look through the results. If the list includes emails you did not mean to catch, go back and make your search more specific. For example, if filtering by "invoice" catches emails from multiple senders you do not want, add the sender's address to the From field to narrow it down.

Once the search results look right, click "Create filter with this search" at the bottom of the window. Do not click "Skip to Actions" — that skips the preview step and goes straight to setting up what the filter does.

Choosing what Gmail should do with matching emails

Now you will see a second window with actions. This is where you tell Gmail what to do when it finds an email that matches your filter. Check the boxes next to the actions you want:

  • Apply label: Moves the email to a labeled folder. If you do not have a label yet, you can create one by typing a new name.
  • Skip the Inbox: Sends matching emails straight to the label without showing them in your main inbox.
  • Mark as read: Automatically marks matching emails as read so they do not show as new.
  • Star it: Adds a star to matching emails so they stand out.
  • Delete it: Sends matching emails straight to trash. Use this carefully.
  • Never send it to Spam: Prevents Gmail from marking matching emails as spam, useful for senders Gmail sometimes flags incorrectly.

Most filters use "Apply label" and "Skip the Inbox" together — this moves emails to a folder and keeps your inbox clean. You can select multiple actions at once. For example, you might apply a label, skip the inbox, and mark as read all in one filter.

Finishing and testing your filter

Once you have chosen your actions, click the blue "Create filter" button at the bottom. Gmail will confirm that the filter has been created and return you to the Filters tab.

Your filter is now active and will apply to all new incoming emails that match your search. It does not automatically sort emails that arrived before you created the filter. If you want to apply the filter to older emails, go back to the Filters tab, find your new filter, and click "Apply filter to matching conversations" — but only if you are certain the filter is set up correctly.

Check your inbox over the next day or two to make sure emails are being sorted the way you intended. If something is not working, you can edit the filter by clicking the pencil icon next to it in the Filters tab, or delete it entirely by clicking the trash icon.

Common filter setups that save time

Many people use the same filters repeatedly. Filtering all emails from a mailing list into a single label keeps them out of your main inbox but lets you read them when you have time. Filtering receipts and confirmations into an "Orders" label makes them easy to find later without cluttering your inbox.

You can also filter emails to yourself — some people filter emails they send to a specific address into a label so they can track them. Another common setup is filtering emails from a domain (like all messages from @company.com) into a work label, which is faster than filtering individual senders.

If you receive emails from a sender you do not want to see at all, you can create a filter that deletes them automatically. This is different from blocking — the emails are deleted rather than moved to spam, so you will not see them anywhere.

Frequently Asked Questions

Can I create a filter that applies to emails I already received?

Filters only apply to new emails going forward. However, after you create a filter, Gmail shows an option to "Apply filter to matching conversations" — this lets you apply the filter to older emails that match the same search. Use this only after you have tested the filter on new mail and are sure it works correctly.

What if I want to filter emails from multiple senders into the same label?

Create separate filters for each sender, but have them all apply the same label. Gmail will sort emails from all of them into that one folder. Alternatively, if the senders share a domain (like all from @newsletter.com), you can use the From field to filter the entire domain at once.

Can I undo a filter or change what it does?

Yes. Go to Settings, click the Filters tab, find the filter you want to change, and click the pencil icon to edit it. You can change the search criteria or the actions. Click the trash icon to delete a filter entirely. Deleting a filter does not move emails that were already sorted — they stay in their labels.

Will a filter catch emails if they are in my spam folder?

No. Filters only work on emails that reach your inbox or other Gmail folders. If Gmail is sending emails to spam before the filter sees them, you need to mark those emails as "Not spam" first, then create a filter with the action "Never send it to Spam" to prevent it from happening again.

Can I create a filter based on email size or whether it has an attachment?

Yes. In the filter creation window, use the "Size" field to filter by message size (measured in bytes), or check "Has attachment" to catch only emails with files. You can combine these with other search criteria — for example, filter all emails from a sender that have attachments into a specific label.