Compress in three steps
- Add your PDF.
- Pick a level, or type a target size.
- Compress and download the smaller copy.
For all the compression options, see Compress PDF.
How compression runs in your browser
- Reading the file. When you add a PDF, the browser reads it from your disk into the page's memory. Your file isn't sent anywhere.
- Finding the images. pdf-lib, an open-source JavaScript PDF library, opens the file and lists the images inside it. Large 8-bit color or grayscale images stored as JPEG or Flate data are candidates; CMYK and other unusual images are left as they are.
- Recompressing them. Each image is decoded by the browser, drawn smaller onto an off-screen canvas, and re-encoded as JPEG by the browser's own image encoder. If the new version isn't smaller, the original image is kept. With a target size, PDFWrangle steps down through quality and scale settings until the file fits or can't get smaller.
- Saving. pdf-lib writes the new PDF in memory, and the download comes from a blob: link, which points at your browser's memory rather than at a server.
- Convert pages to images. This option uses pdf.js (pdfjs-dist), Mozilla's open-source PDF renderer, to draw each page onto a canvas. pdf-lib then builds a new PDF from those page images. pdf.js runs part of its work in a helper file, the pdf.js worker, which your browser downloads from pdfwrangle.com once, in the background, shortly after the page loads. It's kept in memory and reused for every file.
What your browser downloads
Almost everything you see in the Network panel is your browser downloading something from pdfwrangle.com, not sending your file to it. When a page loads, that includes the page itself, its JavaScript files under /_next/static/, fonts, the logo, and small page-data files for the links in the menu (their names end in .txt?_rsc=…), which the site prefetches so other pages open faster. All of these are GET requests, and none carries your file.
Two kinds of small requests go the other way, and neither carries your file. When the page loads, Cloudflare Web Analytics downloads a small script from static.cloudflareinsights.com and sends an anonymous page-view report to Cloudflare. And after you use a tool, the page sends one small anonymous usage event, a POST request to pdfwrangle.com/api/e, saying which tool you used, whether it worked and a rough file size range such as "1–5 MB". It never includes your file, its name or its contents. If your browser sends a Global Privacy Control or Do Not Track signal, the usage event isn't sent. Our privacy policy has the details.
The compression code, including pdf-lib, arrives with the page. A moment after the page appears, it also downloads pdf.js and its worker (about 1.4 MB in total) in the background, even if you never tick Convert pages to images, so the option is ready when you need it. The worker is a file under /v/ whose name starts with pdf.worker. It's downloaded once per visit, and nothing is fetched again when you compress.
Verify it yourself
Test 1: compress with the internet switched off.
- Open this page and wait until it has fully loaded, then give it a few more seconds so the background download of the PDF renderer can finish.
- Disconnect: turn off Wi-Fi or unplug the cable, or choose Offline in the throttling menu of your browser's DevTools Network tab.
- Add a PDF, compress it and download the result. Then tick Convert pages to images and compress another one. Both work, because no server is needed. The usage event simply isn't sent while you're offline.
If you disconnect too early, before the page has finished loading, the tool may not appear or may report an error. That's a download that didn't reach you, not a blocked upload. Reconnect, reload the page and start again.
Test 2: watch the Network panel.
- Open the tool page and wait until it has fully loaded.
- Open your browser's developer tools: press F12 (Windows, Linux) or Cmd+Option+I (Mac) in Chrome, Edge or Firefox, and select the Network tab.
- Clear the list (the clear button in the Network toolbar), so only new requests appear from now on.
- Add a PDF and click Compress. Try it with Convert pages to images ticked, too.
- Look through the new requests. To show the Method column in Chrome or Edge, right-click a column header and tick Method. An upload would show up as a POST or PUT request with a body about as large as your file. You should find none. You will see one small POST request to /api/e after you use the tool: that's the anonymous usage event described above. Click it and open the Payload tab (Request in Firefox) to see exactly what it sends: a few short fields of text, not your file. You may also see a request to Cloudflare Web Analytics. The page already downloaded the PDF renderer in the background while it loaded, so apart from the usage event, compressing usually adds no new requests to pdfwrangle.com. With Convert pages to images you may see a blob: entry: that's the pdf.js worker starting from your browser's own memory, not a transfer.
Related tools
- Compress PDF: the main compression tool
- Compress PDF to 1MB
- Compress PDF for email
- PDFWrangle vs Smallpdf Compress
- Privacy policy
- All PDF tools