Compress PDF
PopularAnalyze size and optimize losslessly.
About this tool
See exactly what's inflating your PDF and losslessly repack it in your browser. Deep image downsampling runs on a secure, auto-deleting server.
The main work runs in your browser, and on that path the file stays on your device. An optional, clearly labeled step uploads the file to a secure server — only when you start it, and only after the page confirms a server is available.
More details
Compress PDF starts by showing you why a file is big. Add a PDF and your browser counts its pages and images, measures the images' share of the file, and repacks it losslessly into compressed object streams. A verdict (“Lossless cleanup shrank this file”, “This PDF is image-heavy” or “This PDF is already lean”) sits above four figures: current size, pages, images and the lossless result.
That first pass runs online in your browser, on your device, and the PDF is not uploaded for it. Pages, text, bookmarks, filled-in form fields, title and author all carry over. Only a few metadata entries change: Producer and Creator become pdf.xyz, the modification date is updated, and a missing creation date is filled in. The drop box takes PDFs of up to 100 MB each.
A lossless repack cannot shrink images. So when it saves less than 3% and images make up 40% or more of the file, the headline points you to the optional deep image compression step, which uploads the PDF over TLS to pdf.xyz's secure server. There, Ghostscript downsamples and re-encodes images toward the resolution your Quality setting picks. A server without Ghostscript falls back to qpdf, which recompresses streams and may re-encode some images as JPEG, or to mutool, which only cleans up and recompresses the structure; neither downsamples, and neither reads the Quality setting. With “Grayscale” ticked, Ghostscript also turns every colour on the pages into shades of gray; a server without Ghostscript refuses that request instead of returning a colour file. With a “Target size” chosen, Ghostscript runs again at lower resolutions until the file fits, or the panel tells you the smallest it could make. Your upload is deleted when the job finishes, the result link expires after 60 minutes, and a daily storage rule erases the stored copy after that.
When to use it
Getting under an attachment limit
Email services and upload portals cap file size. The breakdown tells you whether a lossless pass might be enough or whether the images have to be downsampled before the file fits.
Phone scans and scanner output
A scanned contract or receipt is usually a stack of full-page photos. A lossless repack leaves those photos exactly as they are, so the deep step, set to Smaller or Balanced, is the one that can shrink it.
PDFs exported by older software or scripts
Files written without object streams keep their structure as plain, uncompressed text. Packing it into compressed object streams can cut the size without touching a page, and the file never leaves your browser.
A folder of invoices or statements
Select several PDFs and each is repacked in turn on your device. Download them one by one, or press “Download all” for a single ZIP. Deep image compression takes one file at a time.
What this tool can do
- Where it runs
- Lossless structural repack always runs in your browser; deep image compression is an optional, clearly-labeled secure-server step that needs a native engine.
How it works
1Add your PDF
Drop a PDF onto the box or click browse. One file opens the full analysis; two or more go to the in-browser batch list, where “Compress N PDFs” repacks each one.
2Read the breakdown
The headline and the tiles Current size, Pages, Images and Lossless result show what is inflating the file and what the repack already saved.
3Download the lossless copy
If the repack saved any bytes, press “Download optimized PDF”. The button shows the new size, and the file name gains “-optimized”.
4Optional: compress images on our server
In the “Deep image compression (secure server)” panel, pick Extreme, Smaller, Balanced or High quality; if the file has to fit a limit, choose a “Target size” (“100 KB”, “200 KB”, “500 KB” or “1 MB”, or “Custom”). Tick “Grayscale” if you want the pages in shades of gray, and press “Compress images on our server”, which uploads your file. If it shrank, or was converted to grayscale, press “Download compressed PDF”; with a target, the panel also says whether the file is under it. If nothing shrank, the panel says the original is already efficient.
Common questions
Will compressing my PDF make it look worse?
Not the lossless copy, which changes how the file is packed, not what is on the pages. Deep image compression is lossy: Extreme gives up the most detail, High quality the least, and Balanced is the default. Grayscale removes all colour from the copy; your original keeps it. Afterwards our server checks that the result opens as a PDF and, if it can count them, that no pages went missing; nothing compares how the images look, so open the result before deleting your original.
Is my file uploaded when I use Compress PDF?
Not by default. An optional, clearly labeled step uploads the file to a secure server — only when you start it, and only after the page confirms a server is available. Here that step is the “Compress images on our server” button: the analysis and the lossless copy both run in your browser, and the button is shown only once the panel has confirmed a secure server is available.
Can I compress a PDF to a specific target size?
Yes, on the deep step. In the “Deep image compression (secure server)” panel, choose a “Target size”: “100 KB”, “200 KB”, “500 KB” or “1 MB”, or “Custom” for a number of KB. Our server starts at your Quality setting and steps down, as far as Extreme, until the file fits, and returns the highest-quality version that does; the panel then says, for example, “Now 184.0 KB — under your 200 KB target.” A lower setting usually makes a smaller file but not always, so each setting it tries is measured; if none fits, you get the smallest file it made and the panel says it is above your target; tick “Grayscale” or split the file and try again. How small a file can get depends on how much of it is images: a mostly-text PDF may hardly shrink at all. “No target” is the default and runs exactly as before. The step uploads your file to our server, and each run starts from your original.
Why didn't my PDF get any smaller?
A mostly-text file that is already well packed has little to remove, so the page says “This PDF is already lean” and the Lossless result tile may read “No change”. Without Grayscale, our server never returns a file bigger than the one you sent; if it cannot shrink it, it says so and offers no download. With “Grayscale” ticked the gray copy is offered even when it did not get smaller, because your original is still in colour, and the panel says it did not get smaller.
What happens with a password-protected or damaged PDF?
A PDF that needs a password to open is refused with a request to unlock it with its password first. One that opens freely but restricts printing or editing cannot be repacked in your browser, so the page offers our secure server's deep step for it instead; our server may not be able to process an encrypted file, and says so if it cannot. In a batch of several files, such a file fails with a note to compress it on its own. An unreadable file gets an error instead of a download. On the deep step our server rejects a result with fewer pages than the original; if it cannot count the original's pages, it returns the smaller file with a warning that it was not checked page-for-page.
Does compressing keep a digital signature valid?
No. Both the lossless copy and the deep step write the file out anew instead of appending to it, and a signature covers the exact bytes it was applied to, so it stops validating. Compress before signing, or keep the signed original.
What happens to my file if I run the optional secure-server step?
Only then does the file leave your device. Inputs are wiped when the job finishes, the download link stops working after 60 minutes, and stored copies are erased by a daily storage rule.
How large can my file be?
Up to 100 MB per file.
Does compressing reduce the quality of my PDF?
Not in your browser: that step re-saves the same pages, packed more tightly, and every page looks exactly as before. Only the optional secure-server step changes quality — it lowers the resolution of images sharper than the level you pick: Extreme (72 DPI), Smaller (96 DPI), Balanced (150 DPI) or High quality (300 DPI). Its Grayscale switch is off unless you tick it: Turns every colour on the pages — pictures, text and drawings — into shades of gray. Our server checks the result and refuses it if a picture is still in colour.
How much smaller will my PDF get?
That depends on what the file holds, so no figure is promised in advance. The in-browser step measures the exact saving before you download, and offers the download only when the file got smaller. When it saves little and images make up 40% or more of the file, it points you to the secure-server step, which is where the images themselves are made smaller.
Related tools
All toolsGuides
All guidesHow to compress a PDF
Compress a PDF with a lossless repack that runs in your browser, or send image-heavy files through deep image compression on a secure, auto-deleting server.
Step-by-step guideHow to compress a PDF to 100 KB (or 200 KB)
Make a PDF fit an upload limit of 100 KB, 200 KB, 500 KB, or 1 MB: pick a target size, and our server shrinks the images until it fits or can go no smaller.
Related guideHow to crop a PDF and trim its margins
Trim PDF margins evenly or side by side, in points, millimetres or inches, or let Auto find the white margins for you. Runs in your browser, no account.
Related guideHow to convert WebP, GIF, or BMP images to PDF
Turn WebP, GIF, and BMP images into one PDF, mixed with JPGs and PNGs, one image per page. Your browser converts them, and no account is needed.
No sign-up required. Your files stay on your device until you run a tool.