By · Updated

Compress PDF

Reduce PDF File Size by Re-encoding Large Photos and Dropping Metadata

No ratings yet

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the Compress PDF works

Compress PDF files that are too big to email or upload. Pick a compression level, drop the file in and download a smaller copy. Everything runs in your browser, so the document never leaves your computer and there is no file size cap set by a server.

Most oversized PDFs are big for one reason: photos. A scanned page, a phone picture of a receipt or a brochure exported at print quality can hold images of 4000 pixels or more across, saved at near lossless quality. On screen, and on most office printers, nobody can see the difference between that and an image a third of the size. The rest of a PDF, the text, fonts and vector drawings, is usually small already. So a good compressor spends its effort on the pictures and leaves everything else alone.

How to compress PDF files here

The tool opens the file, finds every embedded image and checks whether it is a photo it can safely re-encode: 8-bit greyscale or colour, stored as JPEG or as compressed raw pixels, with no palette, stencil or colour-key mask. Each of those photos is scaled down so its longer side fits the level you chose, then saved again as a JPEG at that level's quality. If the new version is not smaller than the old one, the original image is kept. Soft transparency masks are carried across unchanged, so logos with transparent edges still look right.

It then looks for data streams that were stored with no compression at all, which some older scanners and export tools still produce, and packs them with the same Deflate method used in ZIP files. That step is lossless. Finally the file is rewritten with object streams, a PDF 1.5 feature that groups the small structural objects together and compresses them, which typically trims a few more percent.

Choosing a level

If a file is already well compressed, nothing useful can be removed and you get the original back unchanged, with a note saying so. That is better than a "compressed" copy that is somehow bigger.

What the numbers mean

The result shows the original and new size and the percentage saved. "Photos re-encoded" reads as "x of y": y is how many images qualified, x is how many came out smaller and were swapped in. "Streams packed" counts the uncompressed data blocks that were deflated. A scan made of one big photo per page tends to shrink by 60 to 90 percent. A text report with a few charts may only lose 5 to 20 percent, because there is little to squeeze.

Metadata

By default the tool also drops the document information dictionary and the XMP metadata block. These hold the title, author, software name and edit dates. They are rarely large, but removing them saves a little space and avoids sharing details you may not have meant to send. Choose Keep if the title or author must stay, for example on a published report.

What it does not change

Tips and pitfalls

Privacy

Compression happens in the browser tab using the open-source pdf-lib library and the canvas JPEG encoder built into your browser. The file is not uploaded, stored or logged anywhere, which matters for payslips, medical letters, contracts and ID scans that people most often need to shrink.

FAQ

Will compressing a PDF make the text blurry?

No. Text in a normal PDF is stored as characters drawn with fonts, not as a picture, and this tool never touches it. Only embedded photos are re-encoded. Text in a scan is part of a photo, so on the Strong level it may soften slightly; Balanced keeps it crisp.

Why did my PDF not get any smaller?

The file was already compressed well, or most of its size comes from fonts, vector drawings or black and white fax-style scans that this tool leaves alone. When nothing can be saved you get the original back unchanged rather than a larger copy.

Is there a file size limit?

There is no server limit because nothing is uploaded. The practical ceiling is your device's memory: files of a few hundred megabytes work on a typical laptop, while a phone may struggle with very large scans that hold hundreds of full-resolution pages.

Can I compress a password-protected PDF?

Not directly. An encrypted PDF has its images scrambled, so they cannot be decoded and re-encoded. Remove the password first using the original password, then compress the unlocked copy and protect it again if needed.

See also: all PDF tools, Images, Audio, Video & Screen, SVG, Simulations & Screensavers, Generative Art, Chart Makers, 3D Model Viewers, Drawing Pads, Mockups & 3D Making, Diagram Makers, 3D Science, Tracker Music.

Related tools