Why Re-Saving a PNG Can Make the File Bigger, Not Smaller
PNG is lossless, so re-saving a PNG as a PNG should produce an identical or near-identical file, right? While writing the format comparison for this site, I paste a PNG in, chose PNG as the output format, and watched the file come out larger than the original, not the same size, not smaller. That was surprising enough that I tested it on a second, completely different file to make sure it was not a fluke. It was not. Here is what is actually going on.
The Test
I converted two real PNGs through PasteDownloadApp's pipeline, selecting PNG as the output format for both, which routes the image through an HTML canvas and calls canvas.toBlob() to produce the file:
| File | Original size | After PNG re-encode | Change |
|---|---|---|---|
| Gradient illustration, 1672×941 | 1.15 MB | 1.93 MB | +68% |
| UI screenshot, 624×575 | 140.2 KB | 231.5 KB | +65% |
A third file, a 512×512 app icon, barely moved (22.3 KB to 22.2 KB), which turned out to be the clue that explained the other two.
Why This Happens: PNG Size Depends on the Encoder, Not Just the Pixels
PNG's lossless compression (DEFLATE, the same family of algorithm used in ZIP files) has a lot of tunable parameters: compression level, filter strategy per scanline, and whether the encoder spends extra time trying multiple filter approaches and keeping the smallest result. A dedicated PNG optimizer, or the export pipeline of a design tool, typically spends real computation trying several strategies and picking the best one. A browser's built-in canvas.toBlob('image/png') is optimized for speed, not for squeezing out every possible byte, since it has to run instantly on a UI thread rather than as a batch job.
The two source files that grew significantly, the illustration and the screenshot, had both been pre-optimized before they were ever uploaded to this site's own asset pipeline, almost certainly by a build tool that ran a proper PNG compressor. Once decoded into raw pixels and re-encoded by the browser's faster, less aggressive encoder, that prior optimization was gone, and the new file reflects only what the browser's default encoder settings produce. The 512×512 icon barely changed because it was already small and simple enough that there was little room for a better encoder to improve on.
What This Means for Format Choice
If your PNG is already optimized, whether by a build tool, an export setting in Figma or Photoshop, or a dedicated compressor, running it back through any browser-based canvas tool for a same-format "conversion" will very likely make it bigger, not smaller. This is not specific to PasteDownloadApp: it is how canvas.toBlob() works in every browser, since none of them run a full PNG optimization pass by default. The practical rule: only choose PNG as your output format when you actually need lossless output for a fresh capture (a new screenshot, for instance), not as a way to "clean up" or shrink an existing PNG. For an existing PNG that is already too large, WebP lossy at PasteDownloadApp's default quality produced files 96% and 88% smaller than the originals in the real compression numbers I tested separately, which is a far more effective path than re-saving as PNG.
Frequently Asked Questions
Does this mean PNG compression is broken in the browser?
No, it is working correctly, it is just optimized for encoding speed rather than minimum file size. The output is still a fully valid, lossless PNG; it is simply less aggressively compressed than a file that went through a dedicated optimizer.
Will converting the same PNG twice make it even bigger the second time?
No. Once decoded and re-encoded once by the same encoder with the same settings, a second round trip through canvas.toBlob produces an equivalent-sized file, since there is no more prior third-party optimization left to lose.
Is there a way to get a smaller PNG out of a browser-based tool?
Not through canvas.toBlob alone. Getting PNG file sizes down to what a dedicated optimizer produces requires a purpose-built compression library, which is a meaningfully heavier piece of code than a simple paste-and-convert tool. If PNG size matters more than format, a dedicated PNG optimizer is the right tool for that specific job.
Related Guides
Image Compression Quality Settings Explained, With Real File Sizes What a JPEG or WebP quality number actually changes, shown with real before-and-after file sizes.
PNG vs JPG vs WebP - Which Format Should You Save Your Image As? Learn the differences between PNG, JPG, and WebP, including quality, transparency, and file size.
How to Convert Several Screenshots Fast Without Batch Software PasteDownloadApp converts one image at a time. Here is the fastest real workflow for getting through a stack of them. Test it yourself at pastedownloadapp.com: paste an already-optimized PNG, choose PNG as the output, and compare the size PasteDownloadApp reports against the original file on disk.