Gmail 'This Attachment Was Removed': How to Fix Blocked Attachments
·Dioveo Team

Gmail 'This Attachment Was Removed': How to Fix Blocked Attachments

Gmail
Storage
Troubleshooting

You try to send a file, or open one someone sent you, and Gmail stops you cold: "This attachment was removed," or "Blocked for security reasons," or an "Anti-virus warning." It is one of the more frustrating Gmail messages because it usually appears without much explanation, and the file you need is right there, just out of reach.

The good news is that a Gmail attachment that is blocked or removed almost always falls into one of a handful of predictable categories, and most have a safe, legitimate workaround. This guide explains why Gmail blocks attachments, which file types it refuses, what messages like "This attachment was removed" mean, and how to get your file through without disabling the protections that are there for a reason.

Why Gmail Blocks or Removes Attachments

Gmail does not block files at random. Every attachment, incoming and outgoing, passes through Google's security scanning, and a file gets stopped for one of these reasons:

  • The file type is on Gmail's blocked list (the most common cause for things like installers and scripts).
  • A virus or malware was detected in the file, which triggers the "Anti-virus warning."
  • The file exceeds the size limit — Gmail rejects sends over 25 MB and will not accept incoming messages over 50 MB.
  • A Google Workspace admin policy is blocking certain file types or senders at the organization level.
  • The file is inside an archive that Gmail can scan, and it found a blocked type within it.

When Gmail removes an attachment from an email you received, it replaces it with a note such as "This attachment was removed" or "Anti-virus warning - encrypted attachment." The email still arrives; only the file is stripped. Knowing which of these triggered the block tells you which workaround will actually work.

Which File Types Does Gmail Block?

Gmail blocks specific file extensions outright, regardless of what the file actually contains, because these types are commonly used to deliver malware. If you attach one, Gmail refuses to send the message. If someone sends one to you, Gmail strips it and shows the "blocked for security reasons" note.

The blocked list includes executables, scripts, and certain archives. Common examples:

  • Executables and installers: .exe, .msi, .dll, .com, .bat, .cmd, .scr, .cpl, .app, .jar
  • Scripts: .js, .vbs, .vbe, .ws, .wsf, .wsh, .ps1, .sh, .py (some scripting types)
  • Shortcuts and system files: .lnk, .reg, .ade, .adp
  • Certain archives: .jar, and archives (.zip, .rar, .7z, .tar, .gz) when they contain one of the blocked types above

That last point is important and surprises a lot of people: Gmail looks inside archives. Zipping a .exe does not hide it, because Gmail scans the contents of the archive and blocks it if it finds a banned type inside. We will come back to this, because it determines which workarounds genuinely work.

What "This Attachment Was Removed" Actually Means

If you are on the receiving end and see "This attachment was removed," one of two things happened:

  1. The file type is blocked. Someone sent you a .exe, .bat, or similar, and Gmail stripped it on arrival. The message text is intact; the attachment is gone.
  2. A virus was detected. Gmail's scanner flagged the file as malware, usually with "Anti-virus warning" wording. This is not a false alarm to casually override; Gmail removes the file precisely because opening it could be dangerous.

In both cases, the file is not sitting in your inbox waiting to be recovered, and Gmail does not keep a copy you can release later. To get the file, the sender needs to deliver it through a different channel, covered below.

How to Send a Blocked Attachment Safely

The right workaround depends on why the file was blocked. Here are the approaches, from most to least reliable.

Option 1: Share via Google Drive (the reliable fix)

This is Google's intended solution and it works for almost every blocking scenario, including blocked file types and oversized files. Instead of attaching the file, upload it to Drive and send a link:

  1. Upload the file to Google Drive.
  2. In the Gmail compose window, click the Google Drive icon in the toolbar (the triangle).
  3. Select the file and choose to insert it as a link.
  4. Set sharing permissions so the recipient can actually open it.

Because the file travels as a link rather than an attachment, Gmail's attachment scanner does not strip it. This also neatly sidesteps the 25 MB attachment size limit, since Drive links have no such cap. Note that Google still scans files in Drive for malware, so a genuinely infected file may be flagged there too, which is a feature, not a bug. For sensitive files, share with specific people rather than "Anyone with the link," so a forwarded email does not expose the file to strangers.

Option 2: Rename the Extension (limited, and risky to rely on)

A widely shared trick is to rename program.exe to program.txt (or remove the extension), send it, and have the recipient rename it back. This can slip a blocked file type past the extension check.

But treat this as unreliable. Gmail inspects file contents, not just the extension, so it may still recognize and block the underlying type, and you have now added friction and confusion for the recipient. More importantly, if the file was blocked because it is malware, renaming it does not make it safe, it just disables the protection that flagged it. Only consider this for a file you are certain is legitimate, and prefer the Drive method instead.

Option 3: Zip the File (works for some cases, not all)

Compressing a file into a .zip archive sometimes helps, but with a crucial caveat already mentioned: Gmail scans inside archives. If the archive contains a blocked type like .exe or .jar, Gmail blocks the whole archive. Zipping a perfectly ordinary .pdf or .docx to keep a folder tidy is fine; zipping an installer to sneak it past the filter is not, it will be caught.

Option 4: Password-Protect the Archive (understand the trade-off)

You can create a password-protected (encrypted) .zip and send the password separately. Gmail cannot scan the contents of an encrypted archive, so this can get a blocked type through. But be clear about what that means: you are bypassing Gmail's virus scanning entirely. Gmail may still show an "encrypted attachment" anti-virus warning and refuse it precisely because it could not scan inside. Use this only for files you trust completely, between people who trust each other, and never as a way to move files you are unsure about.

Option 5: Use a File Transfer Service

For one-off transfers of blocked types or large files, services like WeTransfer, Dropbox Transfer, or a shared OneDrive link move the file outside email entirely. The recipient gets a download link. This is clean for occasional sends and avoids Gmail's filters without weakening anyone's security.

When the Block Comes From a Workspace Admin

If you are on a work or school account, the block may not be Gmail's standard list at all. Google Workspace administrators can set attachment compliance rules that block additional file types, quarantine messages, or stop attachments from specific senders, policies stricter than personal Gmail.

If your file is a normal type (a PDF, a spreadsheet) and it is still blocked or quarantined, that is the likely cause. There is no user-side workaround for an admin policy, and trying to evade it usually violates company rules. Contact your IT administrator, who can release a quarantined message or whitelist a sender.

Receiving Blocked Attachments: What You Can Do

When a file you actually need was stripped from an email you received, you cannot recover it from Gmail itself. Your options are:

  • Ask the sender to share it via Google Drive (or OneDrive/Dropbox) link instead.
  • Ask them to use a file transfer service like WeTransfer.
  • If it is a legitimate program, have them point you to the official download source rather than emailing the binary.

If you regularly receive a high volume of legitimate attachments and want them out of your inbox and safely archived, a dedicated tool helps. Dioveo connects to your Gmail account and lets you bulk download every attachment across your inbox, search across years of email, and back up files to Dropbox or OneDrive or Google Drive automatically. It works with the attachments Gmail did accept, so the files you depend on stay organized rather than buried in old threads. The free tier covers three downloads a day, with Pro for heavier use.

A Quick Decision Guide

To get a blocked file through, match the reason to the fix:

  • Blocked file type (.exe, .bat, .js, .jar, etc.) → share via Google Drive link or a file transfer service.
  • File over 25 MB → use a Drive link; the cap does not apply to links.
  • Anti-virus warning / "attachment was removed" → do not force it through; verify the file is safe and get it from a trusted source.
  • Workspace admin block → contact IT; do not try to evade the policy.

The throughline: Google Drive links are the safest, most reliable way around Gmail's attachment blocks, and the scanning that causes the block is genuinely protecting you and your recipients.

Frequently Asked Questions

Why does Gmail say "This attachment was removed"?

Gmail removed the file because it matched a blocked file type (like .exe, .bat, .js, or .jar) or because its virus scanner detected malware. The email itself still arrives; only the attachment is stripped and replaced with a notice. Gmail does not keep a recoverable copy, so to get the file you will need the sender to deliver it another way, most reliably through a Google Drive link.

Can I send an .exe or .bat file through Gmail?

Not as a direct attachment, since both are on Gmail's blocked list and will be stripped even if you zip them, because Gmail scans inside archives. The safe approach is to upload the file to Google Drive and share a link, or use a file transfer service. A password-protected archive can bypass the scan, but it also bypasses Gmail's malware protection, so only do that for files you fully trust.

Does zipping a file stop Gmail from blocking it?

Usually not. Gmail looks inside .zip, .rar, and other archives, so if a blocked file type is inside, the whole archive gets blocked. Zipping helps only when the contents are all allowed types. To reliably move a blocked type, share it through a Google Drive link or a file transfer service instead of trying to disguise it in an archive.

How do I fix a blocked attachment on a work or school account?

If you are on Google Workspace, the block may come from an administrator's attachment policy rather than Gmail's standard rules, and there is no user-side workaround. Contact your IT administrator, who can release a quarantined message or whitelist the sender or file type. For routine large or unusual files, sharing a Google Drive link is the approach most organizations prefer.

Keep the attachments that matter organized and out of your inbox instead of fighting Gmail's filters one file at a time. Manage and back up your Gmail attachments with Dioveo and never lose track of an important file again.