Gmail search operators: the full list
A search operator is a word with a colon that filters a Gmail search, such as from: or
has:attachment. Type one or more in the search bar at the top of Gmail. Gmail shows only the emails
that match all of them. This table lists the operators in
Google’s own list, with an example of each.
| Operator | What it finds | Example |
|---|---|---|
| from: | Emails from a person | from:amy@example.com |
| to: | Emails sent to a person | to:me |
| cc: / bcc: | Emails with a person in Cc or Bcc | cc:john@example.com |
| subject: | Words in the subject line | subject:dinner |
| after: / before: / older: / newer: | Emails received in a date range | after:2026/01/01 before:2026/02/01 |
| older_than: / newer_than: | Emails older or newer than a time period (d, m or y) | older_than:1y |
| OR or { } | Emails that match one term or another | {from:amy from:david} |
| AND | Emails that match all terms (a space does the same) | from:amy AND to:david |
| - | Emails without a word | dinner -movie |
| " " | An exact word or phrase | "dinner and movie tonight" |
| ( ) | A group of terms | subject:(dinner movie) |
| AROUND | Words near each other | holiday AROUND 10 vacation |
| has:attachment | Emails with an attachment | has:attachment |
| filename: | Attachments with a name or file type | filename:pdf |
| has:drive / has:document / has:spreadsheet / has:presentation / has:youtube | Emails with a Drive file, Google Doc, Sheet, Slides or YouTube link | has:spreadsheet |
| larger: / smaller: / size: | Emails by size, attachments included | larger:10M |
| label: | Emails with one of your labels | label:friends |
| category: | Emails in an inbox category | category:promotions |
| in:anywhere | All mail, Spam and Trash included | in:anywhere movie |
| in:archive | Archived emails | in:archive payment reminder |
| in:snoozed | Snoozed emails | in:snoozed |
| is: | Important, starred, unread or read emails | is:unread |
| has:yellow-star, has:red-bang and the other star options | Emails with one of your star options | has:yellow-star OR has:purple-question |
| is:muted | Muted conversations | is:muted |
| list: | Emails from a mailing list | list:info@example.com |
| deliveredto: | Emails delivered to an address | deliveredto:username@example.com |
| has:userlabels / has:nouserlabels | Emails with or without a label | has:nouserlabels |
| + | A word matched exactly | +unicorn |
| rfc822msgid: | An email by its Message-ID header | rfc822msgid:200503292@example.com |
| label:encryptedmail | Emails sent with client-side encryption | label:encryptedmail |
| header: | Emails with a custom header or header value | header:X-Google-Calendar-Notification:rsvpWithNote |
How to search Gmail by date
Use after: and before: with a date in year/month/day order. For example,
after:2026/01/01 before:2026/02/01 finds the emails from January 2026. Gmail also accepts
month/day/year, but year/month/day cannot be misread.
- before: does not include its own date. To include 31 January, write
before:2026/02/01. The builder does this for you: the “To date” is included. - Gmail reads a date as midnight Pacific Time. Google’s Gmail API filtering guide says so, and adds that dates written as Unix seconds give exact times. Turn on “Exact for my time zone” to write the dates that way.
- For a period up to today, use older_than: or newer_than:. Add a number and d (days), m (months) or y (years).
newer_than:7dfinds the emails from the last week, andolder_than:2yfinds the emails that are more than two years old.
How to search Gmail by size
larger:10M finds emails over 10 MB, and smaller:1M finds emails under 1 MB.
size: takes a number of bytes. Gmail measures the whole email, with its text and its
attachments, so a search by size is the fastest way to find the attachments that fill your storage. The guide
to finding large attachments in Gmail shows the next
steps.
How to find emails with attachments
has:attachment finds every email with an attachment. filename:pdf finds attachments of one
file type, and filename:invoice finds attachments with a word in the name. To match one of two
types, put both in braces: {filename:pdf filename:docx}. Files shared as Google Drive links are
not attachments; find them with has:drive, has:document,
has:spreadsheet or has:presentation.
Combine operators: OR, minus, quotes and parentheses
- Space means “and”:
from:amy has:attachmentneeds both. - OR or braces mean “or”:
from:amy OR from:davidand{from:amy from:david}find the same emails. - A minus sign removes a word:
invoice -draft. - Quotes match an exact phrase:
"quarterly report". - Parentheses apply one operator to a group of words:
subject:(dinner movie).
Save the attachments from your search results
A search shows the emails, but Gmail saves their attachments one email at a time. Save Bulk Gmail Attachments saves all of them in one step. Select the emails on the results page, click Save Attachments, and choose a ZIP file or a Google Drive folder. The extension saves the emails that you select on the current page, so for a long list, do it again on each page. The guide to downloading Gmail attachments in bulk compares it with Google Takeout and Apps Script.
To find an email that you archived, start with in:archive. The guide to
archived emails in Gmail explains where they go. The
Gmail filters guide shows how to run a search like these on every new
email automatically.