How To Send An Executable File Via Gmail

Martin Brinkmann
Apr 26, 2011
Updated • Dec 16, 2012
Email, Gmail

Up until today I have never tried to send an executable file via Google's email service. When I tried that today, it looked at first as if it was not a problem. The file was uploading fine and showing up under attachments in the send message window.

When I tried to send the email however, I received an error message. It stated: Error. File.exe is an executable file. For security reasons, Google Mail does not allow you to send this type of file.

A click on OK displayed the compose message screen again, with the file still being attached to the email.

gmail error executable file

What I needed was a workaround. Sure, I could for instance upload the executable file to a file hosting website like Mediafire, and copy and paste the share file url in the email instead. That's a possibility and not a bad one.

Then again, I prefer a more straightforward approach. I first tried zipping the file to see if that was enough to bypass the file filter on Gmail. It was not. The very same message was displayed and the email failed to send.

Next thing I tried was to zip the executable file and apply a password to the file to see if that would bypass the executable file filter which it did not as well. Both options did not yield the desired result. Gmail was still blocking the email from being send. I did some experiments with different encryption formats, and found out that 7-zip files that contain executable files can be send, while more common extensions like zip or gz are blocked.

Lastly I decided to change the file extension of the executable, from exe to txt. And lo and behold, the email went through the filters. Changing the file extension of the attachment can be problematic in itself, especially so if you are not the recipient of the email. You need to provide instructions, preferably in the message, that the file extension needs to be changed before the file can be run on the target computer.

So, if you want to send an executable as an attachment from your Gmail account, you either need to rename the file extension to bypass the filter, upload the file elsewhere and link to it in the mail body, or use a compression format like 7z. The latter being the most comfortable option if the recipient uses a tool that supports the unpacking of those files.

Is there an option that I have overlooked? Let me know in the comments.


Tutorials & Tips

Previous Post: «
Next Post: «


  1. mmmmm1998 said on January 9, 2018 at 6:12 pm

    Just use .tar.lzma (I think, Google just don’t add this archive format to gmail scanning list, so the don’t scan it). 7Zip can open this format on Windows. File-roller or some another programs also can open this format on Linux.

  2. Rod Maher said on November 2, 2012 at 5:12 am

    What I have done is create an excel macro that saves each byte of the exe file binary data as cell values in a spreadsheet. The excel file also includes a macro to extract the binary data from the cells and rewrite the executable on the target computer. When the recipient runs the excel sheet they enable macros and the extraction macro automatically extracts the executable binary data and rebuilds the original executable on the target desktop. Macro enabled Excel sheets seem to get through all email filters I have tried so far and from the user point of view it is simply just another installation program requiring no knowledge other than enabling excel macros which they are prompted for by excel if not already enabled – so no renaming or unzipping etc.

  3. prem said on August 13, 2012 at 7:01 am

    send me all the tricks in gmail..

  4. Dave said on May 15, 2012 at 1:16 am

    This is such a bummer. I like to email myself project files at the end of projects using gmail as sort of a backup server that I can access anywhere – a client’s office for example.

    Now I can’t send my .Net files there. Doesn’t allow .vb files!! How dumb is that. vb files are plain text, have to be compiled.

  5. kavaliero said on April 25, 2012 at 2:29 pm

    You can also use Forgetbox For send your exe file or whatever !
    It’s totally free and it works with unlimmited size ;)

  6. simple said on December 17, 2011 at 10:28 pm

    Just use an obvious double extension like “file.exe.removethispart”

  7. yogesh said on August 2, 2011 at 4:41 pm

    plese send background gmail account setting

  8. Dheeraj said on July 1, 2011 at 9:10 am

    awesome article. Sometimes I really find necessary to send exe files in emails

  9. Dan said on April 28, 2011 at 8:14 am

    As someone has already noted, the problem with using .zip or .gz is that these archives do not encrypt the filenames, so gmail can see the .exe inside.

  10. OblongCircles said on April 27, 2011 at 3:16 pm

    Everyone I know with any sense just renames the extension. It’s not that complicated and only takes a few seconds. No need to post your files to some 3rd party site.

    1. shle896 said on April 27, 2011 at 5:00 pm

      You’d be surprised, however, how many of the recipients of such emails would still (even though it’s dead-simple) have a difficult time doing that. There are still a lot of computer illiterates out there who are lucky to even know how to log in to a computer, much less download and rename an exe file.

  11. Leela said on April 27, 2011 at 9:24 am

    I generally change EXTENSION to ex_ and send the mail.. I will put instructions to rename it to exe and it works for me always..

    Nice to see other tips fellow netizens have shared..


  12. g... said on April 27, 2011 at 4:45 am

    Am I the only one who uses Dropbox? :-)

  13. shle896 said on April 27, 2011 at 2:46 am

    You can upload and send exe files via Google Docs. I do it all the time.

  14. Baube19 said on April 27, 2011 at 2:43 am
  15. Baube19 said on April 27, 2011 at 2:42 am

    Upload it to google docs!
    LOL you never tought of that?

    1. Martin Brinkmann said on April 27, 2011 at 8:54 am

      Well uploading to Google Docs or a file hosting site does not really make that much of a difference.

  16. Alec_Burgess said on April 26, 2011 at 11:32 pm

    I use GMail as primary email address with options set to send all email received to my POP3 account with auto archive set so I can read it in Thunderbird. The major problem with this is if someone else wants to send me an EXE or ZIP containing an EXE. IIRC neither the sender nor myself gets notification that the email did not complete thought the email itself is successfully received by gmail where I typically never see it.

    Workaround is to request known senders to rename before attaching as zip_file or exe_file and then rename at my end. From unknown senders – I probably don’t want the file anyway :-)

  17. Raul said on April 26, 2011 at 8:20 pm

    PS: The method is working with any compression algorithm, not only RAR, if is able to encrypt file names.

  18. Raul said on April 26, 2011 at 8:18 pm

    I use the same method as Hans Warschau, for several years, and it works perfectly.

  19. Ryan D. Lang said on April 26, 2011 at 8:09 pm

    I bet .rar would work too, being proprietary.

  20. Nikos said on April 26, 2011 at 6:39 pm

    Zipping the file and zipping again the zipped, works for me!

  21. nickski said on April 26, 2011 at 6:35 pm

    I use Affixa. It’s free for personal use.

    Send .exe, zip, .rar, whatever… Sends the file out as an attachment, like the old site did.

    Simple, straight forward.

    Also allows me to use my gmail as the default Email Program some programs require when you want to send from within them.

  22. DanTe said on April 26, 2011 at 6:34 pm

    This is why I generally use Yahoo Mail. I only use Gmail for simple “texting” and for Android. Nothing else.

  23. MartinDK said on April 26, 2011 at 5:28 pm

    I’ve also been changing the extension name for years so I can smuggle my .exe files via Gmail.
    But instead of changing the .exe, I usually just append an extra extension, like this:


    That way, even people who have received no prior instructions are likely to realize what to do once they receive the file (assuming of course they are not computer illiterates and know what an extension is).

  24. MNeMiC said on April 26, 2011 at 4:37 pm

    I would really like an option in Gmail that enables receiving of EXE-files.
    Each exe-file could have a big red warning message near the attachment and 100 popups if that would help. Not having to ask people to rename the extension would be great.

  25. kostas said on April 26, 2011 at 4:37 pm

    I usually just rename from ‘file.exe’ to ‘file.ex’ :-)
    There are two advantages, the obvious being that it is much faster to change forth and back. The other significant advantage is that the extension is not known by any OS, so there is no hiding it. With a ‘txt’ extension under Windows for example, it could be a hassle for the recipient to change back the extension, as most people have the default setting of hiding it for known file types.

    1. Hans Warschau said on April 26, 2011 at 5:56 pm

      The problem with modifying the extension is that not all people knows how to rename it back to a working .exe file, yes it is easy on windows just by hitting F2 key, but, if for any chance they double click it first and open the file with let’s say notepad (usually one of the first options when dealing with unknown file type for the system) and set that application to be the default program to open it (that check box is checked by default on windows 7) most windows machines will hide the extension of the file because of the settings that comes on windows to hide known file extensions, once that happens, you will need either to find that setting in folder options or to use another file manager that actually shows all file extensions and rename it (yes there are other ways to do it) but my point is that the recipient doesn’t always knows how.

      I say all this because it has happened to persons I know, when you work in the technical support you get amazed on what the users can click or do.

    2. Martin Brinkmann said on April 26, 2011 at 5:16 pm

      Interesting tip, I agree it is easier to remember. you could probably name it .ex_ as well.

  26. Hans Warschau said on April 26, 2011 at 4:36 pm

    Hello Martin.

    You can send .exe files compressed using Winrar with .rar extension, what you need to do is password protect it, but also (this is important or it wont work), you need to tick the option under advanced settings in WinRAR to “Encrypt the file name”.

    That way is easier because you add the password to the recipient in the message, painless when you deal with people that doesn’t know much about using computers.

    That way it works perfect, I’ve tried it before and tried again just now to be 100% sure it still works.

    I can take a screenshot of the option you need to set in WinRAR but it will be in Spanish :D.

    Tested using WinRAR version 3.93.

    1. Mouna said on May 20, 2012 at 8:28 pm

      Hello Hans Warschau,

      I tried to send a file with the extension .exe, as you said and it worked. Thank you so much.

    2. Martin Brinkmann said on April 26, 2011 at 5:16 pm

      Hans good addition. I’m using 7-zip which comes without options to create rar files. Suspected that it would work but could not check it. Thanks

  27. szekelya said on April 26, 2011 at 4:30 pm

    These hacks or workarounds are the very reason I don’t use gmail (or any email) to send exe files. Nowadays I prefer the CloudApp ( to send executables or archives.
    Once you uploaded the file, you just send a download link via email. The page the recipient gets is so simple you don’t even have to describe what to do. Example:

  28. KoalaBear said on April 26, 2011 at 4:08 pm

    Would be nice if GMail would allow to send .exe files. That they scan it before its sent or so. (not 100% safe offcourse)

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.