Gmail has some restrictions about which files can go on a zipped attachment (https://support.google.com/mail/answer/6590). I want to attach a small zip file (146.7 kB), which only contains the following extensions: php, css, js, png, jpg, plus some text files without extension. There's no zip file inside the zip file. It seems I'm following their rules.

So why do I keep getting a "safety reasons" block?

Some details: the file was created by "zip" application Zip 3.0 (July 5th 2008), by Info-ZIP running in Ubuntu 14.04. The command line was:

sudo zip pl20151214.zip * icon/* ../../includes_pl/*

Looks like there are some problems regarding the ../../ path. I can't exclude it using Archive Manager for GNOME. But recreating the zip without this path the problem is solved.

  • 1
    You could try adding the unzipped files one at a time until you get an exception - you don't need to send the e-mail, but it will tell you which file is causing a problem (assuming there aren't hundreds of files in the zip).
    – AFH
    Commented Dec 14, 2015 at 21:56
  • you could try renaming it "zit"
    – barlop
    Commented Dec 14, 2015 at 22:00
  • 2
    I knew Google was nosey, but this is really obnoxious. You can't send a supposedly private communication containing anything they can't read. One solution would be to use a different email service.
    – fixer1234
    Commented Dec 14, 2015 at 22:39
  • 1
    Related: How to allow Gmail to receive ZIP files
    – ale
    Commented Dec 17, 2015 at 1:52
  • 2
    There must be something in that directory that's running afoul of their rules. It might be better to put the ZIP file up on Google Drive and just send a link to it.
    – ale
    Commented Dec 17, 2015 at 1:54

3 Answers 3


Answer to why: Most likely it contains an executable file.

There are many blocked filetypes.

You showed the correct link as to which types are blocked.

Why messages get blocked (Support.Google.com)


File types you can't include as attachments

.ADE, .ADP, .BAT, .CHM, .CMD, .COM, .CPL, .EXE, .HTA, .INS, .ISP, .JAR, .JS (NEW), .JSE, .LIB, .LNK, .MDE, .MSC, .MSI, .MSP, .MST, .NSH .PIF, .SCR, .SCT, > .SHB, .SYS, .VB, .VBE, .VBS, .VXD, .WSC, .WSF, .WSH

This applies to .zip and .7z and .rar files.

Back in the day, all you had to do was rename the .zip file to something else like .txt but that no longer works. It is now doing a deeper inspection than before. (February 2018)

The easiest way around it is to upload your ZIP file to Google Drive then use the Drive Attach button at the bottom to send it as a link.

The Drive Attach button is right next to the normal Attach (paperclip) button.


I found an alternative solution to send zip attachment (or other forbidden files) through Gmails, other than using GDrive: it's not direct, but someone could find better than using GDrive.
-> The alternative way is: Encode the zip file in Base64 and save it in a file, then send it as attachment.
Who receive the file has to decode it. Not so direct, but it works! (I tried today, 14/9/2020).
Free sites to encode/decode are for example: www.base64encode.org & www.base64decode.org

  • For some reason encoding and then decoding the zip file to base64 with the tool at the links you provided is corrupting my files. I searched for similar online tools, but none of them seems to like to ingest whole files... I didn't want to download an application just for that... so in the end I came up with my own solution (which you can see in my answer).
    – red-o-alf
    Commented Nov 6, 2021 at 0:06

As others have pointed, Gmail blocks some files by their extensions (or even by their content), but I found a workaround.

Before sending the file, open it by reading it as hexadecimal, then save it with UTF-8 encoding; you can now send it to Gmail, and it won't complain as it won't be able to recognize what the file truly represents (just make sure to omit the typical file extensions Gmail doesn't like, or it will still make troubles just based on that).

When you receive the file at the other end, open it by reading it as UTF-8 and then save it back with hexadecimal encoding and... bam! You now have your original executable/compressed archive, which was clever enough to slide through the impervious Gmail lands without drawing attention ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.