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.
People: who sent it, who received it
Match a name, a full address, or just a domain.
| Operator | Finds | Example |
|---|---|---|
from: | Mail from a sender | from:priya@example.com |
to: | Mail sent to a recipient | to:team@example.com |
cc: | Mail with a recipient in Cc | cc:finance@example.com |
bcc: | Mail with a recipient in Bcc | bcc:me@example.com |
deliveredto: | Mail delivered to an address, useful with aliases and forwarding | deliveredto:sales@example.com |
list: | Mail from a mailing list | list:updates@example.com |
Words: the subject and the text
Narrow by what the message says.
| Operator | Finds | Example |
|---|---|---|
subject: | Words in the subject line | subject:invoice |
"..." | An exact phrase | "payment received" |
+word | That exact word, not variations of it | +unicorn |
AROUND | Two words within a number of words of each other | meeting 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.
| Operator | Finds | Example |
|---|---|---|
after: / before: | Mail sent after or before a date | after:2026/01/01 before:2026/04/01 |
older: / newer: | Mail older or newer than a date | older:2025/12/31 |
older_than: / newer_than: | Mail older or newer than an age | newer_than:7d |
larger: / smaller: | Mail larger or smaller than a size in bytes, K or M | larger:10M |
size: | Mail larger than a size in bytes | size:1000000 |
Status: read, starred, important, snoozed
The state Gmail keeps for each message.
| Operator | Finds | Example |
|---|---|---|
is:unread / is:read | Unread or read mail | is:unread |
is:starred | Starred mail | is:starred is:unread |
has:yellow-star | Mail with a particular star, when several star types are on | has:yellow-star |
is:important | Mail Gmail marked important | is:important newer_than:2d |
is:snoozed | Snoozed mail | is:snoozed |
Attachments and files
Find the message by what came with it.
| Operator | Finds | Example |
|---|---|---|
has:attachment | Mail with any attachment | has:attachment from:accounts@ |
filename: | An attachment by name or type | filename:pdf |
has:drive / has:document / has:spreadsheet / has:presentation | Mail with a Google Drive file, Doc, Sheet or Slides link | has:spreadsheet |
has:youtube | Mail with a YouTube video | has:youtube |
Where it is filed: labels, categories, folders
Search a label, one of the inbox categories, or everywhere including Spam and Trash.
| Operator | Finds | Example |
|---|---|---|
label: | Mail with a label | label:clients |
has:userlabels / has:nouserlabels | Mail with, or without, any label of your own | has:nouserlabels in:inbox |
category: | An inbox category: primary, social, promotions, updates, forums, reservations or purchases | category:promotions |
in:inbox / in:sent / in:spam / in:trash | Mail in one place | in:sent to:priya@example.com |
in:anywhere | Mail anywhere, including Spam and Trash | in:anywhere subject:receipt |
Combining searches
Any operators can be combined. A space between two means both must match.
| Operator | Finds | Example |
|---|---|---|
OR or { } | Mail matching either term | from:amy OR from:david |
- | Leaves out mail matching a term | invoice -paid |
( ) | Groups terms together | subject:(dinner movie) |
rfc822msgid: | One message by its Message-ID header | rfc822msgid: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, everything
from:northwind.comEvery message from one company, whoever sent it. - Invoices this month
subject:invoice newer_than:30dThe bills that arrived lately, and nothing older. - Unread with files
is:unread has:attachmentThe messages that want something opened. - Starred, not read
is:starred is:unreadWhat you flagged and have not got to yet. - Big attachments
has:attachment larger:10MWhere your storage went. - Old promotions
category:promotions older_than:30dThe pile a cleanup rule can clear for you. - Waiting in your inbox, unfiled
in:inbox has:nouserlabelsMail you have not sorted into any label yet. - Sent to one person
in: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.