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.
How it decides
Text, not meaning
It builds only from Gmail's real search operators, never wildcards or pattern code, and says plainly when a request needs judgement a filter cannot make.
Gmail syntax it may use
The allowed operators
The query is built only from this fixed list of Gmail search terms, plus OR, AND, a minus sign to exclude, quotes, brackets and braces.
Rubric from: to: cc: bcc: subject: list: filename: has:attachment has:drive has:document larger: smaller: older_than: newer_than: after: before: is:unread is:read is:starred is:important in:anywhere label: category:promotions category:social category:updates category:forums, plus OR, AND, - to exclude, "quoted phrases", (grouping), and {a b} which means any of a or b.
Hard constraints
No wildcards
Gmail cannot match on patterns, so the query never contains a star or regex (pattern-matching code), which would silently match nothing.
Rubric Gmail supports NO wildcards and NO regular expressions. Never emit * or regex.
Sender matching
A from: rule matches the real address or the domain after the @ sign, not the name shown next to it.
Rubric from: matches an address or a domain, not a display name pattern.
Punctuation
Gmail mostly ignores dots, dashes and similar marks inside a word, so a query cannot depend on them.
Rubric Gmail search ignores most punctuation inside words.
Category tabs
The category: terms only do anything if your inbox uses Gmail's tabs such as Promotions and Social.
Rubric category: works in search and in filters, but only for the tabbed inbox.
Date format
Dates in after: and before: are written year, month, day, with slashes.
Rubric Dates in after:/before: are YYYY/MM/DD.
No invented operators
If a search term is not on the allowed list the tool will not use it, however plausible it sounds.
Rubric Do not invent operators. If it is not in the list above, do not use it.
When the request cannot be a filter
Judgement requests
When you ask for something that needs judgement, like archiving anything unimportant, the tool gives the nearest literal query and warns that a filter matches words, not meaning.
Rubric If the user asks for something that needs judgement rather than text matching, for example "archive anything unimportant", "keep only emails that need a reply", or "filter out cold sales emails", produce the closest literal query you honestly can AND say plainly in caveats that a Gmail filter matches text, not meaning, so this will over- or under-match. Never pretend syntax exists that would read intent.
Your description reaches the model under the label "untrusted user input", and the model is told to ignore any instruction inside it that tries to change its role, the rules or the output format. Nothing in the request is written anywhere: the body is capped at 24 KB and the response is marked no-store. The rubric above is not a summary of the instructions the model is given: it is those instructions, word for word, generated from the same file. Change one and you change the other.
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. Either way, that is only the email half. The signup forms that leak your address usually take your number too, and a disposable phone number keeps the other half off your real one.

More free tools
Other things you can do here
All free, all without an account.