LocalTools All tools →

Compress PDF

Smart mode preserves text. Rasterise mode targets a specific size. Everything runs in your browser — nothing is uploaded.

Upload a PDF

⬆
Drop a PDF here or click to browse

Choose Smart or Rasterise mode after uploading

No watermark · No upload · Works offline

Compress PDF — free, in your browser

This is a full PDF compressor that runs entirely in your browser. It has two modes: Smart compression for documents where you need to keep text selectable, and Rasterise mode for scanned documents and photo-heavy PDFs, with an option to target an exact file size. Everything runs locally using JavaScript, so contracts, tax documents, medical records and legal filings never leave your device.

Unlike most online PDF compressors that upload your file to a server, keep it for hours, watermark the output, or require an account, this tool reads the PDF into memory on your machine, re-encodes it, and writes a new file back to disk. You can disconnect from the internet after the page loads and keep compressing.

How to compress a PDF

  1. Open the PDF. Drop a file onto the drop zone or click to browse. Page count and file size display automatically.
  2. Choose a mode. Smart mode preserves text and only re-encodes embedded images. Rasterise mode renders every page as an image and can target a specific size.
  3. Set the options. In Smart mode, choose image quality and max dimension. In Rasterise mode, either set a target file size or pick a quality preset.
  4. Compress. Click Compress PDF. In Rasterise target mode, a progress bar shows each attempt as the tool searches for the best fit under your target.
  5. Review and download. See a size comparison with the source, the target, and the result. Click Download compressed PDF to save the file.

Which mode should you use?

The right mode depends entirely on what's inside your PDF:

PDF containsUseTypical savings
Text only (report, contract, invoice)Smart5–15%
Text + embedded imagesSmart20–40%
Scanned document (image of pages)Rasterise60–90%
Photo book, brochure, portfolioRasterise50–80%
Technical drawings, CAD exportsSmart10–25%

If you're unsure, open the PDF in a viewer and try to select text with your mouse. If you can highlight words, it's a text PDF — use Smart mode. If nothing highlights, it's a scan — use Rasterise mode.

Why text-only PDFs don't shrink much

This is the most misunderstood fact about PDF compression, so it's worth stating plainly: text-only PDFs cannot be meaningfully compressed.

PDFs store text as compact character codes, not as images. A PDF with 100 pages of pure text is often only 200–400 KB, and most of that is the fonts and structure, not the text itself. There is nothing to compress — the file is already near its theoretical minimum.

The only savings in a text-only PDF come from stripping metadata (title, author, creation date, producer info) and any embedded thumbnails. Together that's typically 5–15% of the total. No tool — including Adobe Acrobat Pro, which charges a monthly fee — can shrink a text-only PDF by 90% without either rasterising it (destroying the text layer) or removing content.

Any tool that claims to compress a text PDF from 10 MB to 100 KB is either: (a) rasterising it and converting it to images, (b) removing pages, or (c) misleading you. This tool tells you the truth and lets you choose.

How Smart mode works

Smart compression uses pdf-lib, an open-source JavaScript library. When you click Compress PDF in Smart mode, the tool:

  1. Loads the PDF into memory as a structured object.
  2. Strips metadata fields: title, author, subject, keywords, producer, creator. These fields often contain the original software name and OS info — removing them saves a few KB and improves privacy.
  3. Drops unused objects and re-writes the file with cross-reference object streams, which compresses the file's internal structure.
  4. Writes the result back as a new PDF.

Text, vector graphics, form fields, hyperlinks, bookmarks and annotations are preserved exactly as they were. The output is a fully functional PDF that opens in any reader.

How Rasterise mode works

Rasterise mode uses pdf.js (Mozilla) to render each page to a canvas, then encodes the canvas as a JPEG. The process is:

  1. Renders every page once at maximum quality (200 DPI) and caches the canvas. This is the slow step.
  2. In Target size mode, tests a grid of quality × DPI combinations from highest to lowest: 98% at 200 DPI, then 95% at 200, down through dozens of combinations to 20% at 72 DPI.
  3. For each attempt, encodes all pages as JPEGs at that quality, embeds them into a new PDF, and measures the output size.
  4. Stops at the first attempt at or below your target plus tolerance.
  5. Never returns a result smaller than the target if a larger result was available — you get the best quality that fits.

The result is a PDF where every page is a single JPEG image. Text is no longer selectable, links are gone, form fields are gone, bookmarks are gone. The trade-off is dramatic size reduction for scan-heavy documents.

How the target size search works

When you set a target of, say, 1 MB with 10% tolerance, the tool interprets that as: "give me the largest result between 1.0 MB and 1.1 MB." Here's why this matters:

  • Naive compressors stop at the first attempt below your target. That might give you 0.7 MB — smaller than you asked for, and lower quality than you could have had.
  • This tool keeps searching up to the target. If quality 82% gives 1.05 MB and quality 80% gives 0.99 MB, it returns the 82% version — closer to your target and higher quality.
  • If the search overshoots — meaning the next-lower attempt drops way below the target — the tool returns the smallest result above the target, and tells you clearly why.

No raster-based compressor can hit an arbitrary byte count exactly, because compression is discrete. But this tool gets as close as physically possible from above, and never silently degrades below your target.

Common uses

  • Email attachment limits. Gmail, Outlook and most corporate email systems cap attachments at 10–25 MB. Compress to fit.
  • Upload limits on forms. Government portals, university applications and job sites often cap uploads at 1–5 MB.
  • Cloud storage. Reduce storage footprint for archival PDFs you rarely access.
  • Faster sharing. Smaller files upload and download faster, especially on mobile connections.
  • Website speed. If you host PDFs for download, compressed files reduce bandwidth and improve page speed.
  • Scanned receipts and invoices. Rasterise mode can shrink 20 MB scans down to under 1 MB with minimal visual loss.
  • Photo books and brochures. High-resolution photo PDFs respond well to quality reduction.
  • Meeting notes and reports. Even Smart mode's modest savings add up when archiving thousands of documents.

Your privacy is protected

Every operation happens in your browser. The PDF is read into memory, re-encoded, and written back to disk by your own device. No PDF is ever sent to any server, logged, or retained.

The only network requests the page makes are for two open-source libraries — pdf-lib for building the output and Mozilla's pdf.js for rasterising pages — both loaded from a public CDN when the page first opens. After that, the tool works entirely offline. You can disconnect from the internet and keep compressing.

This makes the tool safe for documents you'd never upload to a cloud service: contracts, medical records, tax returns, bank statements, legal filings, signed agreements, ID documents, personnel files.

What this tool can't do

Being honest about limits is more useful than pretending they don't exist. This tool does not:

  • Compress text-only PDFs by more than 15%. This is a physical property of how PDFs store text, not a limitation of this tool. See the section above.
  • Run OCR. Scanned PDFs stay scanned after compression. Use a separate OCR tool first if you want searchable text in the output.
  • Preserve text in Rasterise mode. Rasterising replaces text with images. Use Smart mode if text must stay selectable.
  • Compress multiple PDFs at once. Run the tool once per file.
  • Compress password-protected PDFs. If the PDF requires a password to open, remove it first with a tool like qpdf.
  • Restore quality after compression. Compression is one-way. The original PDF stays untouched on your device, so keep it as a backup.
  • Match Adobe Acrobat's advanced compression. Acrobat uses proprietary algorithms for re-encoding fonts and vector graphics. For most use cases, this tool gets within 10% of Acrobat's output — for free.
  • Handle 500+ MB PDFs. Browser memory limits make anything over about 200 MB unreliable on mobile, 500 MB on desktop.

Troubleshooting

  • "PDF-lib not loaded" — the CDN is blocked or you're offline before the first page load. Refresh the page once. After that, the tool works offline.
  • Smart mode produced almost no savings — your PDF is text-only. This is expected. Try Rasterise mode if you can accept losing text selection.
  • Rasterise mode produced a bigger file — your PDF is mostly text and vector graphics. Replacing compact text with pixels always increases size. Use Smart mode.
  • Target size search runs forever — the PDF is very large, or the target is unreachably small. Close the tab, reload, and try a higher target. Below 200 KB for a multi-page scan is usually not achievable.
  • Compressed PDF is blurry — Rasterise mode was used at too low a quality or DPI. Try a higher quality setting, or use Smart mode instead.
  • Text can no longer be selected — Rasterise mode was used. Rerun with Smart mode to preserve text.
  • Compressed PDF won't open — rare, but possible with corrupted source files. Verify the original opens correctly first.
  • Compression is slow — Rasterise mode on a large PDF takes 30–90 seconds. Rasterising 100 pages at 200 DPI on a laptop is CPU-bound. Wait for the progress bar.
  • Mobile browser crashes — the PDF is too large for the device's memory. Compress on desktop, or split the PDF into parts first.

Common questions

Why doesn't Smart mode compress text PDFs much?

Text in PDFs is already stored compactly as character codes. Without embedded images to re-encode, the only savings come from stripping metadata. Text PDFs compress typically by 5–15%, not 90%.

What does target size do?

In Rasterise mode, the tool tries different quality and DPI combinations until the output fits under your target plus tolerance, while staying as close to the target as possible from above.

Can I get exactly the target size?

Not exactly — compression is discrete, so the tool picks the closest attempt at or under target + tolerance. That's the honest answer for any raster-based compressor.

Will text stay selectable?

Yes in Smart mode. No in Rasterise mode.

Are my PDFs uploaded?

No. Everything happens in your browser. Your file never leaves your device.

Which mode should I use?

Smart mode for text-based PDFs, contracts, reports, invoices and any document where you need to select text. Rasterise mode for scanned documents, photo books and image-heavy PDFs.

Why does Rasterise mode sometimes make files bigger?

If the PDF contains mostly text and vector graphics, rasterising it replaces compact text with pixel data, which can increase file size. Rasterise mode is only for scanned and image-heavy PDFs.

Does compressing reduce the quality?

In Smart mode, only embedded images are re-encoded. Text, vector graphics and links are preserved at full quality. In Rasterise mode, quality depends on the JPEG quality and DPI you choose.

Can I compress a password-protected PDF?

Not if the PDF requires a password to open. If it only has print or edit restrictions, compression usually works.

What is the smallest possible PDF size?

It depends on the content. A single-page text PDF can be reduced to a few kilobytes by stripping metadata. A 100-page photo book will bottom out around 500 KB to 2 MB depending on image content.

Does it work on iPhone and Android?

Yes. It runs in Safari on iOS and Chrome on Android. Very large PDFs may be slower on older phones.

Can I compress multiple PDFs at once?

Not currently. Compress one at a time. For batch compression, run the tool once per file.

What happens to form fields and links?

In Smart mode, form fields, hyperlinks, bookmarks and annotations are preserved because pages are copied as-is and only embedded images are re-encoded. In Rasterise mode, all of these are lost because pages become flat images.

How long does compression take?

Smart mode takes a few seconds for most PDFs. Rasterise mode takes longer because each page is rendered. A 100-page scan typically takes 30 to 90 seconds depending on your device.

Does it work offline?

Yes. After the page loads once, the tool works entirely offline. Disconnect from the internet and keep compressing.

How is this different from Adobe Acrobat?

For compression, nothing — it does the same job. Acrobat offers advanced features like OCR and form creation, but for reducing PDF file size this tool matches it for free and without uploading.