Compress PDF

Compress PDF

Make a PDF smaller in your browser. The tool recompresses JPEG images at a size and quality you choose, removes unused data and packs the file structure more tightly, then checks that the result still has the same number of pages. Your PDF is processed on your device and is never uploaded. How much it shrinks depends on what is inside the file, and the tool tells you exactly what it changed and what it left alone.

Drop a PDF here, or choose one:

No file chosen yet. Files up to 100 MB are accepted. Very large files can be slow on phones.

The first time you compress a file, a small open-source library (pdf-lib) is fetched from a public CDN, so that step needs an internet connection. Your PDF itself is never sent anywhere.

What this tool really does

A PDF is made of several kinds of content, and each shrinks differently. This tool does three things, all in your browser:

  1. Recompresses JPEG images (lossy). Photographs and scanned pages inside PDFs are very often stored as JPEG. The tool decodes each one, scales it down if it is larger than the limit you chose, and saves it again at the quality you chose. It keeps the new version only if it is meaningfully smaller than the original.
  2. Removes unused data (lossless). Files that were edited and saved repeatedly can carry old versions of objects that nothing refers to any more. The tool finds objects that cannot be reached from the document and drops them.
  3. Packs the structure (lossless). The document’s internal bookkeeping is stored in compressed object streams, which helps most with PDFs that have many pages or annotations.

Text, fonts and vector graphics are not changed. Bookmarks, links, form fields and accessibility tags are kept, because the tool edits your document in place instead of rebuilding it. The tool will never give you a file that is larger than the original: if it cannot save space with your settings, it says so and keeps the original.

What it cannot do

Content in your PDFWhat happens
JPEG images in RGB or greyRecompressed according to your settings
Images stored in other ways (PNG-style, JBIG2 black-and-white scans, JPEG 2000)Left untouched and counted in the report
CMYK, indexed or special-colour images; images with masksSkipped, to avoid changing colours
Text, fonts and vector graphicsUnchanged. Fonts are not reduced to the characters used
Password-protected PDFsCannot be opened. Remove the password first
Digitally signed PDFsAny change invalidates the signature. Do not compress a PDF you have to keep signed
PDF/A archival filesRewriting can break PDF/A conformance. Use a PDF/A-aware tool and re-validate if your submission requires it

Because of these limits, savings vary a great deal. PDFs made from photographs or JPEG scans can shrink a lot. PDFs that are mostly text and vector drawings are already small, and PDFs whose figures are stored as PNG-style images may barely change. If you need more, the table below lists stronger options.

Choosing a preset

PresetUse it forTrade-off
Lossless clean-upAnything you cannot alter visibly, such as final figuresOften saves little
LightDocuments with photographs that will be printedModest saving, very little visible change
BalancedMost theses, reports and e-mail attachmentsFine on screen and in normal printing
StrongMeeting a file-size limit on a submission portalFine detail in photographs softens
ExtremeDrafts, previews and mobile readingVisible quality loss. Small print inside images may become hard to read

Resolution matters more than the quality number. If a picture spans the full width of an A4 page (about 8.27 inches), a 1600-pixel image has an effective resolution of about 193 dots per inch, which is good for screens and acceptable for ordinary printing. Many publishers ask for 300 dots per inch for photographs in print, so keep the Light preset or a higher limit if that applies to you.

Worked example you can check by hand

Suppose a scanned page is stored as a JPEG of 3000 × 2000 pixels and spans the full width of an A4 sheet, which is 210 mm or 8.27 inches. Its effective resolution is 3000 / 8.27 = 363 dots per inch.

With the Strong preset the longest side is limited to 1200 pixels. The scale factor is 1200 / 3000 = 0.4, so the image becomes 1200 × 800 pixels. It now has 960,000 pixels instead of 6,000,000, which is 16% of the original (0.4 × 0.4). The new effective resolution is 1200 / 8.27 = 145 dots per inch. JPEG file size roughly follows the number of pixels at a given quality, so a scan like this often ends up several times smaller. The exact result depends on the picture, which is why the tool reports the real before and after sizes instead of promising a percentage.

Other ways to compress a PDF

OptionHow
Export again from the sourceIn Word or PowerPoint, use File → Export → PDF and choose the “Minimum size” option. Compress the pictures in the document first. This usually beats compressing the finished PDF.
Ghostscript (free, command line)gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out.pdf in.pdf. The settings /screen, /ebook, /printer and /prepress trade size against quality.
Adobe AcrobatFile → Save as Other → Reduced Size PDF, or the PDF Optimizer for control over images and fonts.
LibreOfficeWhen exporting to PDF, set the JPEG quality and image resolution in the export options.
Fix the figures at the sourceFor LaTeX or reference-manager output, save figures at the needed resolution (150 to 300 dots per inch) before inserting them.

Common mistakes

  • Expecting a fixed percentage. Results depend on the file. Always check the before and after sizes the tool reports.
  • Compressing again and again. Each lossy pass on a JPEG adds quality loss. Always compress from your original file, not from an already compressed copy.
  • Using Strong or Extreme on scans with small text. Zoom in on the result before you submit it. Use “Open result in a new tab to check”.
  • Overwriting the original. Keep your untouched file. The compressed download is a new file.
  • Compressing a signed or PDF/A file. Signatures break and archival conformance can be lost. See the table above.
  • Skipping the page check. The tool confirms the page count, but you should still look through the output once.

Frequently asked questions

Is my PDF uploaded anywhere?

No. Your file is read and processed in your browser and the result is created on your device. The only network request is the one-time download of the pdf-lib library from a public CDN, which does not include your file. You can confirm in the Network tab of your browser’s developer tools.

Why did my PDF not get smaller?

Most likely it contains little that this tool can shrink: mostly text and vector graphics, or images stored in formats it leaves alone. The report shows how many images were found, how many were recompressed and why others were skipped. Try a stronger preset, or use one of the other options above.

Why does the tool say it kept the original?

The result was not meaningfully smaller than your file, so offering it would be pointless or even larger. Nothing was lost, and you can try another preset.

Will the text still be selectable and searchable?

Yes. Text is not touched. In a scanned PDF the text is part of the page image, so heavy compression can make it harder to read or to recognise by OCR software.

Does it work on scanned documents?

Yes when the scan pages are stored as JPEG images, which is common for phone and office scanners. Black-and-white scans stored in other compact formats are already small and are left alone.

What is the file size limit?

100 MB. Compression runs in your device’s memory, so a very large file can be slow or can fail on a phone. Use a desktop browser for big files.

Can I compress a password-protected PDF?

No. Remove the password in your PDF program, save a copy and try again.

Further reading

  • International Organization for Standardization. (2008). ISO 32000-1: Document management, Portable document format, Part 1: PDF 1.7.
  • Wallace, G. K. (1992). The JPEG still picture compression standard. IEEE Transactions on Consumer Electronics, 38(1), xviii–xxxiv.
  • Hopding, A. (2021). pdf-lib (Version 1.17.1) [Computer software]. github.com/Hopding/pdf-lib.

Compress PDF by Xcelario, part of the Academic Tools collection. Results depend on the contents of each file. Always keep your original, check the compressed PDF before you submit it, and do not compress files that must stay digitally signed or PDF/A compliant. Last updated November 2026.