How-To GuidesMarch 24, 2026
Meidy Baffou·LazyPDF

How to Compress PDFs Offline with Desktop Tools

Large PDF files cause real problems: email systems reject attachments over 10 or 25 MB, file storage fills up quickly, and slow internet connections make uploading or sharing large PDFs painful. PDF compression reduces file size — sometimes dramatically — by optimizing images, removing redundant data, and restructuring the document. Most people think of cloud services when they think of PDF compression. Upload the file, wait for the server to process it, download the compressed result. That workflow is convenient when it works, but it has real drawbacks. You must have internet. You must trust the service with potentially sensitive document content. And for very large files, the upload itself can take longer than the compression. Offline PDF compression is a genuine and effective alternative. Desktop tools and applications installed locally can compress PDFs without any internet connection. Some browser-based tools also offer meaningful compression for common document types. Understanding which approach is right for your situation — and which tools deliver the best compression ratio — is what this guide covers in full. Whether you are running Windows, macOS, or Linux, there are offline compression solutions that are free, effective, and private. This guide covers the most reliable options and gives you clear step-by-step instructions for each.

Best Desktop Tools for Offline PDF Compression

Several desktop applications compress PDFs effectively without requiring an internet connection. Each has different strengths, platform availability, and compression quality. **Ghostscript** (Windows, Mac, Linux — free): Ghostscript is the gold standard for offline PDF compression. It is a command-line tool used by professional publishing workflows and document management systems worldwide. Ghostscript supports multiple compression presets: `/screen` (lowest quality, smallest file), `/ebook` (medium quality, significant size reduction), `/printer` (high quality, moderate reduction), and `/prepress` (lossless, minimal reduction). For typical office documents, `/ebook` provides an excellent balance between quality and file size. **Preview on macOS** (built-in, free): macOS Preview can compress PDFs using its export function with reduced image quality settings. The compression is not as aggressive as Ghostscript, but it requires no installation and works entirely offline. Go to File → Export as PDF → Quartz Filter → Reduce File Size. **LibreOffice** (Windows, Mac, Linux — free): LibreOffice can open and re-export PDFs with compression settings. It is particularly effective for PDFs that were originally created from office documents. **Adobe Acrobat** (paid): Adobe Acrobat Pro's offline compression is thorough and reliable. The Optimize PDF tool gives detailed control over image downsampling, compression method, and object compression. It is the most powerful offline compression option but requires a subscription.

  1. 1Download and install Ghostscript from ghostscript.com for your operating system — it is free and open-source.
  2. 2Open a terminal (Command Prompt on Windows, Terminal on Mac/Linux).
  3. 3Run the compression command: gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed.pdf input.pdf
  4. 4Adjust /ebook to /screen for maximum compression or /printer for higher quality.
  5. 5Check the output file size and open the result to verify quality before deleting the original.

Browser-Based Offline Compression Options

Browser-based PDF compression is a middle ground between dedicated desktop software and cloud services. The key distinction: some browser tools process files on a server (requiring internet), while others run entirely in the browser (working offline after initial load). True offline browser compression is limited compared to Ghostscript because the browser environment cannot call native compression libraries like Ghostscript directly. However, browser-based tools can perform meaningful optimizations for PDFs that contain uncompressed images or redundant data. LazyPDF's compression tool is server-side and uses Ghostscript for maximum compression quality — this requires internet. However, LazyPDF's client-side tools (merge, split, organize) can indirectly help with file size. For example, splitting a large document into sections, removing unnecessary pages, and re-merging produces a smaller file without server-side compression. For PDFs that are large primarily because they contain many pages — not because of large embedded images — removing unnecessary pages offline can achieve significant size reduction. A 200-page PDF with only 80 relevant pages becomes dramatically smaller when the other 120 pages are removed using an offline split or organize tool. This approach — size reduction through page removal rather than compression — works entirely offline, preserves image quality, and is often faster than full compression for documents with many irrelevant pages.

  1. 1Open the PDF and identify pages that are not needed — blank pages, duplicate content, appendices.
  2. 2Use an offline browser-based split or organize tool to remove unnecessary pages.
  3. 3If the PDF still needs further compression after page removal, use a desktop tool like Ghostscript.
  4. 4For image-heavy PDFs, consider extracting and re-optimizing images separately using image editing software.

Choosing the Right Compression Level Offline

Compression level is not a single dial — it is a trade-off between file size, visual quality, and purpose. Choosing the wrong compression level means either files that are still too large, or document quality that is unacceptably degraded. For **email attachments and sharing**: Use moderate compression (Ghostscript `/ebook` preset or equivalent). Target file size of 1–3 MB for typical office documents. This level preserves readability at normal zoom levels while dramatically reducing size. For **archival storage**: Use minimal compression or lossless compression. The goal is long-term preservation — you do not want to re-compress an archive copy years later because the quality degraded too far. Use `/printer` or `/prepress` settings in Ghostscript, or use PDF/A format for archival compliance. For **mobile viewing**: Use aggressive compression (Ghostscript `/screen`). Mobile networks are slower and storage is limited. A PDF for mobile consumption does not need print-quality resolution — 96 to 150 DPI is sufficient for comfortable reading on phone screens. For **print production**: Do not compress. Print shops need original resolution files. If file size is an issue for delivery, use a file transfer service rather than compressing and degrading the document. Always keep the original uncompressed file. Compression is lossy — once you compress a PDF and delete the original, recovering the original quality is impossible. Maintain an originals folder separate from your compressed working copies.

Batch Compressing Multiple PDFs Offline

When you have dozens or hundreds of PDFs to compress, manual one-at-a-time processing becomes impractical. Desktop tools — especially command-line tools like Ghostscript — excel at batch processing. Ghostscript can be scripted. On Windows, you can write a PowerShell script or batch file that loops through a folder and compresses every PDF. On Mac and Linux, a simple bash script handles the same task. This approach lets you start a batch job before leaving the office, and return to find hundreds of compressed PDFs ready. The basic bash loop for compressing all PDFs in a folder looks like this: iterate over each .pdf file in the current directory, run Ghostscript with your chosen settings, and save the output with a modified name (such as adding -compressed to the filename). This preserves originals while creating compressed copies. On Windows, PowerShell scripts can call Ghostscript similarly. The Windows version of Ghostscript (gswin64c.exe) accepts the same command-line arguments as the Unix version. PowerShell loops and string formatting work cleanly with Ghostscript paths and filenames. Batch compression is also valuable for backlog cleanup. Many organizations accumulate years of PDF documents that were never compressed. A single offline batch job run over a weekend can dramatically reduce storage usage without any risk to original content — if you keep backups first.

Frequently Asked Questions

Can I compress PDFs offline without installing any software?

You can reduce PDF file size offline without installing software by using macOS Preview's built-in export with Quartz Filter (Reduce File Size option), or by removing unnecessary pages using a browser-based organize or split tool that processes files client-side. For full Ghostscript-quality compression without installation, you need either an internet connection for a cloud service or a separately installed tool. The macOS Preview approach is accessible without installation and often achieves 40–60% size reduction for image-heavy documents.

How much can Ghostscript reduce a PDF file size offline?

Ghostscript compression results vary significantly based on the PDF content. For PDFs created from high-resolution scanned images, the /ebook preset can reduce file size by 70–90%. For PDFs created from vector-based office documents with few images, compression may achieve 20–40% reduction. For PDFs that were already compressed or optimized, Ghostscript may achieve little additional reduction. The most dramatic results come from high-DPI scanned documents where image downsampling from 300 DPI to 150 DPI creates massive size reductions.

Does offline PDF compression affect document quality or readability?

Yes, lossy compression methods (like Ghostscript's /screen and /ebook presets) reduce image resolution and may introduce JPEG artifacts in heavily compressed images. The effect depends on compression level and original content. For text-only PDFs, even aggressive compression rarely causes readability issues because text is stored as vector data, not rasterized images. For scanned PDFs where everything is an image, aggressive compression can make text fuzzy at high zoom levels. Always preview the compressed output at 100% zoom before discarding the original.

Which offline compression tool gives the best results on Mac?

On Mac, Ghostscript installed via Homebrew (brew install ghostscript) provides the best compression results and most control. It is free, open-source, and produces smaller files than macOS Preview's built-in compression. For users who prefer a graphical interface and do not want to use the terminal, PDF Squeezer is a paid Mac app that uses Ghostscript under the hood with a simple drag-and-drop interface. macOS Preview's built-in Quartz Filter approach is the easiest no-installation option but generally achieves less compression than Ghostscript.

Need to compress a PDF quickly online? LazyPDF's compression tool uses professional Ghostscript processing to dramatically reduce file size while maintaining quality.

Try It Free

Related Articles