PDF compressor
A PDF compressor with no upload. It starts on Strong, the smallest result, and you can step back to Medium or Light.
https://flxcode.com/pdf-compressor/
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.
- Leave Strong on for the smallest file, or pick Medium or Light for more detail.
- Press Compress PDF and check the size line. Open the download and look at a page before you send it.
Worked example: a phone photo on a full page
A 12 megapixel phone photo (4000 × 3000) placed on an A4 landscape page is shown 11.02 × 8.27 in, which is about 363 pixels per inch. That is more than any screen or office printer shows. Here is what the Strong setting and its neighbours leave.
| Setting | Pixels after | Pixels per inch after | Change |
|---|---|---|---|
| Light | 2205 × 1654 | 200 | 70% fewer pixels |
| Medium | 1587 × 1191 | 144 | 84% fewer pixels |
| Strong | 1058 × 794 | 96 | 93% fewer pixels |
Worked example: a small picture inside a text page
A 1600 × 1200 picture sits in a report at 6 × 4.5 in, so it has 267 pixels per inch. Text pages like this have few pictures, so there is less to gain.
| Setting | Pixels after | Change |
|---|---|---|
| Light | 1200 × 900 | 44% fewer pixels |
| Medium | 864 × 648 | 71% fewer pixels |
| Strong | 576 × 432 | 87% fewer pixels |
Text and line art are not pictures. They are stored as instructions and fonts, and this tool leaves them alone. A PDF with only text barely changes, and the tool tells you so instead of making a bigger file.
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.
- Strong keeps no more than 96 pixels per inch, about what a laptop screen shows at 100 percent zoom.
What the compressor does to each picture
For each picture, the tool works out the size it has on the page from the page's drawing instructions. It divides the pixels by the inches to get the pixels per inch, and cuts the picture down until that number is at or under the setting. Big reductions are done in halving steps, which keeps edges cleaner than one jump.
The picture is then saved as a JPEG at the setting's quality and swapped into the PDF only if that is at least 5 percent smaller. Everything else in the file stays as it was.
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.
Strong versus the other settings
- Strong is for files that must be small: an upload with a size cap, a mail attachment, a phone with little storage.
- At 96 pixels per inch a page of small print gets soft when zoomed in. If you will print the PDF, use Medium or Light.
- A scan that is already black and white at 1 bit per pixel is not touched. It is usually small already.
- If you have a size in mind, reduce PDF size tries the settings for you until the file fits.
- To choose the setting yourself, use compress PDF, which starts on Medium instead of Strong.
- For plain text PDFs there is nothing to gain, and the page returns the original.
FAQ
What is the best PDF compressor?
The one that does not upload your file, in my opinion, when the PDF holds contracts, IDs or medical papers. This one runs in your browser tab. It works on pictures, which is where the weight of most large PDFs is.
How much smaller will my PDF get?
Pictures decide it. A 300 dpi scan cut to 96 dpi has about a tenth of the pixels, so scans often shrink by 90 percent or more. A text-only PDF shrinks by a few percent at most. The page shows the real before and after.
Is it safe to compress confidential PDFs here?
The file is never sent anywhere. The page has no upload step, and it keeps working with the network switched off after it has loaded. Still, the usual advice holds: keep the original.
What does 96 dpi mean for my document?
Dots (pixels) per inch of the picture at the size it shows on the page. 96 is the standard screen density. It reads fine on a monitor and looks soft in print, where 150 to 300 is normal.
Why is the PDF compressor slow on my big file?
It decodes and saves every large picture in your browser. A 50 MB scan takes a few seconds on a laptop, longer on an old phone. The status line shows which picture it is on.
Does it work on a phone?
Yes, in a current browser. Very large files can run out of memory on phones. If that happens the page says so. Try a computer or split the file into parts first.
Can it compress several PDFs at once?
One at a time. To combine them first, use merge PDF, then compress the result.
More from FLXCode
Compress PDFNew
Make a PDF smaller by shrinking its photos and scans. Runs in your browser, 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.
Split PDFNew
Split a PDF by page ranges, every N pages or one file per page. Runs in your browser, nothing is uploaded.
Merge PDFNew
Combine PDF files into one, in the order you choose. It runs in your browser and nothing is uploaded.