Sort Gmail by Subject, Labels and Sender to Organize Your Inbox
Advertisements:One feature, I often miss in Gmail is its ability to sort messages. By default, Gmail sorts mails by date, which doesn’t do a great job in organizing your inbox. There is no facility to sort mails by name, subject, size and sender. Consider this scenario where sorting of mails can be very useful : You were on vacation and on returning found thousands of unread mails, and now you want to see only the unread messages by your boss between the specific dates.
One thing to note that Gmail is based on search and not sort, therefore things have to be done here in different ways. Let us look how you can sort Gmail messages:
Sort Gmail by Subject
To sort your mails by subject, copy-paste the below code into the address bar and press enter. In Chrome, you will have to go to Console (Presee F12) and paste his code. This code will only sort the current set of mails that you are viewing.
Credit : Snipplr
Please note that Gmail frequently changes its backend HTML code and therefore this javascript may not always work.
Sort Gmail by Labels
In Gmail, you can drag-and-drop a label, which makes labelling quite easy. You can also select which labels to show and which one to hide from Gmail’s settings page. However, unlike outlook that arranges folders automatically there is no such sorting facility in Gmail.
This greasemonkey script lets you sort labels as you last used them. Example: From the set of labels X,Y and Z suppose you recently used Y. So, the labels will be sorted by Y,X and Z.
You can download this script here. (and you must have greasemonkey firefox addon to use it)
Sort Gmail by Sender
Gmail has already provided this feature however with a different name, Recent Conversations. Hover over any name and select recent conversations to view all incoming(received) or outgoing(sent) mails with selected name. To view only received mails, search with from:sender’s name in Gmail inbox. Find the complete tutorial here.
Sort Gmail by Size
As organize by size cannot be done directly in gmail, you can use Outlook or Thunderbird (email clients) to import your mails and then sort them by size. [Importing Instructions]. Since there is no way you can sort Gmail by size of mails, you can however use the search operator “has:attachment” to find all the large size mails.
You can also search for “filename:mp3” or “filename:pdf” or any files that you regularly receive to find the large size mails.
Bonus tip: For those, whose inbox memory is full:
Though Gmail provide hundreds of thousands of inbox memory (at present 7400MB), then to you can run out of space. In such a case search for “has:attachment from:me label:sent” which will list mails sent by you and have a attachment. You can safely delete them to get some extra space.
How to Search for Mails within Specific Date
Gmail by default sort mails by date. To find mails between specific dates in Gmail, you will have to do an advance search. Click on “Show search option” beside Gmail search box and then choose “Date within” search criteria. There is no field for “From” and “To” date to search however entering only one date and then selecting date within range will give same results.

Sort Read and Unread Mails
There is no sorting available to sort unread mails first and then read one with a simple operation like in yahoo mail. But you can do two different searches to find all the read and unread mails sorted by date.
To search all unread mail, enter “is:unread” in the Gmail searc box. Similarly, enter “is:read” to search for all read mails.
Sort Incoming Mails with Filters
You probably know that, you can use Gmail id with a plus (+) to create a new version of your account. Suppose your email id is gtricks@gmail.com. Now, even if you subscribe any website with gtricks+blog@gmail.com , then to all the mails will come to you only. You can create as many versions you want by appending any word with your username with plus (+) symbol.
Now the tricks is to use Filters with this feature to sort different types of incoming mails.
Conclusion: Gmail is Based on Search Not Sort
Gmail is different from the regular mail clients like outlook or yahoo. It’s a very powerful application, if only you can learn to search and make proper filters. Here are some of the search operators that you will find useful in daily life.
| Operator | Definition | Example(s) |
|---|---|---|
| from: | Used to specify the sender | Example – from:amy Meaning – Messages from Amy |
| to: | Used to specify a recipient | Example – to:david Meaning – All messages that were sent to David (by you or someone else) |
| subject: | Search for words in the subject line | Example – subject:dinner Meaning – Messages that have |
| OR | Search for messages matching term A or term B* *OR must be in all caps | Example – from:amy OR from:david Meaning – Messages from Amy or from David |
| - (hyphen) | Used to exclude messages from your search | Example – dinner -movie Meaning – Messages that contain the word “dinner” but do not contain the word “movie” |
| label: | Search for messages by label* *There isn’t a search operator for unlabeled messages | Example - from:amy label:friends Meaning – Messages from Amy that have the label “friends” Example - from:david label:my-family Meaning – Messages from David that |
| has:attachment | Search for messages with an attachment | Example – from:david has:attachment |
| list: | Search for messages on mailing lists | Example – list:info@example.com Meaning – Messages with the words info@example.com in the headers, sent to or from this list |
| filename: | Search for an attachment by name or type | Example – filename:physicshomework.txt Example – |
| ” ” (quotes) | Used to search for an exact phrase* *Capitalization isn’t taken into consideration | Example – “i’m feeling lucky” Meaning – Messages containing the phrase “i’m feeling lucky” or “I’m feeling lucky” Example – |
| ( ) | Used to group words Used to specify terms that shouldn’t be excluded | Example – from:amy(dinner OR movie) Meaning – Messages from Amy that contain either the word “dinner” or the word “movie” Example – |
| in:anywhere | Search for messages anywhere in Gmail* *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” |
| in:inbox in:trash in:spam | Search for messages in Inbox, Trash, or Spam | Example – in:trash from:amy Meaning – Messages from Amy that are in Trash |
| is:starred is:unread is:read | Search for messages that are starred, unread or read | Example – is:read is:starred from:David Meaning – Messages from David that |
| cc: bcc: | 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 |
| after: before: | Search for messages sent during a certain period of time* *Dates must be in yyyy/mm/dd format. | Example – after:2004/04/16 before:2004/04/18 Meaning – Messages sent between April 16, 2004 and April 18, 2004.* |
| is:chat | Search for chat messages | Example – is:chat monkey |
| deliveredto: | Search for messages within a particular email address in the Delivered-To line of the message header | Example – deliveredto:username@gmail.com Meaning – Any message with username@gmail.com 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). |
[From Google support]
Related : Best Gadgets for Gmail