Compress PDF — text stays sharp, images get lighter

Drop in a PDF and the tool finds the images inside it, re-encodes them as smaller JPEGs, and saves the document with everything else untouched. Text, tables, vector shapes and fonts stay exactly as they were, so search and copy keep working and the page count never changes. Pick one of three strengths, process several files in one go, and download them together as a ZIP. Everything runs in your browser; nothing is uploaded.

How to use

  1. Drag PDFs onto the box or use [Choose files]. Several at once is fine.
  2. Pick a strength. Recommended suits email; Light is safer if the document will be printed.
  3. Press [Compress] and let the per-image progress finish.
  4. Check the before and after size on each row and download. Two or more files can be taken as one ZIP.

A document with almost no images only shrinks by a few percent. Text-only contracts and papers are like that because they are already small. If the result is not smaller than the original, you get the original back.

In depth

Where PDF file size comes from

A PDF page holds drawing instructions for text, the fonts, and images. Text instructions are a few kilobytes per page. A subsetted font is usually under a hundred kilobytes.

Images carry the bulk. A phone photo is 3 to 5 MB. An A4 page scanned in colour at 300 dpi is over 20 MB of pixels, and many authoring programs store that raw or barely compressed.

So “this PDF is too big” almost always means “the images inside are too big”. That is why this tool looks only at the images.

What the tool does, and what it leaves alone

It does two things. If an image is larger than the pixel cap for the chosen strength, it is scaled down proportionally. Then it is re-encoded as a JPEG at the chosen quality. The new stream replaces the old one only when it is clearly smaller; otherwise the original image stays.

It leaves a great deal alone. Text operators, fonts, vector shapes such as tables and rules, links, bookmarks and form fields are not modified by a single byte. Pages are never rasterised.

At the end the document is saved with object streams. Dictionaries and references get compressed, so even an image-free document loses a few percent. Leftover data from earlier incremental saves disappears at the same time.

Choosing between the three strengths

Each strength is two numbers: a JPEG quality and a cap on the image's long edge in pixels. Quality decides how much colour and detail the encoder discards at the same pixel count; the cap reduces the pixel count itself, and usually matters more.

Recommended (quality 72, 1600px) is the default. That is roughly 190 dpi across an A4 page, indistinguishable from the original on screen and fine on an office printer.

Light (quality 85, 2400px) is for photographs whose texture matters or files going to a print shop. Strong (quality 55, 1100px) is for hard limits such as “under 10 MB”. Smooth areas like skies and skin start to show banding, so open the result before you send it.

Scans, photo documents and text-only documents

Scanned documents benefit most, since every page is one large image. A colour contract scanned at 300 dpi typically drops 70 to 85% at Recommended. Text stays legible down to a long edge of about 1100px, so Strong is usable too.

Reports and portfolios with photographs shrink in a similar way. The text next to the photos is vector and stays crisp.

Text-only documents are already small. A 5% saving on such a file is normal, and getting more would mean re-subsetting fonts, which this tool does not do.

Images that are left as they are

Some images would grow or change meaning as JPEG, so they are skipped. Indexed (palette) images and 1-bit black-and-white images are diagrams, logos and monochrome scans; JPEG handles flat colour badly and only adds blotches.

CMYK images are for print and could shift colour, so they stay. JPEG 2000 (JPX), fax compression (CCITT) and JBIG2 cannot be decoded to pixels by the browser and are passed through.

Soft masks, which carry transparency, are never turned into JPEG. Lossy artefacts in the alpha channel make edges ragged. They are only scaled to the cap and stored losslessly again. Images with a colour-key mask and streams under 8 KB are also left alone.

Hitting an attachment limit

Email usually allows 25 MB of attachments in total, and a receiving server may bounce anything over 10 MB. Government, university and job-application portals commonly cap uploads between 5 and 20 MB.

Run Recommended first. If that is not enough, run Strong. If the file is still too large, splitting the document beats cutting quality further: “Split PDF” breaks it into page ranges you can send separately.

Compressing the same file twice barely helps. The first pass already brought the images under the cap.

When you need to go further

If the text does not need to be selectable, the whole page can become a picture. Export the pages with “PDF to JPG” and rebuild with “Images to PDF”; vectors and fonts turn into pixels too, and the file can get smaller still. Flyers, posters and exported slides are the typical case.

The cost is real. Text can no longer be selected or searched, screen readers cannot read it, and it blurs when zoomed. Do not do this to contracts, papers or forms.

Everything runs in the browser

pdf-lib parses and writes the PDF; the browser canvas decodes images and encodes JPEG. Both ship with this site, so no external server is called and the document never leaves your device.

That is also where the limits come from. The whole document plus one image's pixels must fit in memory, so a scan of several hundred megabytes can stall a phone. Use a desktop for those, or split the document first.

FAQ

Will text get blurry or stop being searchable?

No. Only image streams are replaced. Text, fonts and vector drawing are not touched, so search, copy and screen readers work exactly as before.

How much smaller will it get?

Documents full of photos typically lose between half and 90% of their size, and scans behave the same. A text-only document has no images to shrink, so it only drops a few percent. The saving depends on how large and how loosely compressed the original images were.

Which strength should I choose?

Recommended (quality 72, long edge 1600px) fits documents read on screen and sent by email. Choose Light (quality 85, 2400px) when the document will be printed. Strong (quality 55, 1100px) is for hitting a hard size limit; you will start to see blotching in photos.

Does it work on password-protected PDFs?

No. When a PDF has an open password, the streams inside are encrypted and the images cannot be read. Remove the password in a viewer, save a copy, and upload that.

Is my file uploaded anywhere?

No. Reading the PDF, re-encoding the images and saving all happen in your browser. The only network traffic is the page code you download when you first open the tool. The document never leaves your device.

Method and sources

What this tool bases its numbers on, and how far those numbers go.

What this tool is
An image re-encoding tool. It does not alter text, fonts, vectors or forms, and it does not rasterise pages. It makes no promise of preserving PDF/X print profiles or PDF/A archival conformance.
Formula
Every image XObject in the document is located, and only 8-bit images that are JPEG or raw RGB/grey (Flate and similar) are selected. Images whose long edge exceeds the strength's cap are scaled proportionally, then re-encoded as JPEG at the strength's quality. A new stream replaces the old only when it is under 95% of the original size. Soft masks are only downscaled and stored losslessly. The document is then saved with object streams, and if the result is not smaller than the input, the input is returned unchanged.
Worked example
A document holding a 3000×2000px photo, run at Recommended (1600px, quality 72): the photo becomes 1600×1067px, so the pixel count falls from 6.0 MP to 1.7 MP, about 28%. JPEG re-encoding on top usually leaves that image stream at 10 to 20% of its original size.
Limitations
  • Only images shrink. Documents that are mostly text, fonts and vectors lose only a few percent. Font re-subsetting and vector simplification are not performed.
  • Indexed, 1-bit, CMYK, JPX, CCITT and JBIG2 images are passed through. Monochrome scans and print-ready files may barely change.
  • The compression is lossy. Strong can show banding and blocking in smooth areas, and discarded detail never comes back. Keep the original and check the result.
  • PDFs with an open password cannot be processed. Damaged or non-conforming files may fail.
  • Memory is finite. Very large documents (hundreds of megabytes) or giant images can stall a mobile browser.
Effective date
Last reviewed

Related tools

  • Image Compressor — Compress and resize images right in your browser.
  • PDF Merge — Combine PDFs in your browser — no upload.
  • GIF Maker — Combine images into an animated GIF, right in your browser.
  • Image to PDF — Combine photos into one PDF, right in your browser.