Image re-encoding
Embedded raster images are re-encoded as JPEG at a lower quality, which is where most of the size saving comes from.
Shrink the size of a PDF by re-encoding its images at a lower quality and choosing a compression preset. See the original and output sizes side by side, then download the smaller file. No uploads, no sign-up, no watermark.
Private by design. PDFs are read and rewritten entirely in your browser using pdf-lib and the HTML5 Canvas API. Nothing is uploaded, stored, or logged on any server.
or click to browse — one file at a time
Up to about 50 MB. Encrypted PDFs are not supported.
Upload a PDF to see the original size and available savings. Compression results will appear here.
Embedded raster images are re-encoded as JPEG at a lower quality, which is where most of the size saving comes from.
Light, Balanced, Strong and Max give you a quick way to trade quality against size without micromanaging sliders.
The original and compressed sizes appear side by side with the exact percentage saved, so you can decide whether to keep the result.
Downscale very large images before re-encoding to avoid wasting bandwidth on detail that will not be visible on screen.
Files are read and rewritten entirely in your browser. Nothing is uploaded, stored, or logged anywhere.
Preview and settings sit side by side on desktop and stack neatly on mobile.
PDF is a container format. It stores text, vector graphics and raster images side by side, along with the metadata that ties them together. That flexibility is why PDFs are so widely used, and it is also why some PDFs are huge and others are tiny. A twenty-page text document may weigh less than 200 KB; a ten-page brochure with high-resolution photographs may weigh 30 MB. Compressing a PDF is mostly about finding where the bulk lives and reducing it without visible loss.
Three sources account for almost all of a PDF's file size:
Text itself takes almost no space. It is the images that make PDFs heavy, which is why the most effective compression is image re-encoding.
Raster images inside a PDF are typically stored as either JPEG (lossy) or Flate/PNG (lossless). Re-encoding a lossless image to JPEG at moderate quality usually produces a file 5–10× smaller with no visible difference on screen. Re-encoding a JPEG that is already compressed at high quality produces a smaller file but with more visible artifacts, which is why good tools offer a range of quality settings rather than a single "compress" button.
This compressor renders each page in a temporary canvas, extracts the embedded raster images, downsizes them if they exceed the maximum width you chose, re-encodes them as JPEG at your quality setting, and rebuilds the page using the newly encoded images. Text and vector graphics are left untouched, so they stay crisp and selectable. The result is a new PDF, and the original file on your disk is not modified.
Not every PDF can be made smaller. If the document is mostly text, if its images are already small, or if it has already been through a professional optimiser, there may be little room to save. In a few edge cases the re-encoding step can even produce a slightly larger file than the original. The tool is transparent about this: it shows you the exact sizes before and after, and it tells you when the result is larger so you can keep the original.
This PDF compressor is part of the TempScript free online tools collection. It runs entirely in your browser, requires no account, and never sends your files anywhere. If you work with PDFs regularly, you may also find our PDF merger and PDF page organizer useful.
© 2026 TempScript. All rights reserved.