Gmail Filters and Labels: Automate Your Inbox
Filters sort incoming mail for you. Learn how to create Gmail filters from a search or a message, edit or export them, and keep rules simple enough to trust.

- A filter applies actions to new mail that matches your search
- Create filters from search options or from a message you already have
- Review and export filters from Settings
- Filters for forwarding only affect new messages
If your inbox is a mix of newsletters, receipts, notifications and real messages, you waste time sorting it by hand. Filters let Gmail do the sorting. This guide is based on Google's own help page for creating rules to filter emails.
What a filter does
Google's help page says Gmail filters can send email to a label, or archive, delete, star, or automatically forward your mail. In other words, a filter has two parts: a set of conditions that mail must match, and an action to take when it does.
Create a filter from a search
Google's steps, on a computer:
- Open Gmail.
- In the search box at the top, click Show search options.
- Enter your search criteria. You can check that your search worked correctly by clicking Search and looking at the emails that appear.
- At the bottom of the search window, click Create filter.
- Choose what you want the filter to do.
- Click Create filter.
Checking the search first is a good habit. If the search shows messages you do not want to affect, adjust the criteria before you create the rule.
Create a filter from a message
If you already have a message that is typical of what you want to sort:
- Open Gmail.
- Check the box next to the email.
- Click More.
- Click "Filter messages like these".
- Enter or adjust the filter criteria.
- Click Create filter.
Useful filter ideas
- Receipts and invoices. Match messages with words like "receipt" or "invoice" and apply a label called Receipts, skipping the inbox if you do not need to see them immediately.
- Newsletters. Match a sender's address and apply a label called Reading. You can check them when you have time.
- Notifications from tools. Label and archive routine alerts from project or social tools, keeping the label so you can find them.
- Messages from key people. Match your manager or main clients and star them or add an Important label, so they stand out.
- Calendar updates. Google's page includes a tip that if you receive a high volume of invitation emails, you can create custom filters to organise, label or archive specific types of calendar updates.
Use labels like folders but remember that a message can have more than one label.
Be careful with deleting and forwarding
- Deleting. A filter that deletes mail can hide something important. Prefer "skip the inbox" plus a label, and review the label weekly. Only use delete for messages you are sure you never need.
- Forwarding. Google notes that when you create a filter to forward messages, only new messages will be affected. Also, when someone replies to a message you filtered, the reply is only filtered if it meets the same search criteria. Forwarding rules can also be a security risk if someone else creates them. See below.
Check for filters you did not create
Attackers who gain access to an email account sometimes set up a filter that forwards copies of your mail or hides security alerts. You can review filters at any time:
- Open Gmail.
- At the top right, click Settings, then See all settings.
- Click Filters and Blocked Addresses.
- Find the filter you want to change and click Edit or Delete.
Look for any rule you do not recognise, especially ones that forward mail to an unknown address or delete messages containing words like "password" or "security". If you find one, change your password and turn on two-step verification.
Export and import filters
Google's page notes you can export your filters, and import them if you have a backup. This is handy before you reorganise, or when you move to a new account. Keep the exported file in a safe place with your other backups. See the 3-2-1 backup rule.
Keep your rules simple
- Start with three or four filters, not forty.
- Name labels clearly. Use a prefix such as "Z-" for archives you rarely open if you want them at the bottom.
- Review once a quarter and delete filters you no longer need.
- Test new filters by watching for a few days before relying on them.
What filters cannot do
Filters do not stop phishing. If a suspicious message gets through, do not click links or attachments. CISA's advice is to recognise, resist, and delete. Use the report option in your mail app. See spotting phishing.
A 15-minute setup
- Pick the three kinds of mail that clutter your inbox most.
- Create a filter and label for each, skipping the inbox for the lowest-priority one.
- Create one filter that stars mail from the two or three people you must never miss.
- Check Settings, Filters and Blocked Addresses, and confirm that only your rules are there.
- In a week, review labels and adjust.
The short version
Create filters from a search or a typical message, test them, label rather than delete, and check your filter list from time to time for rules you did not create.
Sources and further reading
How this page was made: drafted with the help of an AI writing assistant, then checked against the sources above. Software menus and policies change, so check the linked pages for the current version. Read our editorial policy or report a mistake.