How to Sort or Find Emails Using Gmail or G Suite


How do I sort my email using Gmail or G Suite to show unread messages first?

How do I find an email between certain dates using Gmail or G Suite?

How do I find emails using Gmail or G Suite which only have attachments?

The answer to sorting or finding your email using Gmail or G Suite (formally known as Google Apps) is pretty simple, if you know a few tricks. For example to display emails which have not yet been read, simply click into your search field within your email account and type: is:unread

Sorting Emails Using Gmail or G Suite

This will display all unread emails.

Let’s assume that you’ve created a Label called New Customers and you want to display all unread emails which have that label assigned. If that were the case you simply search for: label:new-customers is:unread

Get the idea? In fact Google gives Gmail and G Suite users a variety of ways to sort and to find emails. Below is a table of some of the Advanced Gmail Search Options available to you.

from:Used to specify the senderExample: from:john
Meaning: Messages from John
to:Used to specify a recipientExample: to:michael
Meaning: All messages that were sent to Michael (by you or someone else)
subject:Search for words in the subject lineExample: subject:dinner
Meaning: Messages that have the word "dinner" in the subject
ORSearch for messages matching term A or term B
*OR must be in all caps
Example: from:john OR from:michael
Meaning: Messages from John or from Michael
Used to exclude messages from your searchExample: dinner -movie
Meaning: Messages that contain the word "dinner" but do not contain the word "movie"
label:Search for messages by labelExample: from:john label:friends
Meaning: Messages from John that have the label "friends"

Example: from:michael label:my-family
Meaning: Messages from Michael that have the label "My Family"

has:attachmentSearch for messages with an attachmentExample: from:john has:attachment
Meaning: Messages from John that have an attachment
list:Search for messages on mailing listsExample:
Meaning: Messages with the words in the headers, sent to or from this list

filename:Search for an attachment by name or typeExample: filename:englishhomework.txt
Meaning: Messages with an attachment named "englishhomework.txt"

Example: label:work filename:pdf
Meaning: Messages labeled "work" that also have a PDF file as an attachment

" "
Used to search for an exact phrase (Capitalization or case sensitivity is ignored)

Example: "i'm feeling lucky"
Meaning: Messages containing the exact phrase "i'm feeling lucky" or "I'm feeling lucky"

Example: subject:"dinner and a movie"
Meaning: Messages containing the exact phrase "dinner and a movie" in the subject

( )Used to group words
Used to specify terms that shouldn't be excluded

Example: from:john (dinner OR movie)
Meaning: Messages from John that contain either the word "dinner" or the word "movie"

Example: subject:(dinner movie)
Meaning: Messages in which the subject contains both the word "dinner" and the word "movie"

in:anywhereSearch for messages anywhere in Gmail regardless of the Label
*Messages in Spam and Trash are excluded from searches by default
Example: in:anywhere movie
Meaning: Messages in All Mail, Spam, and Trash that contain the word "movie"
Search for messages in Inbox, Trash, or SpamExample: in:trash from:john
Meaning: Messages from John that are in Trash
Search within messages that Priority Inbox considers important.Example: is:important from:michele
Meaning: Messages from Michele that were marked as important by Priority Inbox
Search for messages that are starred, unread, or readExample: is:read is:starred from:Chelise
Meaning: Messages from Chelise that have been read and are marked with a star
Search for messages with a particular starExample: has:purple-star from:jeff
Meaning: Messages from Jeff that are marked with a purple star
Used to specify recipients in the cc: or bcc: fields*
*Search on bcc: cannot retrieve messages on which you were blind carbon copied
Example: cc:david
Meaning: Messages that were cc-ed to David
Search for messages sent or received during a certain period of time
(using the date format yyyy/mm/dd)
Example: after:2014/09/24 before:2014/09/26
Meaning: Messages sent between September 24, 2014 and September 26, 2014.*
*More precisely: Messages sent after 12:00 AM (or 00:00) April 16, 2004 and before April 18, 2004.
Similar to older and newer, but allows relative dates using d, m, and y for day, month, and yearExample: newer_than:2d
Meaning: Finds messages sent within the last two days.
is:chatSearch for chat messagesExample: is:chat dolphin
Meaning: Any chat message including the word "dolphin."
deliveredto:Search for messages within a particular email address in the Delivered-To line of the message headerExample:
Meaning: Any message with in the Delivered-To: field of the message header (which can help you find messages forwarded from another account or ones sent to an alias).
circle:Search for messages that were sent from someone who you added to a particular Google+ circleExample: circle:friends
Meaning: Any message that was sent by a person in your "Friends" circle.

Examples: circle:"soccer friends (team blue)" or circle:"my \"fab four\""
Notes: For circle names that include a space, parentheses, curly brackets, or vertical bar, add quotes around the name. For names that include quotes, add a back slash immediately before the quotes.
has:circleSearch for all messages that were sent from someone who you added to your Google+ circlesExample: has:circle
Meaning: Any message that was sent by a person in any of your circles.
category:Search for messages within a categoryExample: category:updates
Meaning: All messages in the Updates category.

Example: category:social Mindy
Meaning: Messages in the Social category that include "€œMindy."€
size:Search for messages larger than the specified size in bytesExample: size:1000000
Meaning: All messages larger than 1MB (1,000,000 bytes) in size.
Similar to size: but allows abbreviations for numbersExample: larger:10M
Meaning: All messages of at least 10M bytes (10,000,000 bytes) in size.
(plus sign)
Match the search term exactlyExample: +unicorn
Meaning: Finds messages containing "€œunicorn"€ but not "€œunicorns"€ or "€œunciorn"€
rfc811msgid:Find a message by the message-id headerExample:
Meaning: Locates the exact message with the specified SMTP message-id.
Search for messages that have and have not had labels that you created applied to them.
NOTE: Gmail applies labels to individual messages, not to conversation threads.
Example: has:nouserlabels
Meaning: Finds all messages without any of your own labels (excludes automatic labels like inbox, spam, and trash). Since Gmail applies labels to individual messages, you might see results that appear to have labels; in this case, another message in the same conversation thread has had a label applied to it.

Have fun and let us know which of these operators or commands you like best!

Reader Interactions


  1. I’ve always wondered how to search for unread emails. This list is fantastic – many thanks!!!

  2. The question was how to sort, you replied how to search. Why do you stubbornly refuse to develop a sort function? Thanks.

    • Hi Chris,

      Our apologies if you think we dodged the question of sorting but by using the many search features available to you, it actually makes sorting a moot point. While I agree it would be nice to have a pull down to sort by unread by date, or oldest first, I believe that the Google thought process is why sort when you can just find just as easily. Keep your feedback coming as Google is always listening to enhance their services. Thanks for the feedback.

      • A very useful list so thanks for that however, the Google thought process doesn’t appear to take account of all the target user groups such as my parents (70+) who are certainly not silly but would never understand this type of “open” search method. A bit like the Microsoft file search keywords! This means I have to keep logging in on their behalf and doing housekeeping.

  3. i understand your search options but it sure would be handy to delete many emails if we could sort by name…we get so many crazy emails that it is impossible to stay ahead of clearing the inbox. The ability to sort by name, size or last modified date would make clearing emails so much easier!
    Please consider!

  4. I agree that being able to sort by “From” or “Subject” would greatly aid deletion of unwanted emails and moving of wanted emails to other folders. I do not understand why Google is so adamantly refusing to provide such a basic function that essentially all other email applications include.

    • There seems to be a persistent reluctance to develop this feature for gmail, despite ongoing frustration and feedback from users. The admin response seems to be various forms of “but you just don’t understand search”. Rest assured, I understand search. I use it regularly. But I find it very frustrating to have to construct a multi-tiered boolean query, with multiple limiters and field values to be able to filter out the material that I want IN CONTEXT. Usually, it take two or three tries, and then it is often still a matter of scroll and hope.

      Please Google, the users who are requesting this are not stupid, or stubborn. They are simply expressing (repeatedly) a use-case that is not addressed by your current product. A significant portion of your users would find your product more effective and efficient if this was an option.

      Please consider putting sort on your development path.

      • I agree with PM3. I want to be able to sort all my emails, Inbox, Sent, Trash, etc. by To/Sent name and I don’t want to have to do “Search” for each name.

  5. I have read there is no “sort” option for Gmail. With thousands of emails, sorting is the most efficient and effective way to find and delete emails. It is impossible to “search” for every combination of email address, whereas sorting would be quick and easy.
    I tried searching for a* (meaning all emails that start with letter a) and this was not successful. Is there a way to search for all emails that starts with a specific letter?
    Thank you.

    • Hi Mary,

      Unfortunately there is no way currently to search for a word within an email that starts with a specific letter. To be honest, I can’t imagine that too many people would need to perform that type of search. If you wanted to find a contact that starts with a particular letter, then simply composing an email and pressing the letter A in the recipient field would popup a list of your contacts whose name begin with that letter.

Leave a Reply

Your email address will not be published. Required fields are marked *