Gmail’s search bar is the fastest way to find one message buried in a decade of mail — if you know the operators. Google quietly added AI-assisted “natural language” search in 2024, but the operator-based syntax is still faster, more precise, and the only path to deterministic results when you are building filters or doing bulk cleanup. This is the full operator catalog as of 2026, every flag that still works, the few that Google retired, and the combinations that solve real problems.
Sender, Recipient, and Routing Operators
These narrow by who sent or received the message. from: and to: are the workhorses; cc:, bcc:, deliveredto:, and list: handle the less common cases. All accept full email addresses, partial domain matches, or display names — quote names with spaces.
| Operator | Matches | Example |
|---|---|---|
from: | Sender address or name | from:alice@example.com or from:"Alice Smith" |
to: | Direct recipient | to:me, to:bob@example.com |
cc: | CC recipient | cc:legal@example.com |
bcc: | BCC recipient (only on mail you sent) | bcc:me |
deliveredto: | Specific delivery address (useful for aliases) | deliveredto:work+aliasfilter@gmail.com |
list: | Messages from a mailing list with that List-ID | list:dev@apache.org |
from:me to:me | Mail you sent to yourself | useful for notes you mailed yourself |
Domain matching: from:gmail.com matches any sender at gmail.com — useful for grouping by company domain.
Name matching: from:alice (without quotes or @) matches messages where “alice” appears anywhere in the sender field — both the display name and the email address. Use quotes for multi-word names: from:"Alice Smith".
Content and Subject Operators
Subject: searches only the subject line. A bare word with no operator searches the full message body plus subject plus attachment text. Quoted phrases match the exact sequence; multi-word unquoted queries default to AND.
| Operator | Matches | Example |
|---|---|---|
subject: | Subject line only | subject:invoice, subject:"Q1 numbers" |
"exact phrase" | Exact sequence in body or subject | "thank you for your order" |
word (bare) | Word anywhere in body, subject, or attachment text | invoice |
word1 word2 | AND of both terms (anywhere) | invoice march 2024 |
+word | Forces inclusion (rarely needed) | +kubernetes |
-word | Excludes messages containing the word | invoice -draft |
Attachment text is searchable. Gmail OCR-indexes PDF and Office document attachments — searching for a word inside an invoice PDF returns the message that carried it. Image attachments are not OCR-indexed beyond simple cases (logos, screenshots with clear text).
Attachment and File Operators
has:attachment finds any attached file; filename: narrows to specific file types or names. has:drive, has:document, has:spreadsheet, has:presentation, has:youtube target embedded Drive content or YouTube links rather than file attachments.
| Operator | Matches | Example |
|---|---|---|
has:attachment | Any attached file | has:attachment from:vendor |
filename: | Specific filename or extension | filename:pdf, filename:invoice.pdf |
has:drive | Embedded Google Drive file link | has:drive |
has:document | Embedded Google Doc | has:document |
has:spreadsheet | Embedded Google Sheet | has:spreadsheet |
has:presentation | Embedded Google Slides | has:presentation |
has:youtube | YouTube link in body | has:youtube |
Combine for precision: has:attachment filename:xlsx from:finance after:2025/01/01 returns Excel files from the finance team since January 2025.
Date and Size Operators
after:, before:, and the older_than: / newer_than: shorthands narrow by date. larger: and smaller: target file size — the only way to surface storage hogs.
| Operator | Matches | Example |
|---|---|---|
after:YYYY/MM/DD | Sent after the date | after:2025/01/01 |
before:YYYY/MM/DD | Sent before the date | before:2025/12/31 |
older_than:Nd / Nm / Ny | Older than N days, months, or years | older_than:1y, older_than:90d |
newer_than:Nd / Nm / Ny | Newer than N days, months, or years | newer_than:7d |
larger: | Message size larger than | larger:10M, larger:25000000 |
smaller: | Message size smaller than | smaller:1M |
Date format flexibility. after:2025/1/1, after:2025-01-01, and after:1/1/2025 all parse. Unix epoch values also work: after:1735689600.
Size accepts suffixes. larger:10M means 10 megabytes. larger:1G is one gigabyte (though Gmail’s per-message attachment limit is 25 MB, so 1 GB matches nothing). Use larger:10M older_than:2y to find the heaviest old mail — prime delete candidates if you need storage.
Labels, Folders, and Categories
label: targets your custom labels. category: targets Gmail’s auto-classification tabs (Primary, Social, Promotions, Updates, Forums). in: targets system folders like inbox, trash, spam, sent, drafts, and anywhere.
| Operator | Matches | Example |
|---|---|---|
label: | Specific user label | label:work, label:invoices-2025 |
category: | Inbox category tab | category:promotions, category:social, category:updates, category:forums, category:primary |
in:inbox | Inbox only | in:inbox is:unread |
in:sent | Sent folder | in:sent to:bob |
in:trash | Trash | in:trash older_than:7d |
in:spam | Spam | in:spam from:unknown.com |
in:drafts | Drafts folder | in:drafts |
in:anywhere | Includes archived + trash + spam | in:anywhere "subject phrase" |
has:nouserlabels | No custom labels applied | has:nouserlabels older_than:1y |
has:userlabels | At least one custom label | has:userlabels |
Nested labels: if your label is Work/2025/Invoices, search as label:Work-2025-Invoices — Gmail replaces slashes with hyphens in operator syntax. Or wrap in quotes for spaces: label:"Work/2025/Invoices".
Read State and Message State
is:read, is:unread, is:starred, is:important, and the snooze/scheduled variants narrow by state. These compound naturally with content and date filters.
| Operator | Matches | Example |
|---|---|---|
is:unread | Unread messages | is:unread from:boss |
is:read | Read messages | is:read older_than:6m |
is:starred | Starred messages | is:starred |
is:snoozed | Currently snoozed messages | is:snoozed |
is:important | Marked important by Gmail | is:important |
is:muted | Muted threads | is:muted |
has:yellow-star, has:red-star, etc. | Specific star color | has:red-star |
Star color variants: has:yellow-star, has:orange-star, has:red-star, has:purple-star, has:blue-star, has:green-star, plus the marker variants like has:red-bang, has:purple-question. Available only if you enabled multiple stars in Settings → General → Stars.
Combining Operators: AND, OR, NOT, Grouping
Stacking operators applies AND by default. Uppercase OR creates either-match logic. Minus sign or NOT excludes. Curly braces group OR alternatives for readability. Parentheses are not supported in Gmail search syntax.
# AND (default — just stack)
from:alice has:attachment older_than:6m
# OR (uppercase OR keyword)
from:alice OR from:bob
# OR (curly braces — equivalent, cleaner for multiples)
{from:alice from:bob from:carol}
# NOT (minus sign)
from:alice -subject:lunch
# NOT (NOT keyword, less common)
from:alice NOT subject:lunch
# Complex example
{from:alice from:bob} has:attachment -filename:pdf older_than:6m
Order does not matter. from:alice subject:invoice older_than:1y returns identical results to older_than:1y subject:invoice from:alice.
Parentheses do not work. Gmail ignores them — (from:alice OR from:bob) has:attachment is parsed as if the parentheses are not there. Use curly braces for grouping instead.
Chat, Meet, and Spaces Operators
Google’s 2023 integration of Chat into Gmail added a small set of operators that scope search to chat messages and Meet recordings instead of email. They work in the unified Gmail search bar when Chat is enabled in your account.
| Operator | Matches | Example |
|---|---|---|
in:chats | Chat conversations | in:chats from:alice |
is:chat | Chat messages (alias) | is:chat older_than:7d |
has:transcript | Meet meeting transcripts | has:transcript |
Chat and email results appear in the same result list with type icons distinguishing them. If you do not have Chat enabled, these operators return no results without an error.
Operators That No Longer Work
Google has quietly deprecated a few operators over the years:
l:(lowercase L colon, the legacy label operator) — replaced bylabel:.l:workno longer matches anything.label:^kand the^prefix system labels — internal system label syntax that worked in early Gmail. Use the equivalent named operator instead (is:trashrather thanlabel:^t).is:chatfor Hangouts — Hangouts retired in 2022; now points to Chat.circle:and Google+ operators — Google+ shut down in 2019; these return no results.
If a tutorial older than ~2019 cites an operator that no longer works, check the official reference at support.google.com/mail/answer/7190 before relying on it.
Practical Recipes
The most useful operators are not the fancy ones — they are the combinations that solve real, recurring cleanup or recovery problems. Five recipes worth bookmarking:
Find storage hogs to delete:
has:attachment larger:10M older_than:1y
Big old attachments are usually safe to delete — the original sender or system has its own copy.
Find every newsletter that never gets opened:
category:promotions is:unread older_than:30d
If you have not opened it in 30 days, you probably never will.
Find work mail to file before vacation:
to:me is:unread newer_than:7d -from:noreply
Recent unread directly addressed to you, excluding automated noise.
Find a specific contract attachment:
has:attachment filename:pdf from:legal subject:contract after:2024/01/01
Tight enough to surface the right document; loose enough to forgive partial recall.
Bulk-archive ancient read mail:
is:read has:nouserlabels older_than:1y
Read, unlabeled, over a year old — almost certainly safe to archive. Pair with the bulk-archive flow (top-left checkbox → “Select all N conversations” → E).
Find mail from a specific sender that you sent to a specific person:
in:sent to:client@example.com from:me subject:proposal
Find any mail mentioning a Drive file by name:
has:drive filename:strategy

Alexis Dollé, email expert for 10+ years. Founder of Email Tools. I test every email client and utility myself, then write about them the way I’d explain them to a friend — no marketing fluff, no sponsored rankings, every claim sourced.
LinkedInSources & references
- Google Support, “Search operators you can use with Gmail” — canonical operator list, syntax rules, Chat integration. Accessed 2026-05-15. support.google.com/mail/answer/7190
- Google Support, “Use filters to manage your Gmail” — saving searches as filters, automated rule actions. Accessed 2026-05-15. support.google.com/mail/answer/6579
- Google Support, “Switch between Gmail and Google Chat” — in:chats, has:transcript operators, Chat integration into Gmail search. Accessed 2026-05-15. support.google.com/mail/answer/12918215
- Google Workspace Updates Blog, ongoing announcements of Gmail search changes. Accessed 2026-05-15. workspaceupdates.googleblog.com
Frequently asked questions
Are Gmail search operators case-sensitive?
No. Both the operator name and the value are case-insensitive. from:Alice and from:alice return identical results. The only exception is operator syntax — the colon must immediately follow the operator name with no space (from: works, from : does not).
Can I combine multiple Gmail search operators?
Yes. Stacking operators applies AND logic by default. from:newsletter has:attachment older_than:6m returns messages matching all three conditions. To use OR logic, write the keyword OR in uppercase between conditions or wrap alternatives in curly braces — {from:alice from:bob} returns messages from either.
Does Gmail search operate on archived and trashed messages?
By default, regular search includes archived mail (which lives in All Mail) but excludes Trash and Spam. To search those, add in:trash or in:spam to your query, or use in:anywhere to cover archived + trash + spam plus inbox in a single search.
Why doesn’t the from: operator find a message I know exists?
Two common causes: the sender used a different address than you remember (people reply from work versus personal addresses, or domains migrate), or the message is older than the indexing window for your account. Try the sender’s name in quotes instead of the email address, or widen the date range with after: to a year before the date you remember.
What’s the difference between has:attachment and filename:?
has:attachment matches any message that has at least one attached file, regardless of type. filename: targets a specific file extension or name — filename:pdf returns only messages with a PDF attached, filename:invoice.pdf matches messages with that exact attachment name. Stack them for precision: has:attachment filename:pdf from:accounting.
How do I save a Gmail search for reuse?
Click the slider icon on the right of the search bar to expand the advanced builder, fill any field, click “Create filter” at the bottom right. The filter saves your search and can apply automatic actions — skip the inbox, apply a label, star, mark as read. Filters re-run on every new message that arrives, so they double as automated rules.
Related: How to archive emails in bulk — pair these operators with the bulk-archive workflow. How to add another email account to Gmail — once you have multiple accounts in one inbox, operators are how you keep them separable.