Refine searches in Gmail

You can use words or symbols called search operators to filter your Gmail search results. You can also combine operators to filter your results even more.

Use a search operator

  1. On your computer, go to Gmail.
  2. At the top, click the search box.
  3. Enter a search operator.

Tips:

  • After you search, you can use the results to set up a filter for these messages.
  • When using numbers as part of your query, a space or a dash (-) will separate a number while a dot (.) will be a decimal. For example, 01.2047-100 is considered 2 numbers: 01.2047 and 100.
Search operator Description Example

from:

Find emails sent from a specific person.

from:me

from:amy@example.com

to:

Find emails sent to a specific person.

to:me

to:john@example.com

cc:

bcc:

Find emails that include specific people in the "Cc" or "Bcc" fields.

cc:john@example.com

bcc:david@example.com

subject:

Find emails by a word or phrase in the subject line.

subject:dinner

subject:anniversary party

after:

before:

older:

newer:

Search for emails received during a certain time period.

after:2004/04/16

after:04/16/2004

before:2004/04/18

before:04/18/2004

older_than:

newer_than:

Search for emails older or newer than a time period. Use d (day), m (month), or y (year).

older_than:1y

newer_than:2d

OR or { }

Find emails that match one or more of your search criteria.

from:amy OR from:david

{from:amy from:david}

AND

Find emails that match all of your search criteria.

from:amy AND to:david

-

Exclude emails from your search criteria.

dinner -movie

AROUND

Find emails with words near each other. Use the number to say how many words apart the words can be.

Add quotes to find messages in which the word you put first stays first.

holiday AROUND 10 vacation

"secret AROUND 25 birthday"

label:

Find emails under one of your labels.

label:friends

label:important

category:

If you use inbox categories, find emails under one of the categories.

category:primary

category:social

category:promotions

category:updates

category:forums

category:reservations

category:purchases

has:

Find emails that include:

  • Attachments
  • Inline images
  • YouTube videos
  • Drive files
  • Google Docs
  • Google Sheets
  • Google Slides

has:attachment

has:youtube

has:drive

has:document

has:spreadsheet

has:presentation

list:

Find emails from a mailing list.

list:info@example.com

filename:

Find emails that have attachments with a certain name or file type.

filename:pdf

filename:homework.txt

" "

Search for emails with an exact word or phrase.

"dinner and movie tonight"

( )

Group multiple search terms together.

subject:(dinner movie)

in:anywhere

Find emails across Gmail. This includes emails in Spam and Trash.

in:anywhere movie

in:snoozed

Find emails that you snoozed.

in:snoozed birthday reminder

is:muted

Find emails that you muted.

is:muted subject:team celebration

is:

Search for emails by their status:

  • Important
  • Starred
  • Unread
  • Read

is:important

is:starred

is:unread

is:read

has:yellow-star

has:orange-star

has:red-star

has:purple-star

has:blue-star

has:green-star

has:red-bang

has:orange-guillemet

has:yellow-bang

has:green-check

has:blue-info

has:purple-question

If you set up different star options, you can search for emails under a star option. Learn how to star emails in Gmail.

has:yellow-star OR has:purple-question

deliveredto:

Find emails delivered to a specific email address.

deliveredto:username@example.com

size:

larger:

smaller:

Find emails by their size.

size:1000000

larger:10M

+

Find emails that match a word exactly.

+unicorn

rfc822msgid

Find emails with a specific message-id header.

rfc822msgid:200503292@example.com

has:userlabels

has:nouserlabels

Find emails that have or don't have a label. Labels are only added to a message, and not an entire conversation.

has:userlabels

has:nouserlabels

Related resources

Search
Clear search
Close search
Google apps
Main menu
9771949433376400641
true
Search Help Center
true
true
true
true
true
17
false
false