The most common question about our tools comes down to this: surely it has to be uploaded somewhere. The assumption runs deep, and for a long time it was correct. Today it no longer is, at least not necessarily. This article explains what happens instead, using a concrete example: shrinking a scanned PDF from 18 megabytes to 3.5 without the file ever leaving your computer.
The short answer
The browser stopped being a display surface a while ago. It has become a runtime. It can read files, compute images, assemble file formats and hand you the result for download, all inside the page you opened. A service built that way needs the server only to send you the program. After that the server has nothing left to do.
That does not mean everyone works this way. It means nobody is forced to work any other way.
What actually happens, step by step
When you pick a PDF to shrink on our site, this is the sequence. The names in brackets are the browser interfaces involved, not to show off, but so you can look them up.
1. The file is read, not transferred. A file input grants the page read access to the file (File). The distinction is easy to miss: the page does not receive your file, it is allowed to read it. What it does with that is up to its program.
2. A worker takes the document apart. Reading the PDF format is handled by pdf.js, the same library Firefox uses to display PDFs. It runs in its own thread (Web Worker) so the page does not freeze while thirty pages are processed.
3. Every page is examined and sorted. This is where the real work happens, and it is a decision rather than a technique. A page without extractable text is a scan, a photograph of paper. It can be recomputed, because there is no text that could be lost. A page with text is a different matter: recompute it and letters become a picture of letters. No longer selectable, no longer searchable, no longer readable aloud. That is a genuine loss, and on our site it only happens if you tick the box.
4. The image pages are redrawn. The page is painted onto a drawing surface (<canvas>), at the resolution you asked for rather than the original one. Then the browser is asked to pack that surface into a JPEG (canvas.toBlob(…, "image/jpeg", quality)). The JPEG encoder lives inside the browser, has done for decades, heavily optimised, written in C. Nobody needs to ship it.
5. A new PDF is assembled. The freshly computed images and the untouched text pages are combined into a new document (pdf-lib).
6. The result gets an address in memory. The finished block of data receives a blob: address, an identifier valid only inside your browser, with no counterpart anywhere else. The download button points at it. Close the tab and it is gone.
Not one of those six steps involves a server.
It is not “WebAssembly”, it is three different engines
Look up why browsers can do this today and you quickly land on WebAssembly, and it starts to sound like the answer to everything. On our site that is true for exactly one tool. In practice three different approaches work side by side, and which one applies depends on the job.
Ordinary JavaScript goes further than people expect. Reading a PDF, sorting pages, assembling a new document: that is structural work, not number crunching. Shrinking a PDF needs no WebAssembly at all, because the expensive part, JPEG encoding, is done by the browser itself.
WebAssembly earns its keep where a finished program from the C world is needed and nobody wants to rewrite it in JavaScript. For us that is mainly decoding HEIC images of the kind iPhones produce: a translation of the libheif library, 1.4 megabytes. It is loaded only when somebody actually brings a HEIC file along.
WebCodecs is the youngest of the three and the only one that involves the graphics card. Video cannot be handled sensibly by the first two: a single frame of a 4K film is eight million pixels, and fifty of them go past every second. Through WebCodecs the page reaches the same hardware decoder a video player uses.
The practical consequence: “runs in the browser” is not one technique but a decision made per tool. And some jobs still have no good answer today.
Where the limits are
An article that lists only the advantages is advertising. The honest list:
Memory is the hard limit. The source file sits in memory in full, together with the PDF reader's structures and the growing result. We therefore allow at most 150 megabytes, which for a scan is roughly a hundred pages. A server with 32 gigabytes of memory does not have this problem. Anyone working with files of that size is better off with a server, and that should be sayable.
Not every format is open. The browser handles common image, PDF and video formats. With exotic or licence-encumbered ones it stops, and no amount of programming helps.
Quality is a decision, not magic. Shrinking means lowering resolution, and at some point you can see it. Our three levels are measured, not estimated: a scanned page of 18.4 MB becomes 5.8 MB at 200 dpi (indistinguishable from the original), 3.5 MB at 150 dpi (clearly legible, a touch softer), 2.5 MB at 120 dpi (visibly degraded). We offer nothing below 100 dpi. That would be a tool trading its promise for its result.
The first visit is slower. The program has to be loaded once, after all. In return the second run is fast, and there is no queue with other people ahead of you.
How to tell whether a service really does it
The pleasant thing about this design is that it can be verified, and without any expertise. If a tool genuinely computes inside your browser, then it also computes without an internet connection.
- Open the service and convert a file once, completely normally. That loads everything the page needs.
- Press F12, open the Network tab, set throttling to “Offline”.
- Convert the same file again.
- Does a result appear? Then the file went nowhere, because without a connection it cannot. Error or hang? Then the service needs its server.
The first run with a connection matters: otherwise it fails at loading rather than at the actual question. The test works with any provider, including us.
What we measured on ourselves
We put it to the test with more effort than strictly necessary, because we wanted to state a number rather than a claim.
That needs an unusual test file: a PDF of 5,012,434 bytes whose content is random noise. The reason is the crux. An ordinary file could be packed down in transit, and a service could upload five megabytes while sending only three hundred kilobytes over the wire. Noise cannot be made smaller; gzip and zstd make this file larger. If it goes up, you see it.
Then we placed a counter between browser and network that records how many bytes go to which machine, without decrypting anything, since the amount is all this question needs. The counter was calibrated against a receiver of our own: 5,012,434 bytes of file, 5,021,018 counted. The 0.17 per cent difference is the encryption envelope.
The result for “compress PDF” on gl.tools:
| sent upwards, total | 4,887 bytes |
| of that, for the conversion | 0 bytes |
| machines contacted | 1, the one serving the page |
| downloaded | 1.2 MB (the program) |
The 4,887 bytes are the page visit itself: the request for the page and its parts. Converting the five megabyte file added nothing.
That single contacted machine matters to us almost more than the zero. A file staying where it is does not yet mean that nothing about you leaves your computer. Tracking pixels, ad networks and error reporters do exactly that, even though they never see your file. Those are two different promises, and they deserve to be judged separately.
Last measured 28 November 2026. The figures come from our own test program; the description of the tools matches the current state of the source code. If something changes, this page changes.