Sort Gmail By Attachment Size


Update 3/19/2013 

You can now actually run a search for attachments based on size!  Approved operators:

  • size:5m – Find emails with attachments of 5M
  • larger:5m – Find e-mails with attachments larger than 5M

Suggested query: larger:5m older_than:2y

^ Will find all e-mails larger than 5MB and older than 2 years.


Gmail inbox getting full?  Mine was too.  For some inexplicable reason, Google does not allow you to run a simple search of your inbox where you can sort by attachment size.  There are some options to get your Gmail account under control, most useful of which is searching for particular file types.   Run a search for the most commonly large file types, and optionally add a date modifier so you only look at mail older than a certain date.

Enter this into the search box:
filename:(mpg OR mpeg OR avi OR wmv OR zip OR bmp OR mp3 OR wma OR mov) before:2010/12/31

Note: Change the “before” date to whatever date you want.  It can even be today’s date.

I did not exclude JPG or JPEG because pictures are often a useful thing to save.  I still recommend going through each e-mail before doing a mass-delete with the above search query, but this will at least give you a useful workaround while Google works on a sortable attachment filter.

Google is well aware of the need for this feature, but feel free to cast your vote on their suggestion page, like I did.

Make sure to vote for Google to add this as an official function.


  • Show Comments (9)

  • Reg


    Your suggestion does not seem to work on mine. Am i doing something wrong? I just typed “larger:5m older_than:2y” on the search box and NO email came out.



  • Matt Silverman

    @Eric — That’s just it, there is currently no way to sort by attachment size, but the assumption is that you want to sort by attachment size in order to clear out your inbox, so the instructions above will help you clear out your inbox of e-mail with unnecessary attachments. It’s the next best thing! In the meantime, you should submit your vote to help get this as a REAL feature on gmail as soon possible.

  • Eric

    The title of this article is “Sort Gmail By Attachment Size”.
    But, the article didn’t address how to sort by size AT ALL!
    Can that info be added, please?

  • Himadri

    awesome code. thanks.

  • leonel

    Still only a suggestion… when will they implement it?

  • Jacques Stern

    Thanks for the tip! it worked very nicely.

  • Yasser Mahgoub

    Thank you Matt. This was very useful to free some space. Thank you very much.

  • Kitty

    For $5 a year you can buy 25gigs of storage, so you dont have to delete old emails.

  • dave meslin

    Great tip. thnx!!!

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

comment *

  • name *

  • email *

  • website *


You May Also Like

Sort Gmail By Attachment Size

$20 leather jacket at CVS… So tempting. It really makes you wonder sometimes.  Is ...

Chocolate Pinkberry Delivery in NYC

Why do you deliver at 11pm Pinkberry? Why? The chocolate is super sweet, almost ...

Sort Gmail By Attachment Size

I have to admit, I am a little disheartened.  I was convinced that building ...