Compress PDF

Compress PDF files in your browser with strong image compression or a lossless clean-up. Before and after sizes shown. Free, private, no upload.

๐ŸŒ Espaรฑol

Drop your file here (.pdf)

๐Ÿ”’ Private by design: your files are processed locally in your browser and never uploaded to any server.

Where the megabytes in a PDF actually sit

A PDF that will not fit through an upload form is almost never full of text. Text is stored as instructions (set this font at this size, move here, draw these glyphs) and compresses down to very little. What makes a document heavy is pixels. A phone camera โ€œscanโ€ is a full resolution JPEG per page in a PDF wrapper. A report exported from a design tool carries its photographs at whatever resolution they were imported at. A screenshot pasted into a slide deck arrives at the size of somebodyโ€™s monitor and stays there.

That leaves two honest ways to shrink the file. Re-encode the pictures at a lower resolution, which changes what is on the page, or leave the page contents completely alone and squeeze the container around them. The Compression mode select is that choice, and the two options work by genuinely different mechanisms rather than being two settings of one dial.

Strong mode rasterises, clean-up rewrites

Strong: smallest file (pages become images) is the default and much the bigger lever. Each page is opened with pdf.js, drawn onto a canvas at the chosen resolution over a white background, and encoded to JPEG. A fresh document is then assembled with pdf-lib in which every page keeps its original size in PDF points and is filled edge to edge by that one JPEG, saved with object streams switched on so the small internal objects pack together.

The consequence is worth stating plainly rather than burying. Whenever the rebuilt file is the one handed back to you, the page is a photograph of itself. Text cannot be selected, copied, searched or read aloud, and links, form fields, bookmarks and annotations do not survive either, because a new document was built rather than the old one edited. On a scan that costs nothing, since scanned text was already pixels. On a contract you still need to search or fill in, it costs a great deal. The size guard described further down is the one case where none of it happens, because there your original file comes back unchanged.

Lossless clean-up: keeps selectable text goes the other way. pdf-lib loads the file without updating its metadata, deletes the Metadata and PieceInfo entries from the document catalog, drops the trailerโ€™s Info dictionary, and writes everything back out using compressed object streams. Not one page is touched. Text stays live, links keep working, form fields still fill in, and what disappears from that rewritten copy is the pointer to the documentโ€™s identifying metadata, along with its structural slack. Whether the copy reaches you is decided by the same size guard: it is handed over only when it came out smaller than the input, and otherwise you get your original back unchanged. On a file from a tidy generator that is a modest win. On something exported by an older office suite it can be a large one.

Running the compression

  1. Drop your PDF into the box above, or click Choose a file.
  2. Pick a Compression mode. Leave it on strong for a scan or a photo-heavy report; switch to the lossless clean-up when the text has to stay selectable.
  3. If you stayed on strong, choose a Strong mode quality from the three fixed presets.
  4. Click Compress PDF. If you stayed on strong, the bar advances one page at a time while the pages render, then holds near the end while the new document is assembled. The lossless clean-up has no per-page stage to report, so its bar simply sits at the start until the rewritten file is finished.
  5. Read the before and after size line, then save the file from the download link. A file called report.pdf comes back as report-compressed.pdf.

Reading the DPI and JPEG quality behind each preset

Each strong-mode preset is a fixed pair of numbers, not a vague slider. Better quality (150 DPI, light compression) renders at 150 dots per inch and encodes at JPEG quality 0.85. Balanced (150 DPI, recommended) keeps the same 150 DPI and lowers the JPEG quality to 0.7. Smallest file (100 DPI) renders at 100 DPI and encodes at 0.5.

DPI here is a real scale factor rather than a label, because a PDF page is measured in points at 72 to the inch. Rendering at 150 DPI therefore draws the page at just over twice its nominal size, which turns an A4 page into roughly 1240 by 1754 pixels. At 100 DPI the same page lands near 827 by 1169: still readable, visibly softer once you zoom.

The two ends of the range protect different things. The higher preset spends its budget on JPEG fidelity, so small print and thin rules keep their edges. The smallest preset cuts resolution and fidelity at once, which is the right trade for a photographed receipt and the wrong one for a page of eight point legal text. If colour is what is costing you, Grayscale PDF removes it as a separate step, and Resize PDF Pages is the tool for changing the physical page dimensions.

When the download is the same size as the original

Before handing anything back, the tool compares the rebuilt file against the input and returns your untouched original if the new one is not smaller. That guard is there because compression really can backfire. A text-only PDF is already compact, and converting crisp vector glyphs into JPEG pixels adds data instead of removing it. A well built document can also come out fractionally larger from the lossless path once its objects are re-laid out.

When that happens you still get a download named -compressed.pdf, and the size line simply shows the same figure twice. Read that as the honest answer rather than a failure. If the file has to be smaller anyway, the remaining levers are structural: strip the document metadata with Remove PDF Metadata, or drop what you do not need to send at all.

Scans, payslips and the reason this one runs locally

The documents people compress are the ones they should think twice about uploading: signed contracts, bank statements, photographed passports, discharge letters from a hospital. A conventional online compressor needs the whole file on its server to do the work, which means your paperwork exists, however briefly, on a machine whose retention policy you have never read.

Here the file is read straight out of your deviceโ€™s memory and rendered by pdf.js in the same tab. The only thing fetched over the network is the pdf.js render worker, pulled from unpkg the first time strong mode runs in a tab and pinned to the exact installed version; the lossless path does not even need that, since it is pure pdf-lib. Your document is never part of any request. The practical ceiling is memory rather than policy, because the input, every rendered page and the finished output all live in the tab at once. For the rest of the toolkit see all PDF tools, or read the best PDF tools, compared.

See it in action

Screenshot of the Compress PDF tool with sysfenix-report.pdf (3 KB) loaded, Compression mode set to Strong: smallest file (pages become images), Strong mode quality set to Balanced (150 DPI, recommended)
Compress PDF mid-process: sysfenix-report.pdf (3 KB) loaded, Compression mode set to Strong: smallest file (pages become images), Strong mode quality set to Balanced (150 DPI, recommended).
Screenshot of the Compress PDF result screen showing sysfenix-report-compressed.pdf ready to download (3 KB)
The finished result: sysfenix-report-compressed.pdf ready to download (3 KB). The download link is a local blob URL โ€” the file never leaves your device.
Diagram: where the work happens on SysFenix โ€” the file is read, decoded and re-encoded inside the browser tab, and the upload/queue/server-storage steps a typical online converter needs never happen at all
Where the work happens on SysFenix โ€” the file is read, decoded and re-encoded inside the browser tab, and the upload/queue/server-storage steps a typical online converter needs never happen at all.

Frequently asked questions

Why can I no longer search the text after using strong mode?

Because strong mode does not compress your text, it replaces it. Every page is redrawn as a single JPEG and a brand new document is built around those images, so the glyph instructions that made the text selectable are gone and only a picture of them remains. Screen readers, copy and paste, and Ctrl+F all stop working on that file, which is why the lossless clean-up option exists.

Does the lossless clean-up remove the author name and creation date?

Not really, even when the cleaned copy is the one you get back. The clean-up deletes the Metadata and PieceInfo entries from the document catalog and drops the trailer Info dictionary, which is where the author, title, producer application and creation timestamp live, but it removes only the pointers, and pdf-lib re-serializes every object it still holds, so those now-unreferenced objects travel into the output and a viewer simply stops showing them. No page is touched. Every run also ends with a never-larger guard. If the re-serialized file is not strictly smaller than the file you dropped in, your original bytes are handed back instead, under the -compressed.pdf name and with the author and creation date still in them. The before and after size line tells you which of the two you received, and the dedicated Remove PDF Metadata tool, which deletes the underlying objects rather than just the references to them, is the one to use when stripping that data is the actual goal.

The progress bar reached the end and then paused. What is it doing?

Page rendering only accounts for the first 90 percent of the bar. The remaining tenth is pdf-lib assembling the new document from every rendered page and serializing it, and that stage reports nothing until it finishes. On a long scan that final pause is the longest single step of the job.

Can I compress a password-protected PDF?

Not directly, and the two modes differ. The lossless clean-up loads the file with pdf-lib and rejects any encrypted document outright, whatever kind of password it carries. Strong mode renders with pdf.js, which cannot open a file that needs a password to be viewed at all, but does open one carrying only an owner password, the kind that restricts printing or copying rather than opening. If a run fails, remove the password first with the Unlock PDF tool, compress the result, then re-apply protection afterwards if you still need it.

Why is the output still A4 when I chose 100 DPI?

Resolution and page size are separate things. The rebuild reads each source page's real size in PDF points and creates the new page at exactly those dimensions, then stretches the render to fill it. So a 100 DPI A4 page is still A4 when printed, just built from fewer pixels, which is why it looks softer when you zoom in rather than smaller on paper.

Related tools