Gmail Size Search - Find all Emails with Large Attachments

Gmail Search by Size Search Gmail messages by Size using the undocumented “size” operator

Wondering which email messages are eating up all the Gigabytes of space that you have in your Gmail mailbox? While there exist Google Gmail Scripts that let you discover all the space-hogging email attachments, you don’t really need them anymore.

Gmail supports an undocumented “size” search operator that you can use to quickly find all the big emails in the mailbox whose size exceeds a particular threshold. The search syntax is:

size:[size in bytes]

To give a real example, a Gmail search query like size:5242880 will list all big emails who size is 5 MB or greater while size:10485760 will list email messages that are bigger than 10 MB.

You may specify the size in MB as well which makes it a lot easier. For instance, size:5MB (or say size:5M) will find all Gmail messages that are 5 MB or greater in size.

Combine the size search operator in Gmail with has:attachment and filename:ext operator and you have all the email messages that have attachments that are of a particular file type.

Gmail Size Search for Large Attachments

size:5mb has:attachment - All emails larger than 5 MB containing file attachments.

size:10mb has:attachment filename:pdf - Emails larger than 10 MB PDF attachments.

In addition to size, you can use search operators like larger, larger_than, smaller and smaller_than to find files of any particular size. A combination of these size search operators is possible too. For instance, the following Gmail search query will find all emails with attachment sizes between 5 MB and 8 MB.

larger_than:5m smaller_than:8M

Once you have spotted the large emails attachments that are taking too much space, apply the #googleDrive label to directly save those attachments to Google Drive before deleting them from your Gmail mailbox.

Amit Agarwal

Amit Agarwal

Google Developer Expert, Google Cloud Champion

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.

Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

0

Awards & Titles

Digital Inspiration has won several awards since it's launch in 2004.

Google Developer Expert

Google Developer Expert

Google awarded us the Google Developer Expert award recogizing our work in Google Workspace.

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards in 2017.

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional (MVP) title for 5 years in a row.

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator title recognizing our technical skill and expertise.

Email Newsletter

Sign up for our email newsletter to stay up to date.

We will never send any spam emails. Promise.