Free tool, no signup

Free Gmail filter generator

Describe the mail you want handled in plain English. Get the exact Gmail search syntax and the steps to save it as a filter.

Describe it the way you would to a colleague. Sender addresses, domains and subject words all work.

Leave blank and we will pick a sensible default.

Questions

What people ask

The answers worth having before, and after, you use the tool.

How do I create a filter in Gmail?

Click the sliders icon in the Gmail search bar to open search options, or paste search syntax into the bar and press Enter. Then choose Create filter, tick the actions you want (skip the inbox, apply a label, delete), and save. Tick "Also apply to matching conversations" to clean up the mail already sitting there.

What Gmail search operators can I use in a filter?

The useful ones are from:, to:, subject:, has:attachment, list:, filename:, larger:, older_than: and newer_than:, plus OR, AND, parentheses, quotes for exact phrases, and a leading minus to exclude. Gmail does not support wildcards or regular expressions in filters.

How do I stop spam emails in Gmail for good?

Filters are the durable fix: build one that matches the sender or the phrase and have it skip the inbox or delete on arrival. For legitimate senders, unsubscribe first so the mail stops at the source, then filter what keeps coming. Report actual spam rather than only deleting it, so Gmail learns.

Can one filter cover several senders?

Yes. Put them in braces or join them with OR, like {alerts@a.com alerts@b.com}, and Gmail matches any of them. That is usually better than a filter per sender, because it stays readable when you come back to it in six months.

Why is my Gmail filter not working?

The usual causes: the filter was created but never applied to existing mail, the sender address changed, the words you matched appear in the rendered message but not the raw text, or another filter matched first and archived it. Test the syntax in the search bar before you save it as a filter.

This tool handles one email. Batmail handles the rest.

A filter does exactly what you wrote, forever. It cannot tell an urgent invoice from a routine one. Batmail runs the same plain-English rules you would write here, but it reads each message and decides, then tells you why.