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
| Provider | Sending | Receiving | Bigger files |
|---|---|---|---|
| Gmail (personal) | 25 MB of attachments | Not published for personal accounts | Gmail swaps attachments over the limit for a Google Drive link |
| Google Workspace | 25 MB before encoding (Business, Education, Enterprise Standard); up to 50 MB on Enterprise Plus in Gmail on the web | 50 MB per message after encoding (70 MB on Enterprise Plus); up to 500 attachments | Google Drive link |
| Outlook.com | 25 MB of attachments | Not published | OneDrive 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 MB | 36 MB per message by default; admins can set 1 to 150 MB | OneDrive attachments up to 2 GB |
| Yahoo Mail | 25 MB of attachments in total | 25 MB of attachments in total | Not stated |
| iCloud Mail | 20 MB per message | 20 MB per message | Mail Drop, up to 5 GB; links expire after 30 days |
| Zoho Mail | 20 MB per email for personal accounts; set by plan for organizations | 40 MB per message | Huge Attachments links on paid plans: 250 MB to 1 GB by plan |
| Exchange Server (a company's own) | 10 MB per message by default | 10 MB per message by default | Set 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 size | Encoded in the email (about) | Fits under |
|---|---|---|
| 5 MB | 6.8 MB | Every limit in the table |
| 7 MB | 9.6 MB | Every limit, including a 10 MB Exchange Server default |
| 10 MB | 13.7 MB | Not a 10 MB company server |
| 15 MB | 20.5 MB | Not iCloud or a 20 MB Zoho personal account |
| 20 MB | 27.4 MB | Not iCloud, Zoho personal or a 25 MB encoded limit |
| 25 MB | 34.2 MB | Only 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.
// 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 encodedTo 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:
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| Reply | Meaning | Retry? |
|---|---|---|
552 5.3.4 | Message 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.3 | Message length exceeds an administrative limit, usually one mailbox's own cap | No. Send a smaller message |
452 4.3.1 | Insufficient system storage on the receiving server: temporary | Yes. Your server retries on its own |
552 5.2.2 | Mailbox full: about the recipient's storage, not your message size | Later; 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
| Limit | API | SMTP relay |
|---|---|---|
| Attachments per email | 10 | 10 |
| Size per attachment | 10 MB after Base64 decoding | 10 MB after decoding |
| Whole email | 20 MB request, Base64 included (about 14 MB of files) | 20 MB message |
| Blocked file types | .exe, .bat, .cmd, .com, .scr, .js, .vbs, .dll | Same |
| Batch and scheduled sends | No attachments | No attachments with X-Groundmail-Scheduled-At |
| Over a limit | 400 validation_error, or 413 over 20 MB; nothing is sent | Permanent 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.
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..."
}
]
}'Send large files as links instead
Mailbox providers already work this way: Gmail turns oversized attachments into Drive links, Outlook.com offers OneDrive links and Apple Mail offers Mail Drop. An app can do the same, and a link has advantages beyond size: you can revoke it, see whether it was downloaded, and keep a sensitive file behind a sign-in.
- 01Store the file where your app can serve itObject storage such as Amazon S3, Google Cloud Storage or Cloudflare R2, or your own app's file storage.
- 02Link to a short-lived URL or a page behind sign-inA signed URL that expires suits exports and reports. For invoices, contracts and anything personal, link to a page in your app that checks the reader is signed in, so a forwarded email doesn't hand the file to someone else.
- 03Link from your own domainUse a link on your domain, such as
files.example.com, rather than a link shortener or a raw bucket hostname. Content filters treat shorteners as a spam signal, and the email deliverability test flags them. - 04Say what the file isName the file, its size and when the link expires in the email, for example "October export (CSV, 48 MB), available for 7 days". People are rightly wary of a bare "Download" button.
- 05Attach small files that people keepReceipts and short PDFs under a megabyte or two are fine as attachments, and people expect them there. Use links for exports, recordings and anything that grows with the customer's data.
Common mistakes
| Mistake | What happens | Fix |
|---|---|---|
| Checking the file size, not the encoded size | A 20 MB file goes out as about 27 MB and bounces at a 25 MB limit | Compare the encoded size, or the file size × 1.37, against the limit |
| Testing only with Gmail | It works in testing, then bounces at customers' company mail servers | Plan for 10 MB per message when you can't choose the recipients |
| Retrying a size bounce | The same message fails again | Send a new message with the file as a link |
| Suppressing the address after a size bounce | A real customer stops getting your email | Treat size bounces as a message problem; remove any suppression |
| Attaching exports that grow over time | Works for small accounts, fails for your biggest customers | Link to exports from the start |
| Inline images as huge attachments | Every image counts toward the message size | Resize images and host large ones on your site |
| Executable or script attachments | Gmail blocks the message, even when the file is zipped | Link 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.
- Gmail Help: Send attachments with your Gmail message
- Gmail Help: File types blocked in Gmail
- Google Workspace: Gmail sending limits
- Google Workspace: Gmail receiving limits
- Google Workspace: SMTP error reference
- Microsoft Support: Sending limits in Outlook.com
- Microsoft Support: Reduce attachment size to send large files with Outlook
- Microsoft Learn: Exchange Online limits
- Microsoft Learn: Message size limits in Exchange Server
- Yahoo Help: Message size limits in Yahoo Mail
- Apple Support: Mailbox size and message sending limits in iCloud
- Apple Support: Mail Drop limits
- Zoho Mail: Email attachments and attachment limits
- Zoho Mail: Rates, limits and policies
- RFC 2045: MIME, Base64 Content-Transfer-Encoding
- RFC 1870: SMTP Service Extension for Message Size Declaration
- RFC 3463: Enhanced Mail System Status Codes