Skip to main content
L
Loopaloo
Buy Us a Coffee
All ToolsImage ProcessingAudio ProcessingVideo ProcessingDocument & TextPDF ToolsCSV & Data AnalysisConverters & EncodersWeb ToolsMath & ScienceGames
Guides & BlogAboutContact
Buy Us a Coffee
L
Loopaloo

Free online tools for developers, designers, and content creators. All processing happens entirely in your browser - your files never leave your device. No uploads, no accounts, complete privacy.

support@loopaloo.com

Tool Categories

  • Image Tools
  • Audio Tools
  • Video Tools
  • Document & Text
  • PDF Tools
  • CSV & Data
  • Converters
  • Web Tools
  • Math & Science
  • Games

Company

  • About Us
  • Contact
  • Blog
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

Support

Buy Us a Coffee

© 2026 Loopaloo. All rights reserved. Built with privacy in mind.

Privacy|Terms|Disclaimer
  1. Home
  2. PDF Tools
  3. PDF Compressor
Add to favorites

PDF Compressor

Reduce PDF file size with quality control

This compressor reduces file size by rasterizing each page. It renders every page to a canvas with PDF.js and re-embeds it as a single flattened JPEG image, so the whole page becomes one picture. That is an important tradeoff to understand up front: because each page is turned into an image, selectable text and crisp vector graphics are NOT preserved, text in the output cannot be highlighted or copied and will soften if you zoom in far. The upside is reliable, predictable size reduction, especially for image-heavy or scan-style PDFs where text selection was never the point. The compression level (a 0-100 slider, also exposed as Web/Screen, E-book, Print, and High Quality presets) controls both the JPEG quality and the render scale. The render scale is not a single fixed value: lighter non-zero settings render at up to about 2x the base page size for more detail, while heavier settings (level 50 and above) drop to a 1.5x scale, and a setting of 0 skips rasterizing entirely and simply re-saves the original PDF (the only mode that keeps live text). At every non-zero level the page is still baked into pixels rather than stored as resolution-independent glyphs. For documents where keeping live text matters, leave the slider at 0 or do not run the file through this tool at all.

PDFs never leave your deviceMore pdf toolsJump to full guide

Related reading

  • Reading and Writing PDFs in JavaScript: pdf-lib vs PDF.js9 min read
  • The Complete Guide to Working with PDFs: Edit, Optimize, and Organize18 min read

Initializing in your browser…

You might also like

Image Compressor

Compress images to reduce file size while maintaining visual quality. Supports lossy and lossless compression with real-time preview and size comparison.

Video Compressor - Reduce Video File Size Online

Compress videos up to 90% smaller without visible quality loss. Multiple quality presets, resolution scaling, and bitrate control. Perfect for email, social media, and web uploads.

PDF Signature Tool

Add your signature to PDF documents. Draw, type, or upload your signature, then position it anywhere on the page. Perfect for contracts, agreements, and official documents.

PDF Compressor: a worked example

A 28 MB brochure exceeds an upload portal’s 10 MB limit.

Input

brochure.pdf 28 MB · downsample images to 150 DPI
PDF Compressor produces

Output

brochure.pdf ≈ 7 MB, text crisp, images still print-acceptable

Most PDF bloat is over-resolution images; downsampling and re-compressing them (while leaving vector text untouched) is what produces a large size cut without fuzzy type. A preview confirms images are still acceptable before you commit.

About the PDF Compressor

This compressor reduces file size by rasterizing each page. It renders every page to a canvas with PDF.js and re-embeds it as a single flattened JPEG image, so the whole page becomes one picture. That is an important tradeoff to understand up front: because each page is turned into an image, selectable text and crisp vector graphics are NOT preserved, text in the output cannot be highlighted or copied and will soften if you zoom in far. The upside is reliable, predictable size reduction, especially for image-heavy or scan-style PDFs where text selection was never the point. The compression level (a 0-100 slider, also exposed as Web/Screen, E-book, Print, and High Quality presets) controls both the JPEG quality and the render scale. The render scale is not a single fixed value: lighter non-zero settings render at up to about 2x the base page size for more detail, while heavier settings (level 50 and above) drop to a 1.5x scale, and a setting of 0 skips rasterizing entirely and simply re-saves the original PDF (the only mode that keeps live text). At every non-zero level the page is still baked into pixels rather than stored as resolution-independent glyphs. For documents where keeping live text matters, leave the slider at 0 or do not run the file through this tool at all.

Working with your PDF

  1. 1Upload the PDF you want to compress.
  2. 2Choose a preset (Web/Screen, E-book, Print, High Quality) or set the level slider (0 leaves text intact and just re-saves).
  3. 3Preview the estimated file size reduction.
  4. 4Download the compressed PDF (note: any non-zero level flattens pages to images).

Key features

  • Compression level slider (0-100) plus quick presets
  • Level 0 re-saves without rasterizing; non-zero levels flatten each page to a JPEG
  • Render scale of 1.5x at heavier compression, up to about 2x at the lightest non-zero settings
  • Best suited to image-heavy and scanned PDFs
  • Shows before-and-after file size comparison
  • Processes files locally in the browser

Common scenarios

  • Email attachments

    Shrink a PDF below common email size limits so it can be sent without a file-sharing link.

  • Web publishing

    Reduce file size for faster downloads when hosting PDFs on a website.

  • Storage savings

    Compress archived documents to free up disk space without losing important content.

How it works

Internally the behavior depends on the slider. At level 0 the tool just calls pdf-lib's PDFDocument.save with object streams enabled, so nothing is rasterized and text and vectors are left intact (the file may or may not get smaller). For any non-zero level the tool loads the PDF with PDF.js and rebuilds it page by page: it renders each page to an HTML canvas, calls canvas.toBlob('image/jpeg', quality), and embeds the resulting JPEG with pdf-lib (embedJpg) onto a new page of the same dimensions. The two non-zero paths differ in scale and quality: at level 50 and above the canvas is rendered at 1.5x scale with JPEG quality of max(0.1, 1 - level/100) (so quality falls toward a floor of about 0.1 as compression rises); below level 50 the canvas is rendered at a higher 2.0 - level/100 scale (roughly 1.5x to 2.0x) with a higher JPEG quality of about 0.92 - level/200. There is no per-image DPI analysis, no selective "only touch oversized images" pass, and no font or object deduplication, the entire page is flattened to a photo regardless of what was on it.

The practical consequences: a text-only document may not shrink much (or could even grow) because crisp text rasterized to JPEG is not especially compressible, while a page full of high-resolution photography can shrink dramatically. In every non-zero mode the output loses selectable text and turns vector art into pixels. If after processing the file is not smaller, the tool reports that the PDF is already optimized and could not be reduced further rather than producing a larger file silently.

Because of the rasterization approach, the best fit for this tool is making image-heavy or scanned PDFs smaller for email or upload when you do not need to copy text out of them afterward. If you need to preserve selectable text, vector sharpness, or document structure, set the level to 0 or do not run the file through this compressor.

Frequently asked questions

How much smaller will my file be?

It depends heavily on the content. Image-heavy and scanned PDFs can shrink substantially, while text-only documents may shrink little or not at all because crisp text does not compress well as a JPEG.

Will the text stay selectable and sharp?

Only at compression level 0, which skips rasterizing and just re-saves the file. Any non-zero level flattens each page to a JPEG image, so text is no longer selectable or copyable and will look soft when zoomed in. If you need to keep live text, leave the slider at 0 or do not use this tool on that file.

What kind of PDF is this best for?

Image-heavy or scanned PDFs that you want to make smaller for email or upload, and where you do not need to copy text out afterward. If the file cannot be made smaller, the tool tells you it is already optimized instead of producing a larger one.

Related tools and how they differ

  • PDF to Images: Rasterizes whole pages to standalone PNG or JPEG files at a chosen DPI; use it when you want image files out, not a smaller PDF.
  • PDF Image Extractor: Pulls only the embedded photos and logos out of the pages as PNGs; use it to grab the original pictures, not to shrink the document.

Further reading

  • Reading and Writing PDFs in JavaScript: pdf-lib vs PDF.js9 min read
  • The Complete Guide to Working with PDFs: Edit, Optimize, and Organize18 min read

Private by design

PDF parsing and editing happen in your browser. Documents, and everything inside them, are never uploaded or stored remotely.