inyourbrowser.com

Compress PDF Online

Reduce your PDF file size without any upload. Choose lossless optimisation to keep all content intact, or pick a lower quality level for maximum compression. Everything runs in your browser.

Drop a PDF here or click to browse

How it works

Lossless mode uses pdf-lib to re-serialise the document with object stream compression, packing the existing content more efficiently without altering it. The image-based quality modes hand each page to pdfjs-dist, which renders it onto a Canvas, exports the canvas as a JPEG, and lets pdf-lib embed those JPEGs into a fresh output document. Picking the right mode for your file is the fastest way to shave megabytes off.

Processing runs in your browser

Every step of the compression pipeline, parsing, page rendering, and writing the smaller file, runs inside this browser tab. pdf-lib and PDF.js execute as JavaScript loaded by the page, with no PDF data ever sent to our servers. You can check this yourselfin your browser's DevTools Network tab.

Related operations

To stitch multiple PDFs into one before compressing, try merge PDF. For pulling out a subset of pages, use split PDF. To extract pages as standalone images, see PDF to image.

Frequently asked questions

How does in-browser PDF compression work?
Lossless compression restructures the PDF using object streams. All content stays identical but the file is packed more efficiently. Image-based modes re-render each page as a JPEG at the selected quality level, which can reduce file size significantly for PDFs with many images.
Will compression reduce PDF quality?
Lossless mode preserves quality exactly. High, Medium, and Low modes re-render pages as JPEG images, which removes selectable text in exchange for a smaller file, best for scanned documents.
How much can I reduce a PDF file size?
Lossless compression typically achieves 5–30% reduction. Image modes can reduce file size by 50–90% depending on the content and quality setting you choose.
Is my file private?
Yes. Your PDF is processed entirely in your browser using pdf-lib and the Canvas API. Our servers are not involved at any point.
What if the compressed file is larger than the original?
Some PDFs are already well-optimised and cannot be made smaller without quality loss. The tool will notify you if the compressed version is not smaller than the original.

Related tools

Image to PDF
Convert JPG, PNG, WebP, or GIF images to a PDF. Add multiple images, reorder, download instantly.
Merge PDF
Combine multiple PDF files into one downloadable PDF. Drag, drop, reorder. Runs in your browser.
Extract text from PDF
Extract plain text from any PDF using pdfjs-dist. Copy or download. Runs in your browser.
Delete PDF pages
Remove specific pages from a PDF and download the result. Thumbnail preview included.