Compress a PDF File

Shrink a PDF's file size by rasterizing and re-encoding each page — processed entirely on your device, never uploaded.

or drag it hereSelect one PDF to compress
  • Free — No signup required
  • Instant — Results update as you type
  • Private — Processed in your browser

PDFs get big for one reason far more often than any other: they contain scanned pages or photographs stored at a resolution nobody will ever look at. This tool attacks exactly that case by redrawing every page as a JPEG at a resolution and quality you control. It is deliberately simple, and it is important to understand what it trades away.

How it works

Choose a PDF and set the quality slider (10–100%, default 60%). When you press Compress PDF, the tool loads pdf.js and pdf-lib on demand, then for each page:

  1. Renders the page with pdf.js onto a canvas at 1.5× its nominal size, which corresponds to 108 dots per inch. That is enough for comfortable reading on screen and for an ordinary print, but noticeably below the 300 DPI of a good scan.
  2. Encodes the canvas as a JPEG at your chosen quality.
  3. Embeds that JPEG, with pdf-lib, as the sole content of a new page of the same dimensions in a fresh document.

Progress is reported per page. When the new file is finished, its size is compared with the original. If it is not smaller, the original is offered unchanged with a note saying so; you are never handed a "compressed" file that is bigger. Otherwise the result downloads as compressed-<original name>.pdf with the percentage saved. Everything happens on your device.

What you lose

Because each page becomes one picture, the output has no text layer. You cannot select, search, copy or index it, screen readers cannot read it, and vector graphics and fonts are replaced by pixels at 108 DPI. Links, form fields, bookmarks and annotations disappear. Transparency and layers are flattened.

This is a fine trade for a scan that was already just pictures, or for a photo album you need to email. It is a poor trade for a report, a contract or anything produced from a word processor, where the text is the point. Those files are usually small already; if one is large, the cause is an embedded image or an un-subsetted font, and a structural tool (below) will fix it without touching the text.

Run a text-based PDF through this tool and you will often see the "original kept" message: crisp text is more compact as vector glyphs than as JPEG pixels.

Choosing a quality

At 60%, a scanned page rendered at 108 DPI is usually a small fraction of its original size. Text on scans stays legible down to about 40%; below that, JPEG blocking makes small print uncomfortable. For photographs, 70–80% keeps them presentable. Quality affects only the JPEG encoding; the 108 DPI render resolution is fixed, which is the main reason a 300 DPI scan shrinks so much here regardless of the slider.

Command-line equivalent

Ghostscript's pdfwrite device downsamples images while keeping text as text, which is usually the better tool for mixed documents:

gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -dNOPAUSE -dBATCH -o small.pdf large.pdf

/screen targets 72 DPI, /ebook 150 DPI and /printer 300 DPI. For lossless clean-up that only rewrites the file structure, qpdf --optimize-images --object-streams=generate in.pdf out.pdf is a safe first attempt.

Learn more

Deciding between lossy rasterisation and structural optimisation, and scripting the Ghostscript command above over a folder, are covered in shell basics. If you only need a few pages small, extract them first with the PDF splitter; if the document started life as images, compress those with the image compressor and rebuild the PDF with image to PDF, which gives you control over each picture.

FAQ

Will the text still be selectable after compressing?
No — every page is rasterized into an image, so text is no longer selectable or searchable. This tool is best for scanned or image-heavy PDFs.
What if compressing doesn't actually shrink the file?
The original file is offered instead — you're never handed a result that's larger than what you started with.
Is my PDF uploaded anywhere?
No. Compression happens entirely in your browser.