All articles

Email Filtering in Gmail (2026): The Complete Guide to Rules, Actions, and Export/Import

Gmail's filter builder is a real rules engine hiding behind a search box: seven criteria, ten actions, and an export format. This is the full tour, recipes included, plus the point where a growing rule list stops being a solution and becomes a chore you own.

Most people meet Gmail filters through one door: a sender won’t stop, they search for how to make it stop, and they build one rule. Our guide to blocking emails in Gmail is that door, and if that’s your situation, start there. This page is for what happens after: six filters, then fourteen, and you’ve only been using a sliver of what this feature does. What follows is the whole machine: every criterion, every action, export and import, and what a growing rule list costs you to maintain.

A filter is a saved search with consequences

Everything about Gmail filtering makes more sense once you see the design: a filter is a search query that Gmail re-runs against every arriving message, plus a list of things to do when the query matches:

  • From the search bar. Click the sliders icon at the right edge of the search box to open the criteria panel, fill it in, click Create filter. This is the main road, and the only one that exposes every field.
  • From a message. Open the three-dot menu on any email and choose Filter messages like this. Gmail pre-fills the sender’s address and drops you into the same panel.
  • From Settings. Gear icon → See all settings Filters and Blocked Addresses Create a new filter. Same panel again, and the page you’ll return to for everything in the managing section below.

Filters act on new mail only, unless you tick Also apply filter to matching conversations at creation time, which runs the rule once across everything already in your account. A reply to a filtered message is only filtered if the reply itselfmatches your criteria, per Google’s documentation. Filter a subject line and the “Re:” usually still matches; filter on has:attachmentand the attachment-free reply won’t.

The Gmail app on iPhone and Android cannot create filters. This is desktop-browser work.

The seven criteria, and how to combine them

The panel gives you seven fields, all combinable:

  • From and To: addresses, whole domains (@example.com), or several of either joined with OR.
  • Subject: matches words in the subject line.
  • Has the words and Doesn’t have: the power pair. These search the whole message, and they accept Gmail’s full search-operator syntax, which quietly turns the panel into a query editor.
  • Size: greater or less than a threshold, in MB, KB, or bytes.
  • Has attachment: a checkbox, sharper than it looks when combined with the others.

Inside Has the words you can use OR, exact phrases in quotes, braces as an OR shorthand, size: in bytes (Google’s own example is size:1000000, roughly 1 MB), larger:10M and smaller: as friendlier size bounds, and older_than: / newer_than: with d, m, or y units. Date operators deserve a caveat: every arriving message is new, so older_than:1y in a filter only earns its keep with the retroactive checkbox, where it turns a filter into a one-time cleanup batch.

Three recipes that show the range:

The receipts drawer. From: @amazon.com OR @paypal.com OR @stripe.com, Has the words: receipt OR invoice OR “your order”. Actions: apply label “Receipts,” skip the inbox, never mark as important. Purchase confirmations stop interrupting you and stay findable in one click.

The attachment magnet. Has attachment, plus larger:10Min Has the words. Actions: apply label “Big files,” star it. Gmail lets senders attach up to 25 MB per message, and this rule collects the heavyweights so storage cleanup day is a label click instead of an archaeology dig.

The notification muffler. From: notifications@github.com, Doesn’t have: @your-username. Actions: mark as read, skip the inbox, apply label “CI noise.” Everything addressed to the whole team files itself; anything that mentions you personally still lands in front of you. The Doesn’t-have field is the difference between a filter and a blunt instrument.

Filters are the wrong tool for newsletters you once signed up for. A rule hides that mail; it doesn’t stop the sending, and the list keeps growing behind the label. Unsubscribing properly removes you at the source, and legitimate senders now process those requests fast, because Google’s bulk-sender rules (anyone mailing more than 5,000 Gmail addresses a day) require one-click unsubscribe support on marketing and subscribed mail, plus a user-reported spam rate under 0.3%.

Every action, one table

After Create filter, Gmail offers ten actions, and any combination can run together. The full set, with the fine print each one carries:

The complete Gmail filter action set
ActionWhat it doesWatch out for
Skip the Inbox (Archive it)Mail arrives already archived, under All MailPairs with a label, or matching mail becomes hard to find
Mark as readNo unread badge, no bold rowEasy to miss mail you half-care about
Star itAdds a star on arrivalSame star Gmail uses when you flag a message yourself, so the two are indistinguishable later
Apply the labelFiles mail under a label of your choiceLabels stack; one message can carry several
Forward itSends a copy to a verified addressOne address per filter, new mail only, setup requires a confirmation code
Delete itStraight to Trash on arrivalTrash purges after 30 days; there is no undo later
Never send it to SpamOverrides Gmail’s spam verdict for matchesA domain-wide allow rule is a standing invitation to spoofers
Always mark it as importantForces the importance marker onTrains Priority Inbox on your rule, not your behavior
Never mark it as importantForces the importance marker offSame trade in the other direction
Categorize asRoutes mail into one of the five tabs (Primary, Social, Promotions, Updates, Forums)Only meaningful if you keep category tabs turned on

Apply label + skip inbox is the workhorse: mail files itself and waits. Adding mark as read turns a label into a write-only archive, right for logs and CI chatter, wrong for anything a human might send. Delete it is the one to ration: Trash empties itself after 30 days, so a miswritten delete rule quietly destroys mail for as long as it takes you to notice. Archive-plus-label does the same tidying reversibly.

Editing, exporting, and importing your filters

Every rule you’ve saved lives in one place: gear icon → See all settings Filters and Blocked Addresses. Each row shows the criteria and actions, with edit and delete beside it. Edit reopens the criteria panel, so revising a filter is the same two-step as creating one.

The underused feature on that page is Export and Import, tucked at the bottom. Tick the checkboxes next to any filters and Export downloads them as a mailFilters.xml file, plain XML you can read, edit, and version like any other config. Import filtersdoes the reverse, appending the file’s rules to whatever you already have (it never overwrites). This is how you back up a filter list you’ve invested years in, move it to a new address, or hand a teammate your receipts-and-notifications setup in one attachment. If you maintain more than a handful of rules and haven’t exported them, export the list today: it’s the only backup you have.

Forwarding filters carry extra ceremony: the destination address must be verified first (Settings → Forwarding and POP/IMAP, which emails a confirmation code to the destination), each filter forwards to exactly one address, and Google notes forwarding only applies to new messages, never retroactively.

The maintenance bill

The ceiling is real but far.Gmail caps filters at 1,000 per account, per its API documentation. Almost nobody hits it. What people hit instead is the practical ceiling, a few dozen rules in, where nobody remembers what filter 23 does or whether it’s the reason invoices vanish.

Filters fire in parallel, not in order. There is no priority system: every matching rule applies, and their actions stack. Two overlapping filters, one starring and one archiving, both win. Debugging that means reading the whole list, which is why tight, consolidated rules age better than many small ones.

Rules match strings; senders change strings.A filter can’t recognize cold outreach; it can only recognize @acmesales.com, and the next pitch arrives from a domain registered last Tuesday. Kaspersky measured spam at 44.99% of global email traffic in 2025, and counted over 144 million malicious attachments in the year, up 15% from 2024. Gmail’s own filter absorbs almost all of it, blocking more than 99.9% of spam, phishing, and malware, close to 15 billion unwanted emails a day by Google’s count. What reaches your rules engine is the residue built to look legitimate, including the email arm of the $12.5 billion in fraud losses Americans reported to the FTC for 2024. Against senders like that, every rule you write is a description of last week’s attacker. Our guide to stopping spam in Gmail covers the report-and-block side of that fight; the spam-filter roundup maps what exists beyond Gmail’s own tools.

When the rules engine is the wrong abstraction

We built Sievefor exactly the gap the last section describes: mail that no string can match, because the sender’s whole trade is arriving from a fresh address with a plausible subject line. Instead of matching fields, it classifies mail from senders you don’t already know as it arrives, labels cold outreach Solicitor and phishing Malicious(with links screened through Google Web Risk), and archives both out of your inbox. Archived, never deleted: everything stays in Gmail under an ordinary label, and dragging a message back to the inbox is recorded as a correction it learns from. Reply to a sender once and they’re permanently trusted.

You steer it in plain English. The rule you’d have engineered as subject:(“quick call” OR “15 minutes”) plus a domain list becomes a sentence like “recruiter emails about contract roles are fine, agency outreach isn’t,” and it applies to senders you’ve never heard from yet, which is the case that defeats filters. Mail from people you know is never read by the AI at all, storage is metadata-only plus the encrypted subject line of flagged mail held 30 days, and nothing you receive trains anyone’s models; the Privacy Policy has the complete inventory. Gmail-only, $10/month for Basic or $20/month for Pro with a second inbox included, 15% off yearly, 7-day free trial.

Which tool for which job

  • Gmail filters for routing predictable mail: known senders, fixed formats, receipts and notifications. Free, durable, exportable.
  • A bulk cleaner for the backlog a filter list never touched. Clean Email (from $9.99/month per its App Store listing) and Mailstrom (from $9/month per its pricing page) both also describe rule systems of their own for incoming mail; the cleanup-tool head-to-head compares them directly.
  • A classifierfor the mail that defeats string matching: cold outreach and phishing from ever-changing senders. That’s Sieve’s lane, and the rest of our guides cover the free tactics to exhaust first.

Sources

  1. Google: Create rules to filter your emails (criteria, actions, export/import, new-mail behavior)
  2. Google: Search operators you can use with Gmail (size:, larger:, older_than:, newer_than:)
  3. Google Developers: Gmail API, users.settings.filters.create (1,000-filter maximum)
  4. Google: Automatically forward Gmail messages to another account (one filter per forwarding address)
  5. Google: Send attachments with your Gmail message (25 MB limit)
  6. Google: Delete or recover deleted Gmail messages (Trash purged after 30 days)
  7. Google blog: New Gmail protections for a safer, less spammy inbox (99.9% blocked, ~15 billion/day, 5,000-message bulk-sender threshold)
  8. Google: Email sender guidelines (one-click unsubscribe, 0.3% spam-rate threshold)
  9. Securelist (Kaspersky): Spam and phishing report for 2025 (44.99% spam share, 144M malicious attachments, +15%)
  10. FTC: Reported fraud losses hit $12.5 billion in 2024

FAQ

How do I filter emails in Gmail automatically?
Click the sliders icon in the Gmail search bar to open search options, fill in any combination of From, To, Subject, Has the words, Doesn't have, Size, and Has attachment, then click Create filter and choose what happens to matching mail: label it, archive it, delete it, star it, forward it, and more. The rule runs on every message that arrives from then on.
How many filters can you have in Gmail?
1,000 per account, per Google's Gmail API documentation. There's no published limit on how many criteria one filter can combine, so consolidating related rules (for example, one filter matching several domains with OR) stretches the cap a long way.
Do Gmail filters apply to existing emails?
Not by default: filters act on new mail as it arrives. To run one backwards, check "Also apply filter to matching conversations" when you create it. The exception is forwarding, which Google says only ever applies to new messages.
Can I create Gmail filters on my phone?
No. The Gmail mobile app can't create or edit filters; you need Gmail in a desktop browser. Filters you build there run on all your mail everywhere, including what you read on the phone.
Do Gmail filters run in order?
No, there's no priority system. Every filter whose criteria match a message fires, and all of their actions are applied together. If two filters disagree (one stars a message, another deletes it), you get the combined result, which is why overlapping filters are the first thing to check when mail ends up somewhere strange.
Can a Gmail filter forward to multiple addresses?
Not in one rule: each filter forwards to a single verified address. Google's own guidance is to create a separate filter for every forwarding address, each with the same criteria.

Gmail is a trademark of Google LLC; interface depictions are illustrative. Sieve, by Snowfish Technologies, is an independent product and is not affiliated with or endorsed by Google. Product names mentioned are trademarks of their respective owners.