PDF Compressor
Compress a PDF in your browser by re-encoding its embedded JPEG and PNG images to a lower quality, downsampling oversized images, and stripping metadata.
PDF Compressor — Shrink a PDF entirely in your browser. It re-encodes the embedded raster images — both JPEG (DCTDecode) and PNG/Flate (FlateDecode) — to a lower-quality JPEG, optionally downsamples oversized images to a target DPI, can strip document metadata, and re-saves with object streams to drop redundant structure. Everything runs locally with pdf-lib and the Canvas API, so the file is never uploaded. A before/after size stat and a per-image savings breakdown show exactly where the bytes went.
What is PDF Compressor?
A free online PDF compressor that reduces PDF file size right in your browser. It targets what actually bloats a PDF: heavy embedded raster images and redundant document structure. Pick a Low, Medium, or High image-quality level, choose how far to downsample oversized images (keep original, or cap at 300, 150, or 96 DPI), and optionally remove document metadata. The tool decodes each embedded image — JPEG and PNG/Flate alike — re-encodes it as a smaller JPEG with the Canvas API, and re-saves the whole document with object streams. Office workers emailing reports, students under an upload cap, and anyone hitting a PDF size limit can drop a file and get a smaller one back, with a per-image breakdown of the savings. Parsing (pdf-lib), inflation (fflate), and image re-encoding (Canvas) all run locally, so the PDF never leaves your device.
How to use PDF Compressor
- Drop a PDF onto the dropzone, or click it to browse and pick a PDF from your device.
- Pick an image quality — Low for the smallest file, Medium for a balance, or High to keep more detail.
- Open Settings (gear icon) to downsample oversized images to a target resolution (300, 150, or 96 DPI, or keep the original) and to remove document metadata.
- Watch the Original, Compressed, and Saved stats and the per-image savings breakdown update automatically a moment after the file loads — no extra button to compress.
- Click Download to save the compressed PDF, or use Reset to clear and start over with another file.
Examples
Shrink a scanned PDF for email
Drop a scanned multi-page PDF, pick Medium, and leave the resolution at 150 DPI. Each page's embedded image is downsampled and re-encoded, the Compressed stat drops well below the Original, and the per-image breakdown shows a saving like -80% on each page. Download saves it as document-compressed.pdf.
Squeeze a photo portfolio to the smallest size
Drop a PDF full of full-page photos, pick Low, and set the resolution to 96 DPI in Settings. Every embedded image — JPEG or PNG — is downsampled and re-encoded at low quality, giving the largest reduction at the cost of some visible detail.
Lightly recompress and strip metadata
Pick High, set the resolution to Keep original, and turn on Remove metadata. Images are re-encoded only where it actually saves space, the document is re-saved with object streams, and the title, author, and other info are cleared from the file.
Frequently asked questions
- How does the compression actually work?
- Three levers. Embedded raster images — both JPEG (DCTDecode) and PNG/Flate (FlateDecode) — are decoded and re-encoded as lower-quality JPEGs with the Canvas API; oversized images are optionally downsampled to your chosen DPI; and the document is always re-saved with object streams to remove redundant structure. You can also strip document metadata.
- Which images can it compress?
- 8-bit grayscale and RGB images stored as JPEG (DCTDecode) or PNG/Flate (FlateDecode), including ICC-tagged ones. Images it can't safely re-encode — CMYK, indexed-color, 1-bit, transparency masks, or other codecs like JPEG 2000 — are left untouched, so they never break.
- Why did my PDF barely get smaller?
- Most of a PDF's size usually comes from raster images. A PDF that is mostly selectable text and vector graphics has little to re-encode, so the savings are small. The biggest reductions come from scanned or photo-heavy PDFs, especially with downsampling turned on.
- Will compressing reduce quality?
- Yes, when it shrinks images. Lower quality levels and lower target DPIs re-encode and downsample the embedded images, which is what saves the bytes; the per-image breakdown shows the trade for each one. Keep the original resolution with High quality for the lightest touch, and any image that wouldn't get smaller is kept as-is.
- Is my PDF uploaded to a server?
- No. Everything runs 100% client-side in your browser — pdf-lib parses the file, fflate inflates the image streams, and the Canvas API re-encodes them. Your PDF is never uploaded, sent, or stored anywhere, so it works even offline once the page has loaded.
Related tools
Image Format Converter
Convert images between AVIF, WebP, PNG, JPEG, BMP, ICO and single-frame GIF entirely in your browser.
Excel/CSV to JSON
Convert an Excel or CSV spreadsheet into JSON or CSV right in your browser.
EXIF Viewer & Metadata Remover
View an image's EXIF metadata — camera, lens, capture date, and GPS location — then strip every tag and download a clean copy, all in your browser.
Favicon Generator
Build a full favicon package in your browser: a real multi-resolution favicon.ico, 16 to 512 px PNGs, a site.webmanifest and an HTML snippet.