PDF optimisation

How to reduce PDF file size

Without losing too much quality

Where the bytes in a PDF actually go – images, fonts, file structure – and how downsampling, re-encoding and a clean re-save shrink a file while text, fonts and vector graphics stay sharp.

On this page

Quick answer: Most of a large PDF is pictures, so the way to shrink it without wrecking it is to reduce the resolution of oversized images, re-encode them as JPEG at a moderate quality and re-save the file with a compact structure – while leaving text, fonts and vector drawings exactly as they are. The Compress PDF tool does this in your browser with four profiles; start with Balanced, compare the before-and-after sizes it reports, and only move to a stronger profile if the result is still too big for its destination.

Where the bytes in a PDF actually go

A PDF file is a container for several quite different kinds of data, and they respond to compression in completely different ways. Before choosing a setting it helps to know what you are dealing with.

Component What it is Typical share of a large file Can it be made smaller?
Raster images Scans, photos, screenshots and logos stored as pixel grids Usually the overwhelming majority Yes – fewer pixels, lower JPEG quality
Fonts Embedded font programs, one per typeface used (or per subset) Small, unless many or East Asian fonts are embedded Only by subsetting, which this compressor does not do
Page content streams The drawing instructions for text and vector graphics Small, except in maps, CAD and chart-heavy files Already compressed with Flate; little to gain
File structure Object dictionaries, cross-reference tables, superseded objects from earlier saves A few percent, more for files saved many times Yes – a clean re-save with object streams
Metadata and thumbnails XMP metadata, document info, embedded page thumbnails Small, but pure dead weight Yes – thumbnails removed, metadata optionally removed
Attachments and media Embedded files, audio, video, 3D Anything Only by removing them in an editor

A scanned contract is almost entirely images; a report exported from a word processor is text, fonts and a few figures; a product catalogue is both. The same compressor gives these three files wildly different savings, and that is expected rather than a fault.

Raster images: about 85 %; File structure and old objects: about 6 %; Embedded fonts: about 4 %; Page content streams: about 3 %; Metadata and thumbnails: about 2 %Raster imagesabout 85 %100%File structure and old objectsabout 6 %Embedded fontsabout 4 %Page content streamsabout 3 %Metadata and thumbnailsabout 2 %
Where the bytes typically go in a large, image-heavy PDF (illustrative proportions). Only the image share responds to a compressor; the rest is small and mostly worth keeping as it is.

Finding out what is making your file large

Two quick checks tell you most of what you need. Divide the file size by the page count – the PDF page counter gives the count without opening the file in a viewer. A text document with a few hundred kilobytes per page is image-heavy; a document with a few tens of kilobytes per page is already lean and will not shrink much.

Then find out whether the pages are scans or real text. Try selecting text in a viewer, or run the file through the PDF text extractor: if nothing comes back, the pages are pictures and compression will be very effective; if the full text comes back, the file is at least partly "born digital" and the savings will come from whatever images it contains. The guide to scanned versus searchable PDFs explains the difference in depth. Finally, the PDF metadata viewer shows the producing application, which often explains oddities – an old scanner driver, for instance, may store every page as an uncompressed bitmap.

Lossless savings: structure, thumbnails and metadata

The first lever costs no quality at all. Every time a PDF is edited and saved by many applications, the changes are appended to the end of the file as an incremental update, leaving the old versions of the modified objects in place. A document that has been annotated, signed, re-saved and annotated again can carry several generations of itself. Re-writing the file from scratch keeps only the current version of every object.

PDF 1.5 introduced object streams, which let the many small dictionaries that describe pages, fonts and annotations be packed together and compressed with Flate, the same DEFLATE algorithm used by ZIP and PNG. Files written without object streams – common among older producers and some scanners – shrink noticeably when re-saved with them. Embedded page thumbnails are another relic: every modern viewer generates its own, so stored thumbnails are wasted bytes and can be removed safely.

The Lossless profile does exactly these things and nothing else: it rewrites the structure with object streams, drops stored thumbnails and, if you tick the option, removes document metadata such as title, author and the XMP block. Images are not touched. Use it for anything you cannot afford to degrade – contracts, archival copies, files with precise diagrams – and accept that on an already well-written file the saving may be small or zero. The tool tells you when the result is not smaller and lets you keep the original, which is more useful than a fabricated percentage.

Downsampling versus re-encoding

The lossy profiles pull two separate levers on each image, and it is worth understanding both because they do different things.

Downsampling reduces the number of pixels. An A4 or Letter page scanned at 300 dots per inch is around 3,300–3,500 pixels along its long edge; shown on a laptop screen, most of those pixels are never seen. Shrinking the image to around 1,800 pixels keeps every character legible (about 150 pixels per inch on the page) while cutting the pixel count to roughly a quarter. Because JPEG file size scales roughly with pixel count, this is where the largest savings come from, and it is why scans compress so dramatically compared with documents whose images are already small.

Re-encoding keeps the pixels but writes them with stronger JPEG compression. JPEG works on 8×8 blocks, converting each to frequency components and rounding them; a lower quality setting rounds harder, discarding fine detail that the eye does not easily miss. An image stored uncompressed or with Flate (which is what a PNG-like image inside a PDF looks like) converts to JPEG with a large saving at any quality; a JPEG already saved at a modest quality gains little from being re-encoded, because the detail is already gone.

The profiles combine the two levers like this:

Profile Longest image edge JPEG quality (0–100) Images skipped as not worth touching Intended for
Lossless unchanged – all Structure clean-up only; nothing visible changes
Balanced 1,800 px about 78 JPEGs under about 12 KB Email and sharing; scans stay readable at normal zoom
Strong 1,300 px about 64 JPEGs under about 6 KB Mostly-text documents with incidental images
Extreme 1,000 px 50 JPEGs under about 3 KB Quick previews where legibility matters more than looks

Three safety rules apply to every lossy profile. A re-encoded image replaces the original only if the new version is meaningfully smaller; if the JPEG encoder produces something nearly as large as what was there, the original bytes are kept, so an image never gets worse for nothing. Very small images are left alone, because the saving would be negligible and logos tend to suffer visibly. And images that carry a transparency mask are re-encoded at their original pixel size, since shrinking them would misalign the mask that cuts them out.

What stays sharp and what does not

Nothing in the compressor ever converts text or vector graphics to pixels. Fonts remain embedded exactly as they were, text remains selectable and searchable, lines in diagrams stay crisp at any zoom, and form fields, annotations, bookmarks and accessibility tags are carried through unchanged. Whatever profile you choose, a page of text looks identical before and after.

What does change is the detail inside raster images. On a scan, Balanced is hard to tell from the original at reading size; small print in Strong starts to look slightly soft; Extreme shows the familiar JPEG blockiness around letters when you zoom in. Photographs behave the same way as they would in an image compressor: smooth areas survive well, fine texture and sharp high-contrast edges are where artefacts appear first. The guide to image compression explains what the quality number does to a picture, and the explanation applies unchanged to pictures inside a PDF.

There is one more category: images the compressor leaves alone because it cannot re-encode them safely in a browser. JPEG 2000, JBIG2 and CCITT fax images, CMYK and indexed-colour images and 16-bit images are kept as they are and listed in the report. A file dominated by those will not shrink much; why PDF compression sometimes fails covers each case and what to try instead.

Choosing a profile for the job

Start from the destination, not from the file.

  • Keeping a copy for your records or for print: Lossless. If the size is not a problem, do not pay for savings in quality.
  • Emailing or uploading to a portal with a limit: Balanced first. If it is still too large, Strong. If Strong is still too large, consider splitting the document rather than dropping to Extreme; two readable attachments beat one unreadable one. Preparing PDFs for email lays out that decision step by step.
  • A text report with a handful of figures: Strong is usually safe, because the text is untouched and the figures are not what the reader is studying.
  • Photographs people will zoom into – portfolios, inspection reports, product sheets: Balanced, and compare a zoomed-in area of the result with the original before sending.
  • A thumbnail-grade preview of a long scan: Extreme, with the understanding that it is a preview.

Whatever you choose, read the numbers the tool reports: the original size, the new size, how many images were re-encoded and how many were skipped.

Try it: Compress PDF – start with Balanced and compare the before and after sizes.

Compressing before the PDF exists

If you are the one creating the PDF, the cheapest compression happens upstream. Scan at 200–300 dots per inch in greyscale rather than 600 in colour unless colour carries meaning. Resize and compress photographs with an image compressor before placing them in a document, so the authoring application does not embed a 12-megapixel original behind a thumbnail-sized frame. And when exporting from an office application, pick the "minimum size" or "web" preset rather than "print" if the document is going to be read on screen. A PDF built from sensibly sized images rarely needs compressing at all, and when it does, the lossy profiles have less to do and change less.

Frequently asked questions

Will compressing a PDF make the text blurry?

No. Text and vector graphics are never rasterised; only pictures stored as pixel grids are changed. A page of text is identical before and after compression, remains selectable and searchable, and prints exactly as sharply. Scanned pages are the exception, because on a scan the "text" is itself a picture, and stronger profiles will soften it.

Why did my PDF only shrink by a few percent?

Because there was little to remove. The file was probably already well optimised, or its size comes from embedded fonts, vector drawings or image types such as JPEG 2000 and JBIG2 that a browser cannot safely re-encode. The report under the result lists what was found and what was skipped; the guide on why PDF compression sometimes fails explains each case.

Which profile should I use for email?

Balanced. It brings scans and photo-heavy documents down substantially while keeping them readable at normal zoom, and most attachment limits are comfortably met. Use Strong for documents that are mostly text, and if even Strong is too large, split the document into two attachments rather than using Extreme on something people need to read.

Sources and further reading

About the author

HelpMeJPG editorial teamEditorial team

The people who build and maintain the HelpMeJPG tools. Guides are written from the tools' own behaviour and the standards they implement, and are revised whenever a tool changes.