Skip to content
OxygenPDF
compression
file-size
privacy

How to Compress a PDF Without Losing Quality — Free

RohmanRohman12 min read
How to Compress a PDF Without Losing Quality — Free

A 20-page report with embedded images can easily hit 50MB. That's too big for most email attachments, too slow to share, and a waste of storage space. So you need to compress it.

Most people assume that means trading quality for size — blurrier photos, fuzzier text, a document that looks worse just because it's smaller. It doesn't have to. Once you know what's actually eating the space inside a PDF, you can shrink it hard without losing quality anywhere a reader would notice.

Short answer: Compressing a PDF without losing quality means fixing what's actually bloating the file — oversized images and unused font data — instead of degrading everything evenly: resample images to their real display resolution, drop unused glyphs and metadata, and treat quality reduction as a last resort.

Why PDFs Get So Large

Images

This is almost always the answer. A single high-resolution photo can easily run 5-10MB uncompressed. Scanned PDFs are the worst offenders — each page is stored as one full-page photograph, so a 20-page scan is really 20 separate images glued together.

If your PDF started life as a scan, compression can shrink it a long way, but it won't make the text searchable — the page is still a picture of text, just a smaller one. Getting the words themselves back out needs OCR, a separate step that extracts them as copyable, searchable text rather than adding a hidden layer to the PDF.

Fonts

PDFs can embed entire font files so the document looks identical on any machine, in any viewer, without depending on fonts the reader happens to have installed. A single font family with all its weights and styles can add several hundred kilobytes, and documents routinely embed three or four families between body text, headings, and code blocks.

Metadata and Cruft

Layers, form fields, bookmarks, revision history, embedded thumbnails, scanner metadata — none of it is visible on the page, and all of it takes up bytes. Scanned documents in particular tend to carry metadata nobody will ever read: the make and model of the scanner, a timestamp, sometimes a color profile repeated on every page.

If metadata removal is the actual goal — a document with no images to shrink, just years of edit history and hidden fields to clear out — Sanitize PDF does exactly that, without touching page content at all.

Duplicate Resources

Some PDF generators are lazy about deduplication. They'll embed the same logo, background image, or font file once per page instead of storing it once and referencing it everywhere it's used.

This shows up constantly in merged documents, too — five files that each embed a company letterhead become one file with five copies of the same letterhead, because merging PDFs concatenates resources rather than deduplicating them. If you just merged a batch of files and the result is unexpectedly heavy, that's often exactly why, and compression is what cleans it up afterward.

Strategies That Actually Work

These are the levers most PDF compressors — desktop or browser-based — combine to shrink a file without visibly touching quality. Which ones a given tool actually runs varies; OxygenPDF's own approach is covered in detail further down.

Image Resampling

Resolution matters more than compression level. A photo scanned or embedded at 300 DPI but displayed on a screen at 72-150 DPI is carrying four to sixteen times more pixel data than anyone will ever see rendered. Reducing the DPI to match how the image is actually displayed removes information that was already invisible — not information anyone would notice losing.

Rough guidelines: 150 DPI is plenty for on-screen reading. 200-300 DPI holds up for most printing. Higher than that is really an archival decision, not a viewing one — the Library of Congress's own preservation digitization guidelines put text and manuscript scanning at 300-400 ppi, reserving 400-600 ppi for rare or fragile originals, rather than the "as high as possible" instinct people sometimes apply to archival work.

This is the lever OxygenPDF's compressor pulls directly — its DPI setting is exactly this resampling step, applied to every picture in the file that carries more pixels than the setting allows.

Font Subsetting

If a document only uses 60 distinct characters from a font — the alphabet, numerals, basic punctuation — there's no reason to embed the font's entire character set. Subsetting keeps only the glyphs actually used and discards the rest.

A font file can technically hold up to 65,535 glyphs, because the format stores each glyph's ID in a 16-bit field, per the OpenType specification's maxp table — but that's a ceiling built into the file format, not a typical embedded count. Most fonts most documents actually use hold a few hundred to a couple of thousand glyphs in total, and a subsetted font for a single-language document can drop to well under 100.

OxygenPDF's compressor doesn't subset fonts. It leaves them exactly as they are, which is part of what keeps the text selectable — see "What Compression Actually Changes" below.

Metadata Stripping

Remove creation-software tags, edit history, embedded thumbnails, and redundant internal structure, and you typically save a few hundred kilobytes with zero visual impact, since none of it was ever rendered on the page.

Building a document from scratch, rather than editing the existing one in place, strips all of this automatically as a side effect — there's nothing left to carry over. OxygenPDF's compressor does not work that way: it edits the file it was given, so the title, author, bookmarks and form fields all come through, and only objects that nothing in the file points to any more are dropped. If the metadata is what you want gone, that is Sanitize PDF's job.

Object Stream Optimization

A PDF's internal structure — how objects are indexed, cross-referenced, and stored — can be reorganized to group related objects together and encode the cross-reference table more compactly. PDF 1.5, released in 2003, added support for exactly this: compressed object streams and cross-reference streams (per the format's version history). It's the kind of saving you never see happen, but it adds up across a document with a lot of small objects — form fields, annotations, deeply nested bookmarks.

This matters most for structurally complex, image-light PDFs. If a file is mostly vector text and already fairly lean, this — not image resampling — is usually where the remaining size is hiding, and it's a different problem than what a DPI or quality slider solves. OxygenPDF's compressor writes its output with compressed object streams, which is where the saving on a text-only file comes from: a 300-page text PDF merged from separate files went from 163 KB to 74 KB in my test without a single image in it.

Compressing with OxygenPDF

  1. Open the Compress PDF tool
  2. Drop your file in — a password-protected PDF works too; enter the password when prompted and compression runs normally from there
  3. Pick a preset, or switch to Target Size mode if you need to hit a specific file size
  4. Download the result

Everything runs locally in your browser. The file is never uploaded anywhere.

The Four Presets

Preset Image DPI JPEG quality Best for
Light 200 85% Documents you'll print
Balanced 150 75% General sharing, email
Maximum 100 60% Screen-only viewing
Extreme 72 35% Smallest possible file

These are the tool's own settings. The DPI is a ceiling, not a target: a picture already at or below it is left alone. How much a preset saves depends entirely on how much of the file is pictures, so the tool doesn't quote a percentage. It measures your file and shows, under each preset, the size your PDF would come to. A "Fine-tune" panel under the presets lets you move the DPI (50-300) and JPEG quality (10-100%) sliders independently if none of the four land where you want.

Target Size Mode

If you need the output under a specific size — a portal with a 5MB upload cap, an email provider that caps attachments at 25MB — Target Size mode takes a number in kilobytes or megabytes and works backward from it. It recompresses a few of the file's heaviest pictures at each of its quality levels, estimates the output size from those, and picks the highest-quality level that should land under your target. If even the most aggressive setting can't get there, it says so rather than pretending.

What Compression Actually Changes

Here's the part most compression guides skip: what actually happens to the file. OxygenPDF's compressor works on the pictures inside the PDF and leaves the rest of each page alone. Every embedded image that carries more pixels than your DPI setting allows is resampled down to it and saved again as a JPEG at your quality setting; an image that wouldn't come out at least a tenth smaller is kept exactly as it was. Then the file is written back with its internal structure packed more tightly.

Text stays text. The words on a compressed page are the same characters in the same fonts — you can select them, search them and copy them, and a screen reader can read them — and they look as sharp at the Extreme preset as at Light, because no preset touches them. The same goes for vector line art. Before handing the file back, the tool reads its own output and compares every page with the original; if anything other than the pictures changed, that result is thrown away. (Until November 2026 this tool worked differently: it rendered every page as an image and rebuilt the PDF from those, which lost the text. If you read that here before, it is no longer true.)

Because the document is edited rather than rebuilt, bookmarks, hyperlinks, fillable form fields, comments and metadata come through as well. There is one exception, and the result card names it when it happens. A document with no selectable text at all — a scan, or a PDF exported as pictures — whose images can't be made meaningfully smaller where they are is also tried as fresh pictures of its pages, and whichever is smaller wins. No text is lost, since there was none, but links and form fields don't survive that path; the card says "Each page is now a picture of itself" when it was taken. Flatten PDF is the tool for the opposite wish: merging fillable form fields into static page content on purpose.

One more consequence worth knowing: a lean, mostly-text PDF has little for a compressor to work on. It usually comes out somewhat smaller from tighter packing alone, and the DPI and quality settings make no difference to it — every preset shows the same estimated size. When nothing in a file gets smaller, the tool says so and hands back your original, unchanged, rather than a bigger file with no explanation.

Grayscale, Black and White, and Batches

A color choice, available in both the preset and Target Size views, has three settings. Full color leaves colors alone. Grayscale turns every page gray — pictures, text and drawings alike — which is useful for scanned line drawings, forms, and black-and-white originals that got scanned in color by default. It meaningfully shrinks output built from photos or color scans; how much depends on how colorful the original pages actually are.

Black & white is for scanned text. It stores each picture as ink or paper, one bit per pixel, and keeps up to 300 DPI, because an edge is all such a picture has. The page scanned at 300 DPI that Balanced takes from 234 KB to 85 KB comes to 27 KB this way with its letters still sharp; the Extreme preset reaches 20 KB only by cutting it to a 72 DPI JPEG that smears them. It is the wrong choice for a photograph, which loses every shade between black and white. Only pictures change: text and drawings on the page keep their colors.

Save pages as pictures is for a file with nothing to resample: a site plan or a map drawn from hundreds of thousands of lines, with no photo on it, which every preset hands back at the size it came in. Each page becomes one picture, which can be far smaller than the instructions that drew it. The cost is the text, which can no longer be selected or searched, so it is off unless you switch it on, the tool says what will be lost before it runs, and if the pictures would be bigger you get your original back.

Multiple files can be queued and compressed with the same settings in one pass, which is the practical option for a folder of scanned receipts or a batch of reports that all need the same treatment before archiving or emailing.

What to Expect

Measured results at the Balanced preset: four phone photos went from 8.8 MB to 264 KB, one page scanned at 300 DPI from 234 KB to 85 KB, 300 pages of text from 163 KB to 74 KB, and a three-page text report from 83 KB to 71 KB

The chart above is four files I ran through the Balanced preset, not a promise — your results depend on the actual mix of images, fonts, and page count in your file. For a number you can hold the tool to, load your own file: each preset shows the size your PDF would come to, measured on its own pictures, before you compress.

Image-heavy files compress dramatically, because most of their size was resolution nobody needed. Text-only PDFs, as covered above, shrink a little or not at all — and that's expected behavior, not a malfunction.

When to Skip Compression

Don't compress legal documents where any modification could affect their validity or admissibility. Courts and counterparties sometimes care about exact provenance, and recompressing a file's images changes it even when nothing looks different on screen. A digital signature stops validating after any change to the file, compression included.

Skip it for print-ready files where exact DPI needs to be preserved. A print production workflow with bleed and registration marks depends on precise page geometry, and while compression doesn't change page dimensions, it does resample the images to the DPI you chose — not the same thing a print shop's RIP expects from embedded high-resolution source images.

Forms, hyperlinks, a table of contents and selectable text are not reasons to skip it: as covered above, they all come through. The one case to think about is a document that is nothing but pictures of pages, where the tool may redraw the pages and drop its links.

For archival copies, decide first whether long-term fidelity matters more than disk space. If it does, keep the original and compress a duplicate for everyday use. Storage is cheap, and a compressed copy that turns out to have thrown away something you needed is not something you get back.

If a file arrived with a password, compression handles that directly — enter the password when the tool asks for it, and it decrypts and recompresses in one step. If you want the password gone permanently rather than just handled during compression, removing it first is the separate job for that.

FAQ

Does compressing a PDF always reduce quality?

No. Text and vector drawings are untouched at every preset. Pictures do lose detail, but the Light preset (200 DPI, 85% JPEG quality) is close to indistinguishable from the original on screen and in most printing for typical content.

Will my compressed PDF still have selectable, searchable text?

Yes. The compressor makes the pictures in the file smaller and leaves the text as text, in its original fonts, at every preset. The one exception is a file that had no selectable text to begin with, such as a scan: it has none afterwards either, and needs OCR for that.

What DPI should I use?

150 DPI is enough for anything read on a screen. 200-300 DPI holds up for most printing. Beyond that is really an archival decision — the Library of Congress's own preservation guidelines put text and manuscript digitization at 300-400 ppi, and reserve 400-600 ppi for rare or fragile originals, not a blanket "as high as possible."

Can I compress a PDF that has a password?

Yes. Upload it, enter the password when the tool asks for it, and compression runs the same as it would on an unprotected file — there's no need to remove the password first.

Why didn't my file get smaller, or why did it get bigger?

It can't get bigger: if nothing the tool tries comes out smaller, it hands back your original and says so. A file doesn't get smaller when there's nothing in it to recompress — a PDF that is mostly text, or one whose pictures are already at or below the resolution you chose. Try a stronger preset if it has pictures. If it's all text, it is already about as small as it gets.

What if the file won't open, or looks corrupted, after compressing?

That shouldn't happen under normal use, but if a file does come out damaged, Repair PDF re-parses and rebuilds a PDF's internal structure and can often recover a file that another step mishandled.

Compress your PDF here, entirely in your browser — nothing you upload ever leaves your device.

Rohman

Written by

Rohman

Rohman built OxygenPDF's client-side PDF toolkit on pdf-lib and pdf.js, and writes about what actually happens to a document when you process it in a browser instead of uploading it.

Share this articlePost on XLinkedIn

Stop renting your PDF platform.

All 120+ tools free on web. Desktop Pro is $29 once — every desktop tool, the workspace, and batch processing.

  1. $29now
  2. $79after that

14-day money-back guarantee • Works offline • All platforms

We use analytics to understand how our tools are used and improve the experience. No personal files are ever sent.