Skip to content
Email Tools

guide · Gmail Search Operators

Gmail search operators — the complete 2026 reference

Every Gmail search operator that still works in 2026: from, to, has:attachment, older_than, larger, plus combinations and the few operators Google quietly retired.

Alexis Dollé By Alexis Dollé · ·
Gmail search operators — the complete 2026 reference

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.

OperatorMatchesExample
from:Sender address or namefrom:alice@example.com or from:"Alice Smith"
to:Direct recipientto:me, to:bob@example.com
cc:CC recipientcc: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-IDlist:dev@apache.org
from:me to:meMail you sent to yourselfuseful 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.

OperatorMatchesExample
subject:Subject line onlysubject: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 textinvoice
word1 word2AND of both terms (anywhere)invoice march 2024
+wordForces inclusion (rarely needed)+kubernetes
-wordExcludes messages containing the wordinvoice -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.

OperatorMatchesExample
has:attachmentAny attached filehas:attachment from:vendor
filename:Specific filename or extensionfilename:pdf, filename:invoice.pdf
has:driveEmbedded Google Drive file linkhas:drive
has:documentEmbedded Google Dochas:document
has:spreadsheetEmbedded Google Sheethas:spreadsheet
has:presentationEmbedded Google Slideshas:presentation
has:youtubeYouTube link in bodyhas: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.

OperatorMatchesExample
after:YYYY/MM/DDSent after the dateafter:2025/01/01
before:YYYY/MM/DDSent before the datebefore:2025/12/31
older_than:Nd / Nm / NyOlder than N days, months, or yearsolder_than:1y, older_than:90d
newer_than:Nd / Nm / NyNewer than N days, months, or yearsnewer_than:7d
larger:Message size larger thanlarger:10M, larger:25000000
smaller:Message size smaller thansmaller: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.

OperatorMatchesExample
label:Specific user labellabel:work, label:invoices-2025
category:Inbox category tabcategory:promotions, category:social, category:updates, category:forums, category:primary
in:inboxInbox onlyin:inbox is:unread
in:sentSent folderin:sent to:bob
in:trashTrashin:trash older_than:7d
in:spamSpamin:spam from:unknown.com
in:draftsDrafts folderin:drafts
in:anywhereIncludes archived + trash + spamin:anywhere "subject phrase"
has:nouserlabelsNo custom labels appliedhas:nouserlabels older_than:1y
has:userlabelsAt least one custom labelhas: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.

OperatorMatchesExample
is:unreadUnread messagesis:unread from:boss
is:readRead messagesis:read older_than:6m
is:starredStarred messagesis:starred
is:snoozedCurrently snoozed messagesis:snoozed
is:importantMarked important by Gmailis:important
is:mutedMuted threadsis:muted
has:yellow-star, has:red-star, etc.Specific star colorhas: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.

OperatorMatchesExample
in:chatsChat conversationsin:chats from:alice
is:chatChat messages (alias)is:chat older_than:7d
has:transcriptMeet meeting transcriptshas: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 by label:. l:work no longer matches anything.
  • label:^k and the ^ prefix system labels — internal system label syntax that worked in early Gmail. Use the equivalent named operator instead (is:trash rather than label:^t).
  • is:chat for 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é, founder of Email Tools
Alexis Dollé
Founder & Editor

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.

LinkedIn

Sources & references
  1. 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
  2. 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
  3. 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
  4. 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.