Compress PDF — Reduce PDF File Size Free Online, No Upload
Shrink your PDF file size instantly — entirely in your browser, with no upload and no server required. Powered by PDF-lib, the tool re-encodes embedded images, removes redundant metadata, and optimizes the document structure. Choose from 3 compression levels and see a real-time gauge showing exactly how many bytes you saved.
Compression Result
How to Compress a PDF
Alfreto's PDF compressor uses PDF-lib — a JavaScript library running entirely in your browser — to parse and re-save your PDF with a smaller footprint. The tool targets the most common sources of bloat in PDF files: high-resolution embedded images and redundant document metadata. No file is ever sent to a server.
Step 1 — Upload Your PDF
Click Choose PDF or drag and drop your file into the drop zone. The filename and file size are displayed immediately. Only .pdf files are accepted. Password-protected PDFs cannot be processed — remove the password first using your PDF viewer before compressing.
Step 2 — Choose a Compression Level
Select one of three compression levels based on your priority:
- Low — Re-encodes images at 80% JPEG quality and removes metadata. Best for documents you need to print or archive with near-original image clarity. Typical size reduction: 10–25%.
- Medium — Re-encodes images at 55% JPEG quality and removes metadata. The recommended setting for email attachments, form uploads, and general file sharing. Typical size reduction: 30–55%.
- High — Re-encodes images at 25% JPEG quality and removes metadata. Use when the smallest possible file size is the priority and moderate image quality reduction is acceptable. Typical size reduction: 50–75% for image-heavy PDFs.
Step 3 — Compress and Download
Click Compress PDF. A progress bar tracks each stage: parsing the PDF structure, scanning for embedded images, re-encoding each image, removing metadata, and saving. When done, a circular gauge shows the percentage saved. Original size, compressed size, and bytes saved are all displayed. Click Download to save the file — it is named yourfile_compressed.pdf automatically.
What the Tool Does (and Doesn't Do)
The compressor targets these specific sources of PDF bloat:
- Embedded JPEG images — Re-encoded at the selected quality level via the browser's Canvas API.
- Document metadata — Title, author, subject, keywords, producer, and creator fields are cleared.
- Object stream optimization — The PDF is re-saved with
useObjectStreams: truefor a more compact internal structure.
The tool does not remove fonts, flatten form fields, remove annotations, or downsample image resolution. For PDFs that are entirely text-based or already use compressed images, size reduction will be minimal — those files are best compressed with server-side tools like Ghostscript or Adobe Acrobat.
Common Use Cases
- Email attachments — Most email clients have a 10–25 MB attachment limit. Compressing a photo-heavy PDF report at Medium level typically brings it well under the limit.
- University and government form uploads — Online portals often cap file uploads at 2–5 MB. Compress your scanned application documents before uploading.
- WhatsApp and Telegram — Messaging apps impose file size limits on PDFs. Compression at Medium or High level makes most documents shareable.
- Cloud storage — Reduce the storage footprint of large PDF archives without re-scanning original documents.
- Presentation PDFs — Slide decks exported from PowerPoint or Keynote are often very large due to embedded images. High compression can reduce these by 60–70%.
Frequently Asked Questions
Is my PDF uploaded to a server when I compress it?
No — your PDF never leaves your device. The tool uses PDF-lib, a JavaScript library running entirely inside your browser tab. No data is sent over the internet at any point. This makes it safe for confidential documents such as contracts, medical records, ID scans, financial statements, and personal files.
How does browser-based PDF compression work?
The tool parses the PDF's internal structure using PDF-lib, identifies embedded image objects (XObjects), and re-encodes each JPEG image at a lower quality using the browser's HTML5 Canvas API. It also clears document metadata fields (title, author, subject, keywords, producer, creator) and re-saves the file with optimized object streams — all of which contribute to a smaller file.
Which compression level should I choose?
Choose Low for documents you will print or archive — quality is nearly identical to the original. Choose Medium for email and general sharing — this is the most practical balance. Choose High when you need the smallest possible file and some image softness is acceptable, such as for WhatsApp, messaging apps, or upload portals with strict size limits.
Why is the compressed file the same size as the original?
Browser-based PDF compression works by re-encoding embedded raster images. If your PDF contains only text, vector graphics, or images that are already heavily compressed JPEGs, there is little for the tool to re-encode and size reduction will be minimal. For those files, command-line tools like Ghostscript or Adobe Acrobat's Save As Reduced Size feature will achieve better results by also downsampling image resolution.
Will the visual quality of my PDF change?
On Low level, quality loss is imperceptible in most documents. On Medium, embedded photos may appear slightly softer but text and vector content remain perfectly sharp. On High, image quality is noticeably reduced — fine detail in photos becomes blocky. Text, tables, charts, and vector illustrations are never affected regardless of level.
Can I compress a password-protected PDF?
No. Encrypted or password-protected PDFs cannot be parsed by PDF-lib without the correct password, so the tool will show an error. You need to remove the password first. In most PDF viewers (Adobe Reader, Preview on Mac, Chrome), open the file, enter the password, and then re-save or print to PDF without a password before compressing.
Does compression change the page count or layout?
No. Compression only affects file size, not the document's structure, page count, page dimensions, text content, or layout. All pages remain exactly as they are. Fonts, hyperlinks, form fields, and annotations are all preserved.
What is the maximum file size the tool can handle?
There is no hard limit, but very large PDFs (above 50–100 MB) may be slow to process or could cause the browser tab to run out of memory, depending on your device's RAM. For files that large, splitting the PDF first or using a native compression tool is recommended. Most typical PDFs of 1–20 MB compress quickly and reliably.
Why Use Alfreto to Compress PDFs?
Most online PDF compressors upload your files to a remote server, process them there, and serve them back — often with file size limits, daily quotas, or paywalls. Alfreto's compressor runs entirely in your browser: the processing is instant, completely private, and free with no limits.