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.

Your PDF file is processed on this device and never uploaded to a server.

How to use it

  1. Choose a PDF file.
  2. 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.
  3. Choose Light, Medium or Strong. If you have a size limit such as 500 KB or 2 MB, choose Target size.
  4. 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.

LevelKeep textPages as images
LightJPEG 80%, 200 DPI150 DPI, JPEG 80%
MediumJPEG 70%, 150 DPI120 DPI, JPEG 68%
StrongJPEG 50%, 96 DPI96 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.

Questions

Is my PDF uploaded?
No. The PDF is read and compressed by the browser on your device and no file is sent to a server, so it is safe for IDs, contracts or bank statements.
Why did my PDF only shrink a little?
A PDF that is mostly text is compact from the start; what can be made smaller is mainly photos and scans. CMYK and JBIG2 images are also left alone so their colors don't change. If it is still too big, try Pages as images.
Can the text still be selected and searched?
Yes, with Keep text the text, fonts, links and form fields are not changed. With Pages as images every page becomes a picture, so the text can't be selected, searched or copied.
How do I get a PDF under 500 KB or 1 MB?
Choose Target size and pick the limit, or Other size to type your own number. If the target can't be reached, you still get the smallest result possible along with its size.
Is the result still good enough to print?
Medium (150 DPI) is fine on screen and for printing ordinary documents. For photo prints or technical drawings with fine lines, use Light (200 DPI) or keep the original.
Does a digital signature in the PDF stay valid?
No. A digital signature locks the file's exact bytes, so any change, compression included, invalidates it. Compress the PDF before it is signed.