Docspira

Compress PDF

Make a PDF smaller by recompressing its images and rewriting its structure. Searchable text, vector artwork and links are kept; pages are not turned into pictures. Everything runs in your browser; your PDF is never uploaded.

Accepted format: .pdf

Your PDF is processed locally in your browser and is never uploaded. Learn more.

Compression works on the PDF's own image data and structure; it does not re-render pages as images, so text stays selectable and searchable and vector graphics stay sharp. If a PDF is already well optimised (or is mostly text), there may be little or nothing to save; in that case the original file is offered back unchanged rather than a larger one. Password-protected PDFs cannot be opened.

How this Compress PDF tool works

The PDF is processed in your browser by qpdf (Apache-2.0), compiled to WebAssembly and served from Docspira itself: no third-party CDN, and no Ghostscript. qpdf rewrites the file's object streams and, at the lossy levels, re-encodes embedded raster images to JPEG at a lower quality. It works on the PDF's object structure, not on rendered pages, so selectable text, embedded fonts, vector artwork, hyperlinks and form fields are all preserved.

A few strategies are tried and the smallest valid result is kept, but only if it is actually smaller than the file you started with. If nothing helps, you get your original file back and a note saying so. The biggest savings come from scanned or image-heavy PDFs; a text-only PDF that was already saved efficiently will barely change.

Related tools: Compress Image to Target Size, Markdown to PDF, Bulk Image Resizer.

What this tool does

Reduce a PDF's file size before attaching or sharing it.

How to use

  1. Select a PDF file.
  2. Choose the available compression level.
  3. Compress the file and download the new PDF.

What compression changes

Compression rewrites the PDF and recompresses images; inspect the downloaded result when image quality or searchable text is important.

Privacy

This tool runs in your browser; the text or file you choose is not uploaded for processing. Read the privacy details.