Compress PDF files by recompressing images
Shrink PDFs that contain large JPEG images, with clear reporting of what changed and what could not.
What this tool actually does
It makes a PDF smaller in genuine ways, and only those ways:
- Recompresses embedded JPEG images. Each JPEG picture inside the PDF is decoded, optionally reduced to your chosen largest side, re-encoded at your chosen quality, and swapped in only when the new version is smaller.
- Rewrites the file structure using compact object streams, which can save a little space.
- Optionally removes metadata such as title and author.
What it cannot do
- Text, fonts and vector drawings are left exactly as they are.
- Images stored in other ways, such as lossless or black-and-white scans, JPEG 2000, or CMYK photos, are left unchanged and counted as skipped.
- A PDF with no JPEG images may not shrink at all. The tool then says so and gives you no download, rather than handing back a file that is not smaller.
- Digital signatures are invalidated by any change. Keep the signed original.
- Password-protected PDFs are rejected.
How to use this tool
- Choose a PDF. The name, page count and size appear.
- Leave “Recompress JPEG images” ticked. Set the quality (60 is a moderate starting point) and the largest image side.
- Press Compress PDF and read the result line. It lists original size, new size, percentage and how many images were recompressed or skipped.
- Download the file and open it. Zoom in on small print, signatures and stamps to make sure they are still legible.
Settings and their effects
| Setting | Effect |
|---|---|
| Image quality | Lower means smaller files and more visible artefacts. |
| Largest image side | Images larger than this are scaled down. This is often the biggest saving, especially for high-resolution scans. |
| Remove metadata | Clears title, author and similar fields. The saving is small. |
Examples
A scan made from phone photos often contains large JPEGs, so reducing them to 1600 px at quality 60 can shrink it greatly. A PDF exported from a word processor with only text may shrink by a few percent or not at all. If a 4.0 MB file becomes 1.0 MB, the reduction is 75%. These are illustrations; your results depend on your file.
How it works
The browser opens the PDF with the bundled pdf-lib library (MIT licence), finds image objects that use JPEG compression and a plain RGB or grey colour space, redraws them on a canvas at the new size, re-encodes them as JPEG and replaces the original image data. Transparency masks are preserved by reference.
Troubleshooting
If nothing improves, the PDF probably has no recompressible JPEG images. If images look too blurry, raise the quality or the maximum side. If the file will not open, the PDF may be damaged or use unsupported features.
Privacy
The PDF is processed in your browser and the tool code does not upload it. See the Privacy Policy.
A real example, and why it is not typical
When this tool was tested during development, a 4.65 MB PDF containing two large photographic JPEG pages came out at 326.9 KB with the default settings, a reduction of 93.1%, with its page count unchanged. That test file was deliberately made of big, noisy photographs. Ordinary documents, particularly ones that are mostly text, will shrink far less. A PDF with no JPEG images at all may not shrink in any useful way.
Choosing settings for your situation
| Situation | Suggested start |
|---|---|
| Scan made from phone photos | Quality 60, largest side 1600 px |
| Document with small print that must stay readable | Quality 75, largest side 2400 px |
| Only need a quick, safe saving | Quality 80, keep original size |
| Must be as small as possible | Quality 40 to 50, largest side 1200 px, then check legibility |
Understanding the report
After processing, the page shows the original size, the new size, the percentage saved, and how many images were recompressed or left unchanged. “Left unchanged” means the image either used a format this method cannot handle, such as lossless or black-and-white scans, or the recompressed version would not have been smaller. If the result is not smaller than your original, you get a message explaining that, and no download is offered, because handing you a larger file would not help.
Things to watch for
- Digital signatures are invalidated by any change to the file. Keep the signed original for any purpose that needs the signature.
- Forms keep their fields in most cases, but test the output if you rely on them.
- Quality loss in images cannot be reversed. Compare small text, stamps and handwriting at 200% zoom.
- Size limit. Files over 100 MB are refused because browsers struggle with them.
- Password-protected PDFs are rejected.
Troubleshooting
| What you see | Likely reason | What to try |
|---|---|---|
| “No reduction was possible” | No recompressible JPEG images | Re-export from the source document or rescan at lower resolution |
| Many images skipped | Images use other formats | Use a PDF editor with stronger optimisation |
| Text is blurry afterwards | The page is a scanned picture and quality was too low | Raise quality and the largest side |
| “Could not be read” | The file is damaged | Try opening it in a PDF reader first |
For the bigger picture, including non-tool methods, read how to compress a PDF for online uploads.
Frequently asked questions
Why did my PDF not get smaller?
It may contain no JPEG images that this method can recompress. The tool tells you instead of returning an unchanged file.
Does it make text blurry?
No. Text and vector content are not changed. Only embedded JPEG images are.
Will signatures still work?
No. Any change invalidates a digital signature. Keep the signed original.
Is my PDF uploaded?
The tool code does not upload it.