Free tool · no signup
Gmail Search Operator Builder
Gmail search operators are the keywords that turn the search box into a query language: from:, subject:, has:attachment, older_than: and about twenty more. This builder assembles them visually, shows the exact query string, and opens it in Gmail in one click — plus a complete operator reference with the Outlook equivalents.
Runs entirely in your browser. Nothing you paste is uploaded, logged or stored.
Your query
Start from a recipe
Nothing selected yet. Every field maps to one operator, and empty fields are left out of the query entirely.
| Gmail | Does | Outlook |
|---|---|---|
from: | Sender address or name. A bare name matches the display name too. | from: |
to: | Recipient. `to:me` is the fastest way to exclude list mail you were only bcc'd on. | to: |
cc: | Matches the Cc line only. | cc: |
bcc: | Only works on mail you sent — you can't see someone else's Bcc. | — |
subject: | Searches the subject line only. Quote a phrase to keep the words together. | subject: |
"…" | Wrapped in quotes — matches the words in that order, anywhere in the message. | — |
- | A leading minus removes matches. The single most effective way to cut a noisy result set. | NOT |
label: | Gmail labels. Use a hyphen for nested labels: label:clients-uk. | — |
category: | toolsUi.gmailOperators.category.hint | — |
in: | toolsUi.gmailOperators.in.hint | folder: |
after: | Format YYYY/MM/DD. Inclusive of the date given. | received>= |
before: | Format YYYY/MM/DD. | received<= |
older_than: | toolsUi.gmailOperators.older_than.hint | — |
newer_than: | toolsUi.gmailOperators.newer_than.hint | — |
has:attachment | Any attachment, including inline images — which is why results look inflated. | hasattachment:yes |
filename: | An extension alone works: filename:pdf. So does a full name. | attachment: |
larger: | Accepts M or K. `larger:10M older_than:1y` is the mailbox-quota search. | — |
smaller: | Rarely useful alone; pairs well with has:attachment. | — |
is:unread | Combine with in:inbox to get the real backlog. | isread:no |
is:starred | Gmail stars. Outlook's flags behave differently. | — |
is:important | Gmail's own priority guess, not your stars. | — |
has:nouserlabels | Everything your filters never caught — the honest measure of how good your rules are. | — |
- Every common operator as a labelled field — no syntax to remember
- Live query string, copyable, plus a one-click open in Gmail
- Six worked recipes: reclaim space, real unread backlog, unlabelled mail
- Notes on the traps — quoting multi-word values, in:anywhere, relative dates
- Outlook / Microsoft 365 equivalents alongside each operator
- Anything you build is reusable as a Gmail filter
How to use it
Four steps, about thirty seconds
- 01
Pick a recipe, or start empty
The recipes cover the searches most people actually want; each one loads into the builder so you can adjust it.
- 02
Fill in the fields you need
Every field maps to one operator. Empty fields are left out of the query entirely.
- 03
Copy the query
The string updates as you type. Paste it into Gmail's search box, or use the button to open it directly.
- 04
Turn it into a filter
In Gmail, run the search, then click the filter icon in the search bar and choose Create filter — the query carries over intact.
Syntax
The four rules the whole query language runs on
Gmail search looks like a language and behaves like four rules. Learn these and the operator list becomes a reference rather than something to memorise.
A space means AND. Two terms side by side must both match — which is why subject:renewal quote does not do what people expect. Quotes bind words together. subject:"renewal quote" searches for the phrase. A leading minus excludes. -unsubscribe removes every match containing that word, and is the single fastest way to cut a noisy result set. OR must be capitalised. from:ada OR from:grace works; a lowercase or is searched as a word.
Traps
Five things that silently return the wrong results
None of these produce an error. They produce a plausible-looking result set that is missing what you were looking for, which is worse.
| What you type | What Gmail does | What to type instead |
|---|---|---|
subject:renewal quote | Subject contains 'renewal' AND the message contains 'quote' anywhere. | subject:"renewal quote" |
from:[email protected] | Searches the inbox and archive — but not Spam or Trash, where the missing message usually is. | from:[email protected] in:anywhere |
after:31/01/2026 | Nothing useful — Gmail expects YYYY/MM/DD. | after:2026/01/31 |
has:attachment | Includes inline images and signature logos, which is why the count looks absurd. | has:attachment filename:pdf |
is:unread | Every unread message everywhere, including years of promotions. | is:unread in:inbox category:primary |
From search to rule
Any search here can become a standing filter
A search you run twice should be a filter. In Gmail: run the query, click the filter icon at the right of the search box, and choose “Create filter”. The operators carry across intact, so anything the builder produces can be turned into a rule that labels, archives, stars or forwards automatically from then on.
Two cautions. Use relative dates in filters (older_than:1y), never fixed ones — a filter with before:2026/01/01 quietly stops matching anything new. And avoid “Skip the Inbox” on a filter you are not certain about: mail that never appears is far harder to notice than mail that appears and is wrong.
The honest limit of all of this: filters match patterns, not meaning. subject:invoice catches the word, not the invoice that arrived titled “Re: our conversation”. Syntax can only ever sort mail by its shape.
Outlook
The same searches in Outlook and Microsoft 365
Outlook has the same idea with different spelling, and the operator table above lists the equivalent for every operator that has one. The four that differ most: has:attachment becomes hasattachment:yes, after: becomes received>=, in: becomes folder:, and Gmail’s leading minus becomes a capitalised NOT.
Two Gmail operators have no Outlook equivalent at all: category:, because Outlook has no inbox tabs, and has:nouserlabels, because Outlook organises by folder rather than by label. The nearest Outlook equivalent to the second is simply looking at the inbox root.
Questions
Frequently asked
Short answers, including the ones where the honest answer is “this tool can’t do that”.
Keywords that narrow a Gmail search: from: limits by sender, subject: to the subject line, has:attachment to messages with files, older_than: by age. They combine with spaces (which mean AND), OR, and a leading minus for NOT.
Keep going
Related free tools
Header Analyzer
Paste raw email headers to see the delivery route hop by hop, where the delay was, and whether SPF, DKIM and DMARC passed.
Open toolAttachment Limits
Check whether your file will send: attachment and message size limits for Gmail, Outlook, iCloud, Proton and more, with the base64 overhead that makes a 24 MB file fail a 25 MB limit.
Open toolEmail Calculators
Five free email calculators: campaign ROI, cold-outbound to meetings, A/B test significance, meeting cost and inbox time cost.
Open toolAI Emaily does the part this tool can’t: the reply.
A free tool cleans up a list or builds a link. AI Emaily reads the thread, drafts the answer in the voice you set, and waits for one click — across Gmail, Outlook, iCloud and any IMAP mailbox. You approve every send.
Email, finally worthy of your attention.
Start your 7-day free trial. Cancel anytime.
- 7-day free trial
- Cancel anytime
- Every provider