Why a 19 MB PDF will not go through a 25 MB email limit (we measured the overhead)

2026-10-06
8 min read

You attach a PDF that your computer says is 19 MB to an email whose provider allows 25 MB, and the message bounces or the provider refuses to send it. Nothing is wrong with your arithmetic. The limit is applied to the message as it travels, and an attachment gets noticeably bigger on the way. This guide measures how much bigger, explains why, and then goes through the ways of getting under the limit in the order that costs the least quality.

Why the file grows in transit

Email was designed to carry plain text. Its transport format only safely handles a restricted set of characters, so anything binary, such as a PDF, has to be converted into text before it is sent. The usual method is Base64, which takes every three bytes of the file and writes them as four printable characters. That alone makes the data a third larger. The message format then breaks the encoded text into lines of 76 characters, each ending in a line break, which adds a little more. Add the headers and the body of the email and the total is what the provider compares with its limit.

We did not want to rely on the textbook figure, so we measured it. We built real email messages with Python's standard email library, each carrying one PDF-typed attachment of incompressible data (which is what a JPEG-heavy PDF looks like to an encoder), and compared the size of the finished message with the size of the file. The sizes we used are the outputs of the three routes from our guide on why upload portals reject PDFs:

  • Three phone photos converted straight to PDF: 9,040,298 bytes as a file, 12,371,469 bytes as a message. That is 1.368 times the file.
  • The same pages through the scanner with crop and black-and-white: 2,088,005 bytes as a file, 2,857,805 as a message. Ratio 1.369.
  • The scanned file after moderate compression: 208,671 bytes as a file, 286,083 as a message. Ratio 1.371.

The overhead is the same whatever the content: roughly 37 percent. Turning that around gives the number that matters in practice. For a limit of 25 MB (25,000,000 bytes), the largest PDF whose message still fits is about 18.3 MB. If the limit is read as 25 MiB, the number most operating systems display, it is about 19.2 MB (18.3 MiB). Either way, a file that your computer reports as 19 to 20 MB is on the wrong side of the line, and a file reported as 17 MB leaves very little room for the rest of the message.

Three details that make it worse

  • The limit usually covers the whole message, so several attachments add up, and a long email body or large inline images count too.
  • Megabytes and mebibytes differ by about five percent, and tools disagree on which one they show. When you are close to a limit, assume the stricter reading.
  • Providers differ on whether their stated limit applies before or after encoding, and they change it from time to time. At the time of writing Gmail and Outlook.com both state 25 MB, while organisations on Microsoft 365 can have a different limit set by their administrator, so a file that reaches a colleague at another company can be refused by their server even when yours accepted it. Check the current figure with your provider and, to be safe, treat the encoded size as the one that counts.

Getting under the limit, from least to most costly

The right fix depends on what makes the PDF large, so start by finding out. Open it and look: if the pages are crisp at any zoom level and mostly text, you have a typed document; if they look like photographs of paper, you have images, and the images are almost certainly where the size is.

1. Lossless optimisation, for typed documents

A PDF that has been edited and re-saved many times carries leftover objects, duplicated fonts and a padded index. Removing them changes nothing the reader can see. In our own compression benchmark a 40-page text report went from 83,343 to 73,573 bytes this way, a 12 percent saving with every character still selectable. That is modest, but for a document that is just over the limit it can be enough, and it is the only method that cannot make the file worse.

2. Clean up the images before compressing them, for scans and photos

When the size is in the pixels, lossless optimisation does almost nothing: in the same measurement a photo-based PDF shrank by 0.03 percent. The better approach is to remove what the reader never needed. Cropping the desk out of a photo, straightening the page and converting a grey, unevenly lit picture into clean black text on white took our three-page test from 9.04 MB to 2.09 MB, a 77 percent reduction, and the text came out sharper than in the original photograph. Do this first, then check the size again.

3. Moderate recompression, if it is still too big

Recompressing the pages as images at a lower resolution is the blunt instrument. Applied to the scanned version it brought the file to 208,671 bytes, which leaves room for a hundred copies under any limit, and the text was still legible at normal zoom. Applied to the original photographs at the most aggressive setting it produced a 27 KB file whose body text could not be read. The lesson is the same as before: use the lightest setting that gets you under the limit, and then open the result and read the smallest print in it at full size before you send it.

4. Send it in parts

If the document is large because it is long and every page matters, you can extract page ranges into separate files and send them in separate emails. Splitting does not make the total smaller; it only makes each message fit. It is a reasonable choice for a long contract where quality cannot be traded for size, as long as the recipient knows to expect several parts and in which order. A subject line such as "Contract, part 1 of 3" saves a round of confusion.

5. Share a link instead of an attachment

Most providers will turn an oversized attachment into a link to a file stored in their cloud storage. That removes the size problem entirely, at the price of putting the document on a server that is neither yours nor the recipient's. For a menu or a brochure that is irrelevant. For an identity document, a medical report or a signed contract, think about it first: a sharing link is often accessible to anyone who has it, and it can outlive the conversation by years. Reducing the file on your own device and sending it as an attachment keeps the document inside the two mailboxes that are meant to hold it.

What does not help

  • Putting the PDF in a ZIP file. PDFs already compress their contents, and images inside them are already compressed, so a ZIP of a PDF is usually within a few percent of the original. Some organisations' mail filters also block ZIP attachments outright.
  • Adding a password. Encryption does not shrink anything, and a protected file can be refused by systems that need to read it.
  • Renaming the extension. The content is what is measured.
  • Printing to PDF again. It can make the file smaller or larger depending on how the document was built, and it can drop searchable text and links.

A short routine

  1. Look at the size on disk. If it is above about 70 percent of the limit, plan to reduce it.
  2. Decide whether it is mostly text or mostly images, by opening it.
  3. Text: try lossless optimisation. Images: crop, straighten and clean them first.
  4. Still over? Use moderate recompression, never the most aggressive setting for text.
  5. Open the final file and read its smallest text at full size.
  6. If quality cannot be traded, split it into numbered parts.
  7. Keep sensitive documents out of sharing links when an attachment will do.

Shrink a PDF on your own device. The file is never uploaded.

Compress a PDF