$ pdf --compress
Text and filesCompress PDF
Shrink a PDF in two modes: text preserved (keep it selectable) or aggressive (becomes image, shrinks more). All in the browser, no upload.
- no upload
- two modes
- free
Two modes, two trade-offs
Compressing a PDF is not one operation. There is the safe path that preserves the text and shrinks a bit, and the aggressive path that shrinks a lot but flattens it to images. The choice depends on what you will do with the file next.
Text preserved
Re-applies PDF compression filters with object streams from pdf-lib. It is the same native PDF compression principle Acrobat uses in Fast Web View mode. Typical reduction of 15-30%, but the text stays selectable and searchable — essential for signed contracts, auditable documents, reference PDFs. If the PDF was already optimised, the reduction is zero — we do not fake that case.
Aggressive (becomes image)
Renders each page as a JPG and rewrites the PDF as a sequence of images. Typical reduction of 50-70% (depending on the DPI and quality you pick). But the text stops being selectable: you cannot copy or search inside the PDF. It is an honest trade — worth it for reading copies; avoid for signable documents.
Why "no upload" changes everything
Services like iLovePDF and Smallpdf compress in the cloud. Here, everything happens in your browser with no server. No copy of the document leaves your machine. Important for contracts, medical reports, tax receipts, or any PDF with personal data.
To work with PDF pages before compressing, use the PDF to JPG and Image OCR tools.
## faq
Frequently asked questions
Is the PDF uploaded to a server?
No. The PDF is read into browser memory, processed in one of two modes (text preserved or rasterised) and delivered on your machine. No upload, no queue, no cloud copy.
What is the difference between the two modes?
"Text preserved" mode: re-applies PDF compression filters without altering the content. The text stays selectable and searchable. Modest reduction, 15-30%. Recommended for contracts, auditable documents and signed PDFs. "Aggressive" mode: renders each page as a JPG image and rewrites the PDF. Large reduction, 50-70%, but the text stops being selectable or searchable. Use for reading; avoid for signable documents.
Why does the file sometimes not shrink at all?
In "Text preserved" mode, if the PDF was already optimised (already through stream compression with object streams), re-applying the same compression does not shrink further. Only the aggressive mode helps in that case — at the cost of the text no longer being selectable.
Password-protected PDF — does it work?
No. The tool detects and warns. We do not decrypt (it would be dishonest to claim it works without the password). If you have the password, open the PDF in your reader, save an unlocked copy, then bring it here.
Is there a size or page-count limit?
No server. The ceiling is your browser memory. PDFs of 100+ pages in aggressive mode can take several minutes on desktop, and longer on mobile. In text mode, 100 pages takes seconds.
## other tools