You attach a 15 MB proposal to a Salesforce email, hit send, and it bounces. The file is comfortably under the 25 MB limit you read about, so what happened? This is the most common and most confusing file size failure in Salesforce, and the answer is that Salesforce does not measure file size the way you do. By the time your 15 MB file is prepared for delivery, it is not 15 MB anymore.
That is the trap at the center of this topic. There is no single file size limit in Salesforce. There is a different cap depending on where the file goes and how it gets there, and the email path has hidden math that makes the printed limit a lie. This guide lays out every major limit by location, explains the encoding math that breaks email sends, and covers the fixes that actually hold up. Limits differ between Classic and Lightning and shift over time, so verify the specific numbers against current Salesforce documentation before relying on them.
There is no single limit, so location is everything
The first thing to understand is that "the Salesforce file size limit" is not one number. The cap that applies to you depends entirely on the upload path. Here is the picture by location.
For files uploaded through the user interface or the API, the ceiling is 2 GB. This is the modern Files path and it is generous enough for almost any document.
The Documents tab is far more restrictive at 5 MB per file, a legacy constraint that catches people storing templates or images there.
Classic attachments default to 25 MB. Salesforce Support can raise that to 65 MB on request, but with a catch worth knowing: attachments larger than 36 MB can only be added through the user interface, not the API, and the API limits are not affected by the increase. So raising the Classic limit helps your users in the browser but does nothing for an integration pushing files in programmatically.
For developers, there is a separate and lower ceiling that has nothing to do with the upload caps. Apex heap size is limited to 6 MB for synchronous operations and 12 MB for asynchronous ones. If your code reads a file into memory as a blob, that is the real constraint, and it is much smaller than the UI limits suggest. Document-generation and file-processing logic regularly trips over this rather than the upload cap.
Sources disagree on the exact ceiling for the Files feature itself, with some citing 2 GB and others higher, so if you are planning around large-file storage specifically, confirm the current Files cap in your own org rather than trusting a number from a blog, this one included.
The email cap is where everyone actually gets burned
Uploading files to records rarely fails. Emailing them does, and constantly, because email has the lowest effective ceiling and the most hidden overhead.
The outbound email limit is 25 MB total in both Classic and Lightning. The word that matters is total. That 25 MB is not the budget for your attachments. It is the budget for the entire message: the HTML body, the plain-text version, the headers, every inline image, your signature, and all attachments combined. You do not get 25 MB of attachments plus a message. The message is inside the 25 MB.
And it cannot be increased. Unlike the Classic attachment limit, there is no Support request or paid upgrade that raises the 25 MB outbound email cap.
The encoding math nobody tells you about
Here is the part that explains the bounced 15 MB file.
Before Salesforce sends an email, it converts every attachment from binary into a text format called Base64. This is just how email works under the hood, but it has a cost: Base64 encoding inflates the data by roughly 33 percent, because it turns every 3 bytes into 4 characters. Your file does not change on disk, but the version that travels inside the email is about a third larger.
So the real arithmetic is your file size times 1.33. A 10 MB PDF becomes about 13.3 MB in the message. A 15 MB file becomes about 20 MB. An 18 MB file becomes roughly 24 MB, leaving almost nothing for the body and signature.
Now layer in everything else. A templated email with a logo and a couple of social icons can eat 1 to 3 MB on its own, and inline images get Base64-encoded too, so they cost more than their file size. Put it together and the safe practical ceiling for a single attachment in a real templated email is not 25 MB. It is closer to 13 to 14 MB. That is why your 15 MB file failed. After encoding and message overhead, it crossed the line.
Two related traps follow from the same math. The combined-payload trap: three 4 MB files each look fine individually, but together with encoding and the body they can blow past 25 MB, so total payload is what matters, not per-file size. And the silent-failure problem: when a message exceeds the cap, it often just fails without a clear error, leaving you guessing.
One more thing developers and admins miss: sending through Flow does not save you. Flow email actions obey the same 25 MB total payload limit and the same encoding overhead. Automating the send does not bypass the math.
For completeness on the inbound side, Email-to-Case rejects incoming messages that exceed its total limit, around 35 MB, and simply does not create a case when that happens, so a customer's large attachment can vanish without a ticket.
How to actually fix it
The fixes are straightforward once you accept that attaching large files to Salesforce email is the wrong pattern.
Check the real size before sending. Sum your attachments, multiply by 1.33 for encoding, and add a megabyte or two for the body and signature. If that total approaches 25 MB, do not send it as is. To confirm precisely, send a test to yourself in a sandbox and read the email log, which reports the actual final message size including headers and body.
Link instead of attach. This is the single most reliable fix. Upload the file to Salesforce Files or an external host and put a link in the email instead of the file itself. The email stays tiny, nothing gets encoded, and the recipient still gets the document. This is the only approach that works for video, which compresses poorly and blows past 25 MB after encoding even for short clips.
There is a deliverability bonus hiding in the link-instead-of-attach habit. Smaller, lighter emails without heavy attachments are less likely to trip spam filters and more likely to land in the inbox, so the fix for your size problem quietly helps your placement too.
Where this connects to sending at scale
The encoding ceiling is annoying for a one-off email. It becomes a structural problem when you are sending at volume, because every message in a campaign carries the same overhead, and the native sending tools were not built to manage large attachments across big sends gracefully. If you are running into the salesforce file size limit repeatedly as part of real email operations rather than the occasional manual send, the durable answer is usually a sending approach that defaults to hosted links over raw attachments and handles volume natively.
The advantage of keeping that sending native to Salesforce, rather than exporting recipients to an external platform, is that your files, your records, and your send data all stay in one place. You link to documents already living in Salesforce Files, the engagement data writes back to standard objects, and you avoid maintaining a second copy of anything. You solve the size problem without trading away the single source of truth.
Conclusion
There is no single Salesforce file size limit. UI and API uploads cap at 2 GB, the Documents tab at 5 MB, Classic attachments at 25 MB (raisable to 65 MB via Support, but API stays capped and 36 MB-plus is UI-only), and Apex heap at 6 MB synchronous or 12 MB asynchronous. The one that burns everyone is email: a 25 MB total cap that covers the entire message and cannot be raised, made worse by Base64 encoding that inflates attachments by about 33 percent, which drops the safe single-attachment ceiling to roughly 13 to 14 MB. Flow does not escape it, failures are often silent, and Email-to-Case rejects oversized inbound mail around 35 MB. Calculate true size with the 1.33x multiplier, test in a sandbox, and above all link instead of attaching. Verify the current numbers against Salesforce documentation, because they vary by experience and upload path.
Top comments (0)