Compress PDF

Make a PDF smaller for email or a form. Gentle keeps your text and saves little. Strong saves a lot and turns pages into pictures. The file stays in your browser.

Compress PDF

How to compress a PDF

  1. Drop your PDFs in the box above or click it to browse. You can add up to 20 files.
  2. Under Method, choose Gentle to keep the text, or Strong for a much smaller file.
  3. For Strong, pick a quality: Smallest (72 dpi), Balanced (110 dpi) or Better quality (150 dpi).
  4. Click Compress PDF and compare the before and after sizes.
  5. Download each file, which is named name_compressed.pdf, or use Download all as ZIP. Click Start over to compress more.

What this compress PDF tool does

The page has two methods, and they work in different ways.

Your browser does both jobs. The file is read from disk into the page, processed there, and offered back as a download. The tool never hands you a bigger file: if the result would not be smaller, you get your original back with a note saying so.

We checked the privacy claim in a Chromium browser, recording every request that tried to leave the page: 19 in total. Two went to Google's ad and analytics hosts, as on every GramFile page, and 4 to jsDelivr, where the page fetches its two libraries with a hash check. None had a request body, so no PDF was sent.

Gentle: safe, and often a small saving

Gentle is the method to try first because it leaves every page as it is. It is also the one that disappoints most often, so here are the numbers. On the 3-page photo-heavy sample it saved 1,075 bytes out of 2,721,154, which is 0.04 percent. On the 3-page scan it saved 954 bytes out of 1,280,280. Those files are almost all JPEG image data, and Gentle leaves image data alone.

It helps most on files with a lot of overhead and little content. The 5-page text sample went from 5,696 to 4,171 bytes, 27 percent smaller, with all 4,575 characters of text still extractable afterwards. A tiny file like that is not a typical office document, so do not expect 27 percent from your own PDF. When we joined ten copies of the photo sample into a 30-page file of 27,193,340 bytes, Gentle found nothing to save and returned the original.

Strong: three resolutions, measured

Strong has a quality menu with three settings. The code behind them is simple: 72 dpi at JPEG quality 0.5, 110 dpi at 0.65, and 150 dpi at 0.8. Every page keeps its size on the sheet. Only the pixel count changes.

On the 3-page photo-heavy sample, whose pages hold 1600 by 1131 pixel photos, Strong gave 44,946 bytes at 72 dpi (98.3 percent smaller), 109,853 at 110 dpi (96.0 percent) and 426,039 at 150 dpi (84.3 percent). The page images in those outputs measured 596 by 842, 910 by 1287 and 1241 by 1754 pixels.

The scan tells a different story. Its pages are already 1240 by 1754 pixel images, about 150 dpi on A4. At 72 dpi Strong cut it to 158,685 bytes (87.6 percent smaller), and at 110 dpi to 465,286 (63.7 percent). At 150 dpi it only reached 1,108,224, 13.4 percent smaller, because the pages were being redrawn at the resolution they already had. If you scanned at 150 dpi or less, the Balanced and Better settings have little to give.

Pick the setting by reading the result: 72 dpi gives a page about the size of a screen, which suits a quick look and not a printout. The strip above the list shows the before and after sizes, so run Better first and step down only if the file is still too big. There is no target-size box, so the tool cannot aim for a specific number of megabytes for you.

The numbers side by side

These runs used headless Chromium in a shared container, so the times are rough. Gentle took about 0.3 seconds on the small files. Strong took about 0.9 seconds for 3 pages and 2.4 s for the 30-page, 27,193,340-byte file. We have not tested files near the 200 MB limit, and the samples are generated PDFs, so a real office document may behave differently.

What Strong takes away

Strong replaces each page with a picture of that page. We measured one consequence: the photo sample had 30 characters of text, and the output had none. Nothing can be selected, searched or copied, and a screen reader has nothing to read. Links, bookmarks and form fields are also gone by design, since the new file holds only images. A signature on the original will not validate on the result.

Scans are a different case. The scan sample had no text layer to begin with, so Strong lost nothing there, and it does not add one. There is no OCR in this tool, so a searchable scan needs character recognition in a separate program.

Page sizes are kept: in every run the output pages had the same dimensions as the input pages. Strong also never replaces a text-only file with a larger picture version: on the 5-page text sample, all three levels returned the original, text intact.

When the file will not shrink

If the result is not smaller, you get your own file back under its own name, with a note under it. That happened to Gentle on the 30-page photo file and to Strong on the text file. It means one of three things: the file is already compact, it is mostly photos that Gentle will not touch, or it is text that Strong would only make bigger.

Several files at a time are fine, up to 20 files of 200 MB each. Each one is processed on its own and gets its own download. Download all as ZIP appears when there is more than one, and saves gramfile-tools.zip.

What the tool refuses

A PDF that needs a password to open is refused with a message to remove the password first, and the same happens in both methods. Something that only looks like a PDF, such as a text file with a .pdf name, gets an error that names it. We ran both cases.

Common reasons to compress a PDF

Measured compressions

Compress PDF test runs on generated sample files, headless Chromium, sizes in bytes
RunOriginal bytesResult bytesSavedTimeText characters kept
3-page photo PDF, Gentle2,721,1542,720,0790.0 percent0.3 s30 of 30
Same, Strong 72 dpi2,721,15444,94698.3 percent0.9 s0 of 30
Same, Strong 110 dpi2,721,154109,85396.0 percent0.9 s0 of 30
Same, Strong 150 dpi2,721,154426,03984.3 percent0.9 s0 of 30
3-page scan, Gentle1,280,2801,279,3260.1 percent0.3 s0 of 0
Same, Strong 72 dpi1,280,280158,68587.6 percent0.9 s0 of 0
Same, Strong 110 dpi1,280,280465,28663.7 percent0.9 s0 of 0
Same, Strong 150 dpi1,280,2801,108,22413.4 percent0.9 s0 of 0
5-page text PDF, Gentle5,6964,17126.8 percent0.3 s4,575 of 4,575
Same, Strong 110 dpi5,6965,6960 (original returned)0.9 s4,575 of 4,575
30-page photo PDF, Gentle27,193,34027,193,3400 (original returned)0.4 s300 of 300
Same, Strong 110 dpi27,193,3401,092,83196.0 percent2.4 s0 of 300

Prefer desktop software?

A desktop optimizer is the better choice when the text must stay selectable and the file still has to shrink a lot, when you have files near or above 200 MB, or when you must keep links, bookmarks, form fields or a signature. Full PDF editors usually have an optimize command that downsamples images in place. Ghostscript is a free command-line option that does the same job.

GramFile has download pages for Foxit PDF Editor and Nitro PDF Pro, which are editors of that kind.

Frequently asked questions

Is my PDF uploaded to a server?

No. Your browser reads the file and compresses it on your computer. The only outside traffic we recorded was to Google's ad and analytics hosts and to jsDelivr for its libraries, never carrying a PDF.

What is the difference between Gentle and Strong?

Gentle rewrites the file and leaves your pages as they are, so savings are small on photos and scans. Strong redraws every page as a JPEG, which makes the file much smaller but turns the text into a picture.

Why did my PDF not get smaller?

It was already compact, or the method could not help. Gentle leaves image data alone, and Strong would make a text-only file bigger. In either case you get your original back with a note, never a larger file.

Can I shrink a PDF and keep the text selectable?

Not with these two methods. Gentle keeps the text but saves little on image-heavy files. Strong saves a lot but makes the text a picture. A desktop optimizer that downsamples images in place is the tool for that.

Will the quality drop?

Gentle changes nothing you can see. Strong redraws each page at 72, 110 or 150 dpi, and the smaller the setting, the softer the page looks. For a 150 dpi scan, the 150 dpi setting saved only 13.4 percent.

Can I set a target size like 1 MB?

No. There is no target-size control. Try the levels from Better down to Smallest and watch the size shown above the list.

How many files and how large?

Up to 20 files at a time, each up to 200 MB. We tested up to a 27 MB, 30-page file and nothing close to the limit.

Does it add a watermark or run OCR?

It adds neither. Strong does not make a scan searchable, since the tool has no text recognition.

Why was my file refused?

A PDF that needs a password to open is refused, as is a file that is not a PDF. The message names the file.