Compress PDF
Compress a PDF in five modes: recompress its JPEG photos (text is not touched), rewrite its structure or convert pages to images. No sign-up; the file never leaves your browser.
Drag your PDF here or click to select it
Upload a PDF and choose the compression mode according to your needs.
Built by
Miguel Ángel Colorado Marin (MACM)
Built by
Miguel Ángel Colorado Marin (MACM)
Full-Stack Developer · Guadalajara, España
I develop web apps, digital tools and full projects — from design to deployment.
What changes in each mode
Structural mode rewrites the PDF with object streams and clears the metadata fields in the document information dictionary: author, title, subject, keywords, producer, creator and dates. It does not modify any image, so quality is identical to the original, but the reduction is usually small.
Smart mode does the same and also recompresses 8-bit JPEG images in RGB or grayscale. Each one is reduced to at most 2000 px on its longer side and encoded at quality 80%, and it replaces the original only if the new version is at least 10% smaller. Images stored in other internal formats, such as PNG or uncompressed, are not touched. The report shows how many images were recompressed out of the total.
Screen (72 DPI, JPEG 60%), Balanced (96 DPI, JPEG 80%) and High quality (150 DPI, JPEG 92%) rebuild the document. Each page is drawn on a canvas with pdf.js and saved as a JPEG inside a new PDF created with jsPDF, with the same page size as the original.
What is lost in the image modes
When pages become images, text is no longer selectable and cannot be searched or copied. Hyperlinks, annotations, bookmarks and attachments disappear, and form fields stop being editable because only what was drawn on the page remains.
For a text PDF the image modes usually produce a larger file than the original, because each page becomes a bitmap. If the result is larger, the tool does not download it automatically: it shows a warning and offers «Download anyway».
Encrypted PDFs are not processed. pdf-lib does not open any encrypted document, including those that only have permission restrictions, so the tool shows a warning and creates no file.
Any mode rewrites the whole file, so the digital signature of a signed PDF stops being valid. Check the document before sending it if the signature must remain.
Privacy and external resources
The PDF is never uploaded to a server: reading, rewriting and rendering happen in the browser tab. In the image modes the pdf.js worker is served from miguelacm.es together with the page; it is library code and never contains your document. While processing, the button shows progress and is locked; clicking Change discards the result in progress.
How to compress a PDF?
- 1
Upload the PDF
Drag the file to the upload area or click to choose it. Its name, size and number of pages are shown. If the PDF is encrypted, the tool rejects it and creates no file.
- 2
Choose the mode
Smart recompresses JPEG photos, Structural only rewrites the file, and Screen, Balanced and High quality turn each page into an image. Smart and Structural clear the metadata fields; the image modes create a new PDF with no author or title.
- 3
Compress and download
Click the compress button. The report shows the original size, the compressed size and the reduction percentage. If the result is smaller, it downloads automatically; if it is larger, a warning appears and you can still download it.
Frequently asked questions
What exactly does this PDF compressor do?
By default (Smart mode) it recompresses JPEG images to at most 2000 px on the longer side and quality 80%, but only when the new version is at least 10% smaller, without touching text, fonts, links or forms. Smart and Structural modes clear the PDF's metadata fields (author, title, subject, keywords, producer, creator and dates) and store the structure with PDF 1.5 object streams. Structural mode does only the latter and leaves the images exactly as they were.
How much space can I expect to save?
It depends on the PDF. Files with many large JPEG photos can shrink a lot in Smart mode or in the image modes. Text-only or already optimized PDFs gain little in Structural mode, and in the image modes the result can be larger than the original.
Is quality lost in PDF images or text?
It depends on the mode. Structural does not change any image. Smart recompresses only large JPEGs (max 2000 px, quality 80%) and leaves text intact. Screen (72 DPI, JPEG 60%), Balanced (96 DPI, JPEG 80%) and High quality (150 DPI, JPEG 92%) turn each page into an image: text is no longer selectable and links and form fields are lost.
What is the purpose of removing PDF metadata?
Metadata can reveal the author's name, the program used to create the document, creation and modification dates and other details. Smart and Structural modes clear those fields in the document information dictionary before you share the file. The XML metadata block (XMP) in the catalog is removed too.
Are my PDFs sent to any server to be compressed?
No. The file is processed in your browser with pdf-lib and, in the image modes, with pdf.js and jsPDF; it is never uploaded to a server. The pdf.js worker is served from miguelacm.es together with the page: it is library code, not your PDF.
What happens with encrypted or protected PDFs?
Any encrypted PDF is rejected, including those that only have permission restrictions. The tool shows a warning and creates no file. You can remove the protection in the program that created it and upload it again.
What happens if the compressed PDF is larger?
It can happen, especially in the image modes with text PDFs. The tool shows the warning «The result is larger than the original» and does not download the file; if you still want it, use «Download anyway».
Related tools
Embed the compressor on your site
Embed this PDF compressor in any web page with a simple iframe:
<iframe
src="https://miguelacm.es/embed/pdf-compress?locale=en"
width="100%"
height="600"
frameborder="0"
title="PDF Compress"
></iframe>View embed in new tab →