Compress PDF
Reduce eligible JPG-heavy PDFs locally, without uploading the document.
Privacy: your files never leave your device. All processing happens locally in your browser.
How to use
- 1.Choose one local PDF up to 25 MB.
- 2.Select Compress PDF and wait while eligible embedded JPG images are checked and re-encoded locally.
- 3.Review the reported input and output sizes, then download the verified PDF if it is smaller.
About Compress PDF
Compress PDF is a bounded browser-only option for image-heavy PDFs. It opens one file locally, identifies embedded JPG image objects that can be replaced without changing their page references, and re-encodes only those images at a balanced quality and maximum dimension. The source file never leaves your browser tab.
This is deliberately narrower than a general-purpose PDF optimizer. The tool only changes unmasked DCTDecode JPG images with DeviceRGB or DeviceGray color data. It skips JPX, CMYK, Indexed, masked, ImageMask, and decode-parameter cases instead of guessing. If a newly encoded JPG is not actually smaller than its original byte stream, it keeps the original image. If no safe replacement is smaller, it returns an honest error and does not create a download.
Page content, page count, text, links, vector objects, forms, annotations, metadata, and unsupported image objects remain in the PDF structure. That also means a text-only PDF often cannot shrink, and the final file size depends on the source images and PDF overhead. The output is reopened with a PDF viewer before the download link is shown so a malformed result is not presented as success.
For safety, this version accepts a PDF up to 25 MB, up to 80 eligible image objects, and at most 100 megapixels across the images it decodes. Use it for scanned or photo-heavy documents when a visually smaller local copy is acceptable. Keep the original file and inspect the output before sharing it. Use a specialist desktop PDF optimizer if you need arbitrary stream compression, archival conformance, print color management, or guaranteed lossless results.
Methodology & sources
Load one bounded local PDF with pdf-lib, enumerate image XObjects, allow only unmasked DCTDecode DeviceRGB or DeviceGray streams without decode parameters, decode each eligible JPG in a browser image element, downscale its longest side to 1400 px at JPEG quality 0.70, retain the original whenever the candidate is not smaller, replace only smaller payloads at the same indirect reference, save, then reopen with pdf-lib and PDF.js to verify page count before exposing Download.
Frequently asked questions
- Will every PDF become smaller?
- No. Text-only PDFs and files without a safely replaceable JPG image normally cannot shrink with this bounded tool.
- Which images can the tool change?
- Only unmasked embedded DCTDecode JPG images using DeviceRGB or DeviceGray color data. Unsupported images remain unchanged.
- Does it upload my PDF?
- No. Reading, JPG encoding, output assembly, and verification all run in the current browser tab.
- Does it preserve text and links?
- Yes for the unchanged document structure. The tool replaces only eligible embedded image streams and does not rasterize whole pages.
Related tools
- PDF to JPG ConverterRender every PDF page as a separate JPG locally, with adjustable scale and quality.
- Extract Images from PDFExport embedded JPG and simple RGB/grayscale PDF images locally, with no upload.
- Remove Images from PDFCreate a no-upload PDF copy that replaces eligible embedded JPG image objects with white pixels.
- Resize PDFResize every PDF page to A4, US Letter, or Legal β or scale by percentage β right in your browser, with no upload.
- Add Page Numbers to PDFStamp page numbers onto every page of a PDF right in your browser β pick the corner, format, and starting number, with nothing uploaded.
- Add Watermark to PDFStamp clear, adjustable text watermarks onto PDF pages without uploading your file.
PDF Tools guides
View all- Convert Book PDF to Audio: A Printable Booklet Option
- Create a Blank PDF for Bluebeam at Exact Point Sizes
- Add Page Numbers to PDF: A Browser Alternative to Acrobat
- How to Export PDF Links from a LinkedIn File
- Paper Size Chart With Image: Pixels at Any DPI
- How to Save a PDF as a Flattened PDF (Lock the Fields)
- How to Extract PDF Pages for Free: Complete Guide
- Delete PDF Pages in Microsoft Edge: Full Guide
- How to Crop a PDF Without PDF-XChange Editor
- How to Add a PDF Watermark in Acrobat or Browser
- Add Page Numbers to a PDF in Bluebeam Revu
- Add Page Numbers to PDF: Choose Position, Format & Start
- Add a PNG Image to a PDF Without Losing Quality
- Count Pages in Multiple PDFs Without Uploading Files
- Print Multiple PDF Pages on One Sheet Online
- How to Edit PDF Metadata in Adobe Acrobat: A Browser Method
- How to Crop a PDF Using Foxit and Browser Alternatives
- Paper Size Chart in Pixels for Any DPI and Paper Format
- How to Merge PDF Files Using Google and Browser Tools
- Convert JPG to PDF for Free in Your Browser