Move Gmail Attachments to Google Drive, Save Space

Mail services are inefficient when it comes to storing files because of the MIME encoding overhead. "This encoded size is the actual size of the message as it travels over the Internet and is always larger than the raw size because of the MIME overhead and because binary attachments are generally encoded using base64 encoding.  Base64-encoded files are usually about 137% the size of the original files," says Erik Kangas.

If you want to use Google's storage more efficiently, you can find some old messages with large attachments, save the attachments to Google Drive and delete the messages. To keep the messages, you can forward them to yourself, remove the attachments, add Google Drive links and remove the original messages.

I've tested this by saving 2 FLAC attachments from 2 messages (about 43 MB) to Google Drive and deleting the associated messages from Gmail, including from the trash. Here's what I got:

* 1.58 GB used before moving files to Google Drive:


* 1.56 GB used after moving files to Google Drive:


To find Gmail messages with large attachments, you can use these operators. For example, search for [larger:5M] to find messages larger than 5 MB (that's the total size of the message).