How to optimize a PDF
Last updated: September 6, 2026
This tool re-saves a PDF with object streams to look for structural size savings. It does not intentionally rasterize pages or recompress images, but every rewritten PDF should be checked against the original.
Use our free Optimize PDF tool. It runs in your browser.
Optimizing a PDF in a few clicks
- Open the Optimize PDF tool.
- Drag in your PDF or choose it from your device.
- Press Optimize PDF to load and re-save the document with object streams in your browser.
- Download a copy only if the tool reports at least a 2% size reduction. Keep the original and compare the output before using it.
What this optimization does
A PDF is a container of objects such as pages, fonts, images and metadata. This tool uses pdf-lib to load that container and save it with object streams enabled. It does not intentionally render each page to an image or recompress image data. That can reduce some structural overhead in files created by a less compact writer.
It is not a comprehensive PDF repair or sanitization service. The tool does not promise to remove every unreferenced object, deduplicate every resource, erase revision history or preserve every specialized feature. A smaller file is not proof that it is fully optimized or safe for every workflow.
Where size savings can come from
- Object-stream packaging. A previous writer may have stored eligible objects less compactly.
- Different serialization. Re-saving can write a different cross-reference and object layout.
- Some incremental-save overhead. A later rewrite may be smaller than a document that grew through edits, but this result is not guaranteed.
Large images and scans often dominate a PDF's size. This tool does not reduce their resolution, so it may provide little or no saving for those files. A result under the 2% threshold is not offered for download.
Optimize, compress, or reduce-to-target?
| Approach | What it does | Use with care when |
|---|---|---|
| Optimize | Re-saves with object streams without intentional page rasterization or image recompression | The file has signatures, forms, PDF/A needs or other specialized features |
| Compress | Uses a different image-based approach that can reduce scans and photos more | You need selectable text, interactive fields or original page behavior |
| Reduce to target | Targets a requested file-size limit | You must meet a strict limit without changing document behavior |
Validate before relying on a rewritten PDF
Keep the original. Open the output in the recipient's expected PDF viewer and check visible pages, text selection, links, bookmarks and form behavior. If the document has a digital signature, do not assume a rewrite preserves it. Check signature validity after every change. For PDF/A, accessibility, regulated records or archival use, validate the output with the required specialist tools before replacing the original.
Frequently asked questions
Will optimizing change how my document looks? The tool does not intentionally rasterize or recompress content, but no rewrite can guarantee that every PDF feature or appearance is preserved. Compare the output.
Is text still selectable and searchable afterwards? The tool does not deliberately flatten text to images. Check the output in your intended viewer, particularly for complex PDFs.
Why did my file barely shrink? The structural rewrite may have little to change, or images and scans may be the main source of size. The tool withholds copies that save less than 2%.
Can I optimize a file I already compressed? You can try it, but keep both inputs and validate the result. A smaller file does not guarantee preservation of all features.
Does optimizing remove metadata or bookmarks? It is not a metadata-cleaning or comprehensive cleanup tool. Do not rely on it to scrub hidden data, and verify bookmarks and links in the output.
Your file stays with you
Re-saving happens inside your browser without uploading the document for processing. Local processing is useful for sensitive material, but it does not replace validation or your organization's handling rules. See are online PDF tools safe.