Gmail Filter Rule Generator
Gmail filter generator that builds search queries from sender, subject, keyword, size, and date conditions, with the exact syntax and setup steps. Free.
Matches emails from this address.
Matches emails sent to this address.
Emails with these words in the subject line.
Emails containing these words anywhere. Multiple words = AND logic.
Exclude emails containing these words.
Set at least one condition above to see how to create the filter.
What this Gmail filter generator does
This tool converts your filter conditions into the exact search syntax Gmail uses to match messages. Instead of memorizing operators like from:, subject:, and has:attachment, you pick your criteria from the form and get a ready-to-use query plus step-by-step setup instructions.
from: — Sender email
to: — Recipient email
subject: — Words in subject
has:attachment — With file
larger: smaller: — Size
newer_than: older_than: — Date
✦ Auto-label invoices from your accounting system
✦ Skip the inbox for shipping notifications
✦ Mark read for newsletters you never open
✦ Delete emails from known spammy senders
✦ Star emails from your manager with “urgent” in the subject
✦ Categorize receipts and expense reports
Every filter you write is a rule you'll maintain forever.
NeatMail sorts your inbox without any of them — labeling by meaning instead of matching strings, archiving the noise, and catching the promises a filter would have quietly swept past.
About the Gmail Filter Rule Generator
A Gmail filter generator is a tool that builds Gmail's search-operator syntax for you so you can automatically label, archive, forward, or delete matching emails. You pick conditions like sender, subject, keywords, size, or date, and it outputs the exact query — using operators such as from:, subject:, and has:attachment — plus step-by-step instructions for turning it into a saved filter in Gmail settings.
Frequently asked questions
- How do I create a filter in Gmail?
- In Gmail, paste the generated query into the search bar, click the search-options icon, then choose "Create filter." Pick actions like apply a label, skip the inbox, mark as read, or forward, and save. The filter then runs automatically on incoming mail.
- What search operators does Gmail support?
- Common operators include from:, to:, subject:, has:attachment, filename:, larger: and smaller: for size, older_than: and newer_than: for dates, and OR plus parentheses for grouping. You can combine them to target very specific messages.
- Can a filter apply to existing emails?
- Yes. When you create a filter, Gmail offers a checkbox to also apply it to matching conversations already in your mailbox, so you can clean up old mail as well as automate future messages.
- How many filters can Gmail have?
- Gmail allows up to roughly 1,000 filters per account. If you approach that limit, combining conditions with OR and parentheses into fewer, broader filters keeps things manageable.
Related tools
Still doing this by hand? NeatMail runs it for you, on every email, inside Gmail and Outlook.
Start free