← All Tools

Gmail Filter Rule Generator

Build and preview Gmail search queries for automated filtering. Select conditions like sender, subject, keywords, size, and date, then get the exact syntax and step-by-step setup instructions.

Filter conditions
Set your Gmail filter criteria below. Each field maps to a Gmail search operator.

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.

Generated Gmail search query
This is the exact query Gmail uses to match your filter conditions. Paste it into the Gmail search bar or the filter creation form.
How to create this filter
Follow these steps to turn the query into a working Gmail filter.

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.

Available operators

from: — Sender email

to: — Recipient email

subject: — Words in subject

has:attachment — With file

larger: smaller: — Size

newer_than: older_than: — Date

Common use cases

✦ 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