Compress PDF
Shrink a PDF made of scans or photos, in this tab. The file never leaves your device.
https://flxcode.com/compress-pdf/
or drop a PDF here
Up to 200 MB. Password-protected PDFs can't be opened. The file stays on your device.
Your PDF never leaves this device. There is no upload, no account and no watermark. How we count
Problem or idea? Email us
How to use it
- Choose a PDF, or drop it on the box.
- Pick Light, Medium or Strong. Medium is a good start.
- Press Compress PDF. You see the size before and after, and compressed.pdf is ready to download.
What each setting does
Every picture in the PDF is shrunk until it has no more pixels per inch than the setting says, measured at the size it is shown on the page. Then it is saved again as a JPEG at the quality in the table. Pictures that are already at or below the target keep their size and are only re-saved.
| Setting | Most pixels per inch | JPEG quality | Good for |
|---|---|---|---|
| Light | 200 | 85 | Documents you may still print |
| Medium | 144 | 72 | Reading on a screen, email |
| Strong | 96 | 55 | Smallest file, upload limits |
Worked example: a scanned A4 page
A scanner set to 300 dpi makes a page of 2480 × 3508 pixels (8.7 megapixels). It fills an A4 page (8.27 × 11.69 in), so it has 300 pixels per inch. This is what each setting leaves.
| Setting | Pixels after | Megapixels | Change |
|---|---|---|---|
| Light | 1653 × 2339 | 3.9 MP | 56% fewer pixels |
| Medium | 1190 × 1684 | 2.0 MP | 77% fewer pixels |
| Strong | 794 × 1123 | 0.9 MP | 90% fewer pixels |
The file shrinks about as fast as the pixel count, a little less because the JPEG gets lower quality at the same time. A 10-page scan at 5 MB a page can go from 50 MB to a few MB at Strong.
Numbers this uses
- Settings: Light 200 dpi at JPEG quality 85, Medium 144 dpi at 72, Strong 96 dpi at 55. These are this tool's own choices, not a standard.
- Pictures smaller than 20 KB are left alone. A new picture is only used if it is at least 5% smaller than the old one.
- If the place of a picture on the page can't be worked out, it is treated as spanning 842 pt (11.7 in, the long side of A4) on its long side.
- The result is saved with object streams, which packs the file structure tighter. If the final file is not smaller than the one you gave, you get your original back.
- Limit: 200 MB for the file.
How a PDF gets small
A scanned PDF is a stack of pictures, one per page, and the pictures are nearly all of its weight. A scanner at 300 dpi or a phone camera makes far more pixels than a screen shows. Cutting pixels per inch to what the page needs, and saving the picture as a JPEG, takes most of the weight away.
A PDF made from a document, with real text and vector shapes, has little to cut. Text is stored as fonts and drawing instructions, which are already compact. For those files this tool says so and returns your original.
What happens to your file
The PDF is read from disk by your browser. A JavaScript library (pdf-lib, MIT licence) finds the pictures in it, and your browser's own image code (the canvas) shrinks them and saves them as JPEG. The new PDF is built in memory and handed to you as a download.
The page sends no request with your file or its name. The only requests after you pick a file are anonymous usage counts with words like "compress" and "smaller", never a name or a size.
Counts of events such as "compress" or "download" are kept without cookies, and never a file name or size (details). The PDF code is pdf-lib, MIT licence: open source used on this site.
What to expect
- Scans and photo PDFs often drop by 70 to 95 percent at Medium or Strong. Text PDFs drop by a few percent or not at all.
- This is lossy for pictures. Fine print in a Strong scan can look soft. Compare the result before you send it, and keep the original.
- Not touched: text, fonts, vector drawings, black and white scans stored as 1-bit images, CMYK pictures and pictures with a colour table.
- Links and bookmarks stay. A digital signature on the file will no longer verify, because the file changed.
- To cut a PDF down to a size, use reduce PDF size. To drop pages first, use delete pages.
FAQ
How do I compress a PDF for free?
Choose the file above, pick Medium and press Compress PDF. There is no account, no watermark and no daily limit. The only limit is your browser's memory, about 200 MB for one file.
Why did my PDF barely get smaller?
It probably has little in it to shrink. A PDF made from a Word document or a web page is mostly text and vector shapes, and those are already compact. Photos and scans are where the weight is. The page tells you when no pictures were found.
Does compressing a PDF reduce quality?
The pictures lose some detail, because they get fewer pixels and a lower JPEG quality. Text and vector graphics keep full quality. Light keeps the most detail, Strong the least.
Is my PDF uploaded?
No. The file is read by your browser, shrunk in this tab and handed back as a download. There is no server step. To check it, open the page, wait a second, choose a file, then switch to airplane mode and compress. It still works.
Which setting should I pick?
Medium for most files. Light if the PDF may be printed, because it keeps 200 pixels per inch. Strong when you need the smallest file, such as for an upload form with a size limit.
Can I compress a password-protected PDF?
Not directly. The page says the file is protected. Open it with the password in a PDF reader, save or print it as a new PDF, and compress that copy.
Will the text stay selectable and searchable?
Yes, if it was text before. A scanned PDF with a hidden text layer from OCR keeps that layer. A scan with no OCR was never searchable, and compressing it does not change that.
What if the new file is bigger?
You never get a bigger file. If the result is not smaller than your original, the page gives your original back and says so.
More from FLXCode
PDF compressorNew
A PDF compressor that runs in your browser. Strong setting first for the smallest file. Nothing is uploaded.
Reduce PDF sizeNew
Reduce a PDF to under a size you set, in MB or KB. Tries three settings, stops at the first that fits. No upload.
Merge PDFNew
Combine PDF files into one, in the order you choose. It runs in your browser and nothing is uploaded.
JPG to PDFNew
Turn JPG photos into one PDF, one image per page. A4, Letter or fit to image. Nothing is uploaded.