PDF Compressor
PDF Compressor
Re-save a PDF with object streams.
Runs entirely in your browser
File: —
How to use this tool
- Fill in the inputs.
- Read the result.
- Copy or download as needed.
About the PDF Compressor
The PDF Compressor re-saves a PDF file using more efficient internal object storage and strips out metadata like title, author, and subject fields, which can sometimes produce a smaller file size. Upload a PDF, click the button, and compare the original and resulting file sizes before downloading.
It is important to set realistic expectations: genuine, deep compression of a PDF's embedded images and content streams is not something that can be done reliably from within a web browser, so this tool focuses on the more modest, but still useful, optimizations that are achievable client-side.
The tool loads your PDF using the pdf-lib library and clears several metadata fields (title, author, subject, and keywords) that are often set by the software that originally created the document but serve no purpose for most readers. It then re-saves the file using object streams, a PDF feature that can store certain internal objects more compactly than the traditional format.
Because the actual images and text content inside the PDF are left untouched, the size reduction achieved by this method is typically modest and highly dependent on the specific structure of the original file — some PDFs (particularly those with a lot of removable metadata or many small internal objects) will shrink noticeably, while others (particularly those where the file size is dominated by large embedded images) will see little to no change.
Common use cases
- Removing unnecessary metadata (title, author, subject) from a PDF before sharing it externally.
- Attempting a modest file size reduction for a document dominated by many small internal objects rather than large images.
- Cleaning up a PDF's internal structure as a light optimization step before archiving.
- Checking whether a re-save with object streams meaningfully reduces a specific file's size before trying other compression methods.
- Stripping identifying metadata from a document for privacy reasons before distribution.
Tips and best practices
- For PDFs where file size is dominated by large, high-resolution embedded images, this tool will likely produce only a small reduction — reducing the source images' resolution or quality before creating the PDF is usually far more effective in that case.
- Always compare the "before" and "after" file sizes shown by the tool before assuming compression was successful, since the outcome varies significantly by file.
- This process also removes identifying metadata like author and title, which can be a helpful side benefit for privacy even when the file size change is small.
- If you need significant, reliable file size reduction for an image-heavy PDF, consider re-creating the PDF from lower-resolution or more compressed source images instead.