Gmail search operators: the complete list, with examples

Gmail search operators are words you type into the Gmail search box to narrow results: from: and to: for people, subject: for the subject line, has:attachment and filename: for files, after:, before:, older_than: and newer_than: for dates, larger: for size, is:unread and is:starred for status, and label: and category: for where mail is filed. They combine, so from:accounts@ has:attachment newer_than:30d finds recent mail with attachments from one sender. Any search you use often can be kept as a one-click tab.

Updated by PalWorks. Checked against Google's own list of Gmail search operators.

People: who sent it, who received it

Match a name, a full address, or just a domain.

OperatorFindsExample
from:Mail from a senderfrom:priya@example.com
to:Mail sent to a recipientto:team@example.com
cc:Mail with a recipient in Cccc:finance@example.com
bcc:Mail with a recipient in Bccbcc:me@example.com
deliveredto:Mail delivered to an address, useful with aliases and forwardingdeliveredto:sales@example.com
list:Mail from a mailing listlist:updates@example.com

Words: the subject and the text

Narrow by what the message says.

OperatorFindsExample
subject:Words in the subject linesubject:invoice
"..."An exact phrase"payment received"
+wordThat exact word, not variations of it+unicorn
AROUNDTwo words within a number of words of each othermeeting AROUND 5 friday

Dates and size

Dates are written year/month/day. Relative ages use d for days, m for months and y for years.

OperatorFindsExample
after: / before:Mail sent after or before a dateafter:2026/01/01 before:2026/04/01
older: / newer:Mail older or newer than a dateolder:2025/12/31
older_than: / newer_than:Mail older or newer than an agenewer_than:7d
larger: / smaller:Mail larger or smaller than a size in bytes, K or Mlarger:10M
size:Mail larger than a size in bytessize:1000000

Status: read, starred, important, snoozed

The state Gmail keeps for each message.

OperatorFindsExample
is:unread / is:readUnread or read mailis:unread
is:starredStarred mailis:starred is:unread
has:yellow-starMail with a particular star, when several star types are onhas:yellow-star
is:importantMail Gmail marked importantis:important newer_than:2d
is:snoozedSnoozed mailis:snoozed

Attachments and files

Find the message by what came with it.

OperatorFindsExample
has:attachmentMail with any attachmenthas:attachment from:accounts@
filename:An attachment by name or typefilename:pdf
has:drive / has:document / has:spreadsheet / has:presentationMail with a Google Drive file, Doc, Sheet or Slides linkhas:spreadsheet
has:youtubeMail with a YouTube videohas:youtube

Where it is filed: labels, categories, folders

Search a label, one of the inbox categories, or everywhere including Spam and Trash.

OperatorFindsExample
label:Mail with a labellabel:clients
has:userlabels / has:nouserlabelsMail with, or without, any label of your ownhas:nouserlabels in:inbox
category:An inbox category: primary, social, promotions, updates, forums, reservations or purchasescategory:promotions
in:inbox / in:sent / in:spam / in:trashMail in one placein:sent to:priya@example.com
in:anywhereMail anywhere, including Spam and Trashin:anywhere subject:receipt

Combining searches

Any operators can be combined. A space between two means both must match.

OperatorFindsExample
OR or { }Mail matching either termfrom:amy OR from:david
-Leaves out mail matching a terminvoice -paid
( )Groups terms togethersubject:(dinner movie)
rfc822msgid:One message by its Message-ID headerrfc822msgid:200503292@example.com

Searches worth keeping as a tab

A search you type more than twice a week is a view you use. Gmail cannot save a search, but the free Gmail Labels and Search Queries as Tabs extension keeps any of these one click away above your inbox, with its unread count: run the search, then press + on the tab bar.

  • A client, everythingfrom:northwind.comEvery message from one company, whoever sent it.
  • Invoices this monthsubject:invoice newer_than:30dThe bills that arrived lately, and nothing older.
  • Unread with filesis:unread has:attachmentThe messages that want something opened.
  • Starred, not readis:starred is:unreadWhat you flagged and have not got to yet.
  • Big attachmentshas:attachment larger:10MWhere your storage went.
  • Old promotionscategory:promotions older_than:30dThe pile a cleanup rule can clear for you.
  • Waiting in your inbox, unfiledin:inbox has:nouserlabelsMail you have not sorted into any label yet.
  • Sent to one personin:sent to:priya@example.comWhat you told them, in one place.

Questions

How do I search Gmail by date?

Use after: and before: with a date written year/month/day, for example after:2026/01/01 before:2026/04/01. For a relative age use newer_than: or older_than: with d, m or y, for example newer_than:7d for the last week.

How do I find emails with attachments in Gmail?

Search has:attachment. Add filename:pdf for one type, larger:10M for big files, or from: to narrow it to one sender, for example has:attachment from:accounts@ larger:5M.

How do I save a Gmail search?

Gmail cannot save a search on its own; you can bookmark its address in the browser, or turn it into a filter. With the free Gmail Labels and Search Queries as Tabs extension, run the search and press + on the tab bar, and it stays as a one-click tab with its unread count.

How do I exclude something from a Gmail search?

Put a minus sign before the term, with no space, for example invoice -paid, or from:@example.com -from:noreply@example.com.

Keep your searches as tabs: add it to Chrome, free