Skip to content

Compress PDF to Size

Create a local PDF only when a verified JPG recompression result reaches your target size.

Privacy: your files never leave your device. All processing happens locally in your browser.

How to use

  1. 1.Choose one local PDF up to 25 MB.
  2. 2.Enter a target from 0.1 to 25 MB that is smaller than the source file.
  3. 3.Select Compress to target size; download only when the verified output meets the exact target.

About Compress PDF to Size

Compress PDF to Size is a local, target-aware option for JPG-heavy PDFs. You enter a target from 0.1 to 25 MB, and the tool tries a short sequence of browser JPEG quality and maximum-dimension settings. It compares the bytes of each real saved PDF with your target, not an estimate derived from the source file.

The tool only changes embedded JPG streams that can be safely replaced: unmasked DCTDecode DeviceRGB or DeviceGray images with no decode parameters. It preserves unsupported image objects and does not rasterize whole pages. If a candidate JPG would be larger than its original stream, it leaves that image untouched. If the resulting file is still over your target after every bounded profile, it creates no download and explains that the target cannot be reached safely.

This means the result is useful for genuine size limits rather than a vague compression promise. A scanned PDF may reach a much lower target; a text-only PDF, vector-heavy document, or file dominated by unsupported images may not. Page structure, selectable text, links, forms, vectors, and unsupported objects remain untouched, but there is no general lossless PDF optimization claim.

The local job is limited to a 25 MB source, 80 eligible images, and 100 megapixels across the images it decodes. Each candidate result is reopened in a PDF viewer and checked against the original page count before a download link is displayed. Keep your original and review the result when document fidelity matters.

Methodology & sources

Validate a user target from 0.1 through 25 MB, load one bounded local PDF, and for each fixed profile (quality/longest-side: 0.70/1400, 0.55/1000, 0.40/800, 0.30/600) safely replace only smaller unmasked DCTDecode DeviceRGB or DeviceGray JPG payloads. Save each candidate, compare its actual byte length to the target, reopen the first passing candidate with PDF.js, verify page count, and expose Download only when the final bytes are at or below the requested limit.

Frequently asked questions

Does the download always meet the target?
Yes. The tool offers a download only after the actual saved PDF is at or below the MB value you entered.
Why might there be no result?
The source may be text-only, use unsupported images, or require more reduction than safe JPG recompression can provide.
Does it keep trying until it reaches any target?
No. It uses a fixed bounded sequence of quality and dimension profiles to avoid unbounded browser work or misleading output.
Is the file uploaded?
No. PDF reading, image encoding, measurement, and verification stay in your browser.

PDF Tools guides

View all