Skip to content
Groundmail

Guides

Email attachment size limits: Gmail, Outlook, Yahoo, iCloud and more

Attachment size limits for Gmail, Outlook, Microsoft 365, Yahoo, iCloud and Zoho from each provider's docs, why Base64 adds a third, and what to do instead.

By GroundmailUpdated All guides →

Short answer

Gmail lets you send 25 MB of attachments, Outlook.com and Yahoo Mail 25 MB, iCloud Mail 20 MB, and Microsoft 365 35 MB per message by default. Receiving limits differ: Google Workspace accepts messages up to 50 MB, Microsoft 365 36 MB by default, and Yahoo and iCloud the same as their sending limit. The smallest limit on the way wins, so an email has to fit both the sender's and every recipient's.

Attachments are Base64-encoded inside the email, which makes them about 33% bigger, or about 37% once line breaks are counted. A 20 MB file is roughly 27 MB on the wire, which is over several of these limits. For email that has to reach anyone, keep the whole message under 10 MB (about 7 MB of files) and send anything bigger as a link to a download.

Attachment size limits by provider

ProviderSendingReceivingBigger files
Gmail (personal)25 MB of attachmentsNot published for personal accountsGmail swaps attachments over the limit for a Google Drive link
Google Workspace25 MB before encoding (Business, Education, Enterprise Standard); up to 50 MB on Enterprise Plus in Gmail on the web50 MB per message after encoding (70 MB on Enterprise Plus); up to 500 attachmentsGoogle Drive link
Outlook.com25 MB of attachmentsNot publishedOneDrive files up to 2 GB, shared as a link
Microsoft 365 (Exchange Online)35 MB per message by default; admins can set 1 to 150 MB36 MB per message by default; admins can set 1 to 150 MBOneDrive attachments up to 2 GB
Yahoo Mail25 MB of attachments in total25 MB of attachments in totalNot stated
iCloud Mail20 MB per message20 MB per messageMail Drop, up to 5 GB; links expire after 30 days
Zoho Mail20 MB per email for personal accounts; set by plan for organizations40 MB per messageHuge Attachments links on paid plans: 250 MB to 1 GB by plan
Exchange Server (a company's own)10 MB per message by default10 MB per message by defaultSet by the company's admin

From each provider's own help pages, linked under Sources. Work and school accounts can have lower limits set by their admin.

Last checked on each vendor's public page.

Gmail. Google's help page gives personal accounts a 25 MB attachment limit; if the attachments add up to more, Gmail removes them and adds a Google Drive link instead. For Google Workspace, the sending limit is 25 MB on Business, Education and Enterprise Standard, measured before encoding, with up to 50 MB on Enterprise Plus in Gmail on the web. The receiving limit is 50 MB per message (70 MB on Enterprise Plus), measured after encoding, and Google says it can't be raised. Gmail also blocks executable files such as .exe, even zipped.

Outlook.com and Microsoft 365. Microsoft's Outlook.com page gives a 25 MB attachment limit and up to 2 GB for files shared from OneDrive. Business mailboxes on Exchange Online default to 35 MB for sending and 36 MB for receiving, and an admin can set anything from 1 MB to 150 MB. Microsoft notes that mail leaving its datacenters grows by about 33% when it's encoded, so the 150 MB ceiling becomes 112 MB for mail to other providers.

Yahoo, iCloud and Zoho. Yahoo Mail caps the attachments in one message at 25 MB in total, incoming and outgoing. iCloud Mail takes messages up to 20 MB each way, or up to 5 GB with Mail Drop, which sends the files as links that expire after 30 days. Zoho Mail allows 20 MB per email on personal accounts and sets organization limits by plan, and it accepts incoming messages up to 40 MB.

Outlook the app is not Outlook.com

People searching for the "Outlook attachment size limit" usually hit the desktop app's own cap. Microsoft's support page says the Outlook app limits internet accounts such as Outlook.com or Gmail to 20 MB per email, and Exchange (work) accounts to 10 MB by default, counting the message and its attachments together. That's a limit in the app, separate from what the mail service accepts.

The 10 MB figure matches the default on Exchange Server, the mail server many companies still run themselves: 10 MB per message received and sent until an admin changes it. It's one reason a large email can reach a Gmail address and bounce at a company domain.

Why attachments get about a third bigger

Email was designed to carry text, so attachments travel as text too. Most clients and libraries encode them with Base64, which turns every 3 bytes of the file into 4 characters. RFC 2045, which defines it for email, says the encoded data is "about 33 percent larger" than the original. Encoded lines are also limited to 76 characters, each followed by a line break, which adds about 2.6% more. Together that's roughly 37%, the figure Google quotes for its receiving limit.

So whether a limit is measured before or after encoding matters. Google's 25 MB Workspace sending limit counts the files before encoding, while its 50 MB receiving limit counts the encoded message. Microsoft counts the encoded size too, which is why Outlook on the web only lets you send about 25% less than a mailbox's limit. HTTP email APIs carry attachments as Base64 inside the JSON body too, so a request with 10 MB of files is about 13.3 MB.

File sizeEncoded in the email (about)Fits under
5 MB6.8 MBEvery limit in the table
7 MB9.6 MBEvery limit, including a 10 MB Exchange Server default
10 MB13.7 MBNot a 10 MB company server
15 MB20.5 MBNot iCloud or a 20 MB Zoho personal account
20 MB27.4 MBNot iCloud, Zoho personal or a 25 MB encoded limit
25 MB34.2 MBOnly just under Microsoft 365's 35 MB default, before the body and headers

Encoded size with Base64 and 76-character lines. Add the HTML, text and headers on top.

Estimate the encoded size of a file (JavaScript)
// Base64 turns 3 bytes into 4 characters; MIME adds CRLF after every 76.
function encodedSize(bytes) {
  const chars = Math.ceil(bytes / 3) * 4
  return chars + Math.ceil(chars / 76) * 2
}

encodedSize(10 * 1024 * 1024) // 14348938 bytes: a 10 MB file is about 13.7 MB encoded

To go the other way, divide an encoded limit by 1.37: a 10 MB limit fits about 7.3 MB of files, and Microsoft 365's 35 MB default about 25 MB. Zipping rarely helps with PDFs, images and video, which are already compressed.

What happens when an email is too big

An oversized email can fail in two places. Your own provider or mail library can refuse it when you send, which you see straight away as an API error or SMTP reply. Or your provider accepts it and the recipient's server refuses it, which comes back later as a bounce.

Servers that support the SMTP SIZE extension (RFC 1870) advertise their limit in the EHLO reply. A sender can declare the message size in MAIL FROM, and the receiving server can refuse before the message is transferred:

SMTP session (illustrative)
S: 250-mx.example.net
S: 250-SIZE 36700160
S: 250 STARTTLS
C: MAIL FROM:<bounces@rp.example.com> SIZE=52428800
S: 552 5.3.4 Message size exceeds fixed maximum message size
ReplyMeaningRetry?
552 5.3.4Message too big for the system (RFC 3463). Gmail: "Your message exceeded Google's message size limits." Gmail also uses it for more than 500 attachments.No. Send a smaller message
552 5.2.3Message length exceeds an administrative limit, usually one mailbox's own capNo. Send a smaller message
452 4.3.1Insufficient system storage on the receiving server: temporaryYes. Your server retries on its own
552 5.2.2Mailbox full: about the recipient's storage, not your message sizeLater; see the SMTP error reference

Codes from RFC 3463, RFC 1870 and Google's SMTP error reference.

A size bounce says nothing about the address: the mailbox exists and will take a smaller message. Don't retry the same email, which fails the same way. Send it again with the file as a link, and if your provider put the address on a suppression list because of the bounce, remove it first. For every other code, see the SMTP error reference and 550 permanent failure.

Groundmail's attachment limits

LimitAPISMTP relay
Attachments per email1010
Size per attachment10 MB after Base64 decoding10 MB after decoding
Whole email20 MB request, Base64 included (about 14 MB of files)20 MB message
Blocked file types.exe, .bat, .cmd, .com, .scr, .js, .vbs, .dllSame
Batch and scheduled sendsNo attachmentsNo attachments with X-Groundmail-Scheduled-At
Over a limit400 validation_error, or 413 over 20 MB; nothing is sentPermanent 554 reply with the reason, or 552 5.3.4 over 20 MB; nothing is sent

From the emails API docs and the SMTP relay docs.

The SMTP relay sends through the same checks as the API, so a message from Nodemailer, PHPMailer or a framework mailer gets the same limits. Resending a stored email (POST /emails/{id}/resend) leaves the attachments out, because attachment bytes aren't stored.

Our limits are 10 MB per attachment and 20 MB per email, but the recipient's limit is what counts. A 10 MB PDF is about 13.7 MB once encoded, which a company mail server on a 10 MB default will refuse. For email that must reach anyone, such as invoices or exports sent to customers' work addresses, keep the whole email under 10 MB once encoded and link to anything larger.

Send a PDF with the API
curl -X POST https://api.groundmail.dev/emails \
  -H "Authorization: Bearer $GROUNDMAIL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "Acme Billing <billing@mail.acme.com>",
    "to": "jane@example.com",
    "subject": "Your invoice for October",
    "html": "<p>Your invoice is attached.</p>",
    "attachments": [
      {
        "name": "invoice-1042.pdf",
        "content_type": "application/pdf",
        "data": "JVBERi0xLjcK..."
      }
    ]
  }'

Common mistakes

MistakeWhat happensFix
Checking the file size, not the encoded sizeA 20 MB file goes out as about 27 MB and bounces at a 25 MB limitCompare the encoded size, or the file size × 1.37, against the limit
Testing only with GmailIt works in testing, then bounces at customers' company mail serversPlan for 10 MB per message when you can't choose the recipients
Retrying a size bounceThe same message fails againSend a new message with the file as a link
Suppressing the address after a size bounceA real customer stops getting your emailTreat size bounces as a message problem; remove any suppression
Attaching exports that grow over timeWorks for small accounts, fails for your biggest customersLink to exports from the start
Inline images as huge attachmentsEvery image counts toward the message sizeResize images and host large ones on your site
Executable or script attachmentsGmail blocks the message, even when the file is zippedLink to a download page instead

Frequently asked questions

What is the Gmail attachment size limit?

25 MB of attachments for personal Gmail accounts. Over that, Gmail turns the attachments into a Google Drive link. Google Workspace allows 25 MB on most editions and up to 50 MB on Enterprise Plus in Gmail on the web, measured before encoding, and receives messages up to 50 MB after encoding. Sources: Gmail Help and Workspace sending limits.

What is the Outlook attachment size limit?

Outlook.com allows 25 MB of attachments, or up to 2 GB for files shared from OneDrive. Microsoft 365 work mailboxes default to 35 MB per message sent and 36 MB received, which admins can raise to 150 MB. The Outlook desktop app has its own default of 20 MB for internet accounts and 10 MB for Exchange accounts. Sources: Outlook.com, Exchange Online limits, Outlook app.

What is the maximum email attachment size?

There's no single limit: each provider sets its own, and the smallest one between sender and recipient wins. The big consumer providers allow 20 to 25 MB of attachments, Microsoft 365 35 MB per message by default, and company mail servers often 10 MB. For email that has to reach anyone, keep the whole message under 10 MB.

Why is my 20 MB attachment rejected when the limit is 25 MB?

Attachments are Base64-encoded, which makes them about 33% bigger, or about 37% with line breaks. A 20 MB file is about 27 MB in the email, over a 25 MB limit that counts the encoded message. Some limits, like Google Workspace's sending limit, count the file before encoding, so the same file can pass one check and fail another.

Does the email body count toward the attachment limit?

Usually, yes. Most limits are per message, so the HTML, the text version, inline images and the headers all count alongside the attachments. Yahoo and Gmail describe their sending limits in terms of attachments; the receiving limits at Google and Microsoft are for the whole encoded message.

What does 552 5.3.4 mean?

The receiving server refused the message because it's too big. RFC 3463 defines 5.3.4 as "message too big for system", and Gmail uses it when a message is over its size limit or has more than 500 attachments. Don't retry the same message: send it again with the file as a link.

What are Groundmail's attachment limits?

Up to 10 attachments per email, each up to 10 MB after Base64 decoding, and up to 20 MB for the whole email with the Base64 included, over the API and the SMTP relay. Executable and script files are refused, and batch and scheduled sends don't take attachments. See the emails API docs.

Sources

Facts on this page about other companies' products, prices and policies come from these public pages. They change, so check them before you decide.

Email for apps. Set up by your agent.

Sign-in codes, receipts and alerts kept separate from marketing mail, with inbound, templates and automations included. Start free with 3,000 emails a month, and move to a dedicated IP or server without changing your code.