Compress PDF
Shrink a PDF, especially a scan or a document full of photos, so it fits an email or an upload form's size limit.
With this method every page becomes a picture: the text can no longer be selected, searched or copied, and links can't be clicked.
Your PDF file is processed on this device and never uploaded to a server.
How to use it
- Choose a PDF file.
- Choose a method. Keep text compresses the photos inside the PDF and leaves the text alone. Pages as images goes further, but the text can no longer be selected.
- Choose Light, Medium or Strong. If you have a size limit such as 500 KB or 2 MB, choose Target size.
- Press Compress PDF. The size before and after is shown; download the result.
Why some PDFs barely shrink
Text and vector graphics in a PDF are stored as compressed drawing instructions, and each font is stored only once. That is why a PDF made with "Save as PDF" in Word is usually small already and only shrinks a little. The big savings are in scans and documents with photos: one letter-size page scanned in color at 300 DPI holds 8.4 million pixels, and a 12-megapixel phone photo is often placed only a few inches wide.
Keep text
The tool reads the PDF's structure with pdf-lib and checks every image: its format, its color space and how large it is drawn on the page (from the cm and Do operators in the page content). JPEG photos are saved again at a lower quality, and those sharper than the target DPI are scaled down. 8-bit RGB or gray images stored losslessly that look like photos are converted to JPEG. CMYK, indexed-color, masked, JBIG2 and JPEG 2000 images are left exactly as they are, and so are text, fonts, links and form fields. The file is then saved with object streams, which pack small objects together and compress them as one.
Example: a 4000 × 3000 pixel phone photo placed 6 inches wide has 4000 ÷ 6 = 667 DPI. At Medium (150 DPI) it only needs 900 × 675 pixels, about one twentieth of the original pixel count, and is saved as a JPEG at 70% quality.
| Level | Keep text | Pages as images |
|---|---|---|
| Light | JPEG 80%, 200 DPI | 150 DPI, JPEG 80% |
| Medium | JPEG 70%, 150 DPI | 120 DPI, JPEG 68% |
| Strong | JPEG 50%, 96 DPI | 96 DPI, JPEG 58% |
Pages as images
Each page is drawn with pdf.js at the DPI above, saved as a JPEG, and the JPEGs are put together into a new PDF. This can be much smaller for PDFs that are heavy because of complex vector drawings or many embedded fonts, but the text can no longer be selected, searched or copied, and links stop working.
Target size and upload limits
With Target size the lightest level is tried first, then the tool searches for the lightest level that comes in under the target. "500 KB" is counted as 500,000 bytes, so the file passes whether a site counts 1 KB as 1,000 or 1,024 bytes. Every result is opened again with pdf.js to check that the page count matches and the first page draws; if the result is not smaller, you get the original back.
- Gmail: attachments up to 25 MB per email. Outlook.com: 25 MB, while the Outlook desktop apps cap Outlook.com and Gmail accounts at 20 MB per message.
- LinkedIn recommends resumes under 2 MB.
- WhatsApp: documents up to 2 GB, so there compressing mostly saves the recipient's data.