Compress PDF
Shrink PDFs in the browser — lossless repack, image recompress, or turn pages into images — free, private and running entirely in your browser
Reduce one PDF’s size in the browser. The page shows the exact byte counts before you download. A smaller file is not guaranteed.
Last updated: 12 October 2026
Guide, examples, and FAQ
About Compress PDF
What it does
Load one PDF, up to 50 MB. Lossless is the default: it re-saves with object streams and clears the Info fields, and it leaves images alone. Compress images re-encodes suitable embedded photos as JPEG. Rasterize turns every page into a JPEG. Check the byte counts before you send the file.
Who it is for
For anyone who needs a smaller PDF before an upload or an email.
When to use it
Use it when the pages should stay in one file and the job is the file size. It does not split or merge, and it does not compress a standalone picture.
Key features
Lossless
Repacks the file with object streams. Clears title, author, subject, keywords, producer and creator. Blanks an XMP pdf:Producer when that text is present. No image is rewritten. Text stays selectable.
Compress images
Re-encodes a JPEG or Flate image that is 8-bit DeviceRGB, DeviceGray, or CalRGB, with one filter and no soft mask or mask. Quality and max edge come from the sliders. An image stays as it is when the new JPEG is not smaller. Text stays selectable.
Rasterize
Draws every page as a JPEG at the chosen DPI. The warning says: “Pages become images: text can no longer be selected, and the file can get larger.” The source title is not copied into the new file.
How to use Compress PDF
- 1Drop one PDF, up to 50 MB. Lossless is already selected.
- 2For photos, switch to Compress images. For a full-page redraw, switch to Rasterize and read the warning first.
- 3Screen is 72 DPI, max edge 1280, JPEG 0.55. eBook, the starting preset, is 110, 1920, 0.70. Print is 150, 2560, 0.85. Moving a slider leaves the preset name as it is.
- 4Read the original bytes, the compressed bytes, and the change. Download <original>-compressed.pdf. Changing a setting clears that result.
Example
Before
A generated one-page PDF, 189,623 bytes. Title “Board notes”. Text “Selectable caption”. A 1400×900 JPEG of 185,489 bytes, and a 180×120 image with a soft mask (1,203 bytes) whose mask is a separate 629-byte image.
After
Lossless is 189,348 bytes. The page reports “No size change (189,623 bytes → 189,348 bytes)”. All three image streams keep the same byte lengths. The title, author, subject, keywords, producer and creator are blank, and the XMP producer is empty. The text is still “Selectable caption”. Compress images at 0.70 and max edge 1920 is 94,159 bytes: “189,623 bytes → 94,159 bytes (−50%). (1 image recompressed, 2 left as-is).” The JPEG becomes 90,303 bytes. The soft-mask image stays 1,203 bytes of Flate. The mask stays 629 bytes. The text is still “Selectable caption”, and the title is blank.
These are small generated files, and real files vary with the content. Earlier measurements on the same kinds of calls: photo.pdf, 1 page, 53,322 bytes, one 1200×900 JPEG plus text, was 53,257 bytes lossless, 12,610 bytes with Compress images at 0.70 and 1920 (text “Selectable caption” still extractable; 1 candidate, 1 replaced), and 8,625 bytes rasterized at 72 DPI and 0.55 with no extractable text. notes.pdf, 4 pages, 3,233 bytes, was 3,169 bytes lossless and grew to 20,935 bytes when rasterized at 72 DPI and 0.55.
Common problems and fixes
The change says No size change
The percentage rounded to zero. The byte counts on either side are still exact. Lossless only repacks and clears metadata. Compress images needs an eligible photo that actually gets smaller.
Rasterize made the file larger
The warning is on screen before the run: “Pages become images: text can no longer be selected, and the file can get larger.” Lower the DPI or the JPEG quality, or use Lossless.
The file is password-protected
Loading stops with “This PDF is password-protected — upload the unlocked version to continue.”
Benefits
The counts are the file
Original and compressed are exact bytes. Change is a rounded percentage, or “No size change” when that percentage rounds to zero. The 189,623-byte file lost 275 bytes lossless and still read “No size change”.
A preview after the run
“Preview compressed output” appears once a result exists. Switching mode, preset, DPI, max edge, quality, or file clears that result.
Common use cases
One PDF, smaller if it can be
Run Lossless or Compress images, read the byte counts, and download only if the size is what you need.
Tips & best practices
- Lossless and Compress images leave text selectable. Rasterize replaces each page with a JPEG.
- DPI runs from 50 to 200. Max edge runs from 640 to 4096. JPEG quality runs from 30 to 95. The sliders show for Rasterize and Compress images.
- An image with a soft mask, a mask, CMYK, indexed color, JPEG2000, or more than one filter is left as it is in Compress images.
Common mistakes to avoid
- Rasterizing a text-only PDF and sending it without reading the size. notes.pdf grew from 3,233 bytes to 20,935 bytes at 72 DPI and 0.55.
- Expecting Lossless to shrink a scanned page. photo.pdf went from 53,322 bytes to 53,257 bytes.
- Compressing a photo that is already small. Compress images keeps the original stream when the new JPEG is not smaller.
- Downloading before you read the original bytes, the compressed bytes, and the change.
Frequently asked questions
Is the document title kept?
Lossless and Compress images clear it. On the measured file the title was “Board notes” and the saved title is an empty string, with author, subject, keywords, producer and creator cleared the same way. An XMP pdf:Producer is blanked too. Rasterize never copies the source title: it saves a new document, so the title is absent. That new document’s producer is pdf-lib’s own producer, because Rasterize does not run the metadata clearer.
Which images does Compress images touch?
A single-filter JPEG (DCTDecode) or Flate image, 8-bit DeviceRGB, DeviceGray, or CalRGB, with no SMask and no Mask. On the measured file the 1400×900 JPEG was replaced. The 180×120 image that has a soft mask was skipped and stayed 1,203 bytes. Its mask was eligible and still stayed 629 bytes, because the new JPEG was not smaller. Fonts and vector drawing are left as they are.
What does Rasterize drop?
Each page becomes one JPEG, so the source text can no longer be selected. Links and form fields are not copied onto those new pages. photo.pdf at 72 DPI and 0.55 had no extractable text. The file can be smaller or larger.
What is the download called?
The original file name with -compressed.pdf on the end, such as report-compressed.pdf. Nothing is uploaded or stored. The rewrite uses @cantoo/pdf-lib 2.9.1. Page rendering uses pdf.js.
How large can the PDF be?
50 MB. One PDF at a time.
When another tool fits better
- Split PDF. You need some of the pages as their own file. Compress PDF rewrites the whole PDF.
- Merge PDF. You have several PDFs to put into one file. Compress PDF loads one PDF.
- Image Compressor. The file is a PNG, JPG, or WebP picture, up to 25 MB. Compress PDF loads a PDF.
Conclusion
Compress PDF rewrites one PDF and shows the exact size change. Lossless and Compress images clear the title and keep text selectable. Rasterize turns pages into images, and the file can grow. Read the counts before you send it.
Ready to try Compress PDF?
Scroll back up to start now, or continue with another free pdf tool.