HandyVale › Guides

PNG Size Reducer: What Actually Shrinks the File, Measured

Updated 2026-10-27 · handyvale.com

Short answer

The one reduction that changes nothing is colour reduction on a file that already uses 256 colours or fewer. On a 1,440 × 900 interface shot with 39 unique colours, a 256-entry palette cut 46.052% of the bytes and changed 0 of 1,296,000 pixels. On a 3,000 × 4,000 photo with 597,392 unique colours, the same move cut 74.199% and changed 64.761% of the pixels, worst case 89 of 255 levels.

So the order is fixed: strip the alpha channel if the image is opaque (−12.068% on the photo), drop the bit depth if it is 16-bit, re-encode at maximum effort (−3.136% from level 6 to 9), and only then decide whether colour reduction is acceptable. Re-encoding at maximum effort costs no pixels at all. Colour reduction is the only lever here that costs anything visible, and it is also the only one that can cut three quarters of the file.

Browser-side processing — your image is never uploaded · No login · No watermark · No file-size or use limit · PNG, JPG or WebP out

A PNG has no quality slider

JPEG asks how much to throw away. PNG cannot answer that question. The format is lossless by construction: filters, then LZ77-style dictionary compression, then Huffman coding, and the decoder returns exactly the bytes that went in. There is no quantisation table to turn down.

Which is why the “quality” control in a PNG reducer is not quality. It is colour count. Move it and you are no longer compressing a PNG, you are converting it to an indexed-colour image — 256 entries or fewer — and the pixels that fall between entries get snapped to the nearest one. That is a lossy step wearing a lossless format’s name.

The four tips that show up on every page about this, and in the summary box above the results, are correct: fewer colours, smaller dimensions, strip metadata, switch format. They are also useless without a number attached. Here are the numbers.

Three files, three different answers

Same encoder, same settings, three PNGs chosen to behave differently: a photograph, a flat interface shot, and an icon with a soft shadow. “Bytes” is the file at compression level 9 with no palette.

FilePixelsUnique coloursBytes at level 9Bytes per pixel
Photo3,000 × 4,000 = 12,000,000597,39210,309,7400.8591
Interface shot1,440 × 900 = 1,296,0003910,4600.0081
Icon, alpha shadow512 × 512 = 262,14424022,2520.0849

Bytes per pixel is the number to look at before you press anything. Above roughly half a byte per pixel the file is photographic, and colour reduction will chew it up. Below a hundredth of a byte per pixel it is flat artwork, and colour reduction is free. Those two files sit three orders of magnitude apart, and a single “reduce PNG by 70%” promise covers both.

Bytes, log scale (each gridline is 10×) 10M 1M 100K 10K Photo 10,309,740 2,660,064 Interface 10,460 3,290 Icon 22,252 3,913 level 9, no palette best case measured (palette, and for the interface also half size)

The icon’s 3,913 bytes came at a price the chart cannot show: every transparent pixel stopped being transparent. That is the next section but one.

Lever one: colour count

One photo, five palettes, five different trades. Percentages are against the same file at level 9, 10,309,740 bytes. “Changed” counts pixels whose decoded value differs from the original by any amount; “max” is the largest single-channel shift.

PaletteBytes% of orig.Bytes cutChangedMaxMean
256 colours2,660,06425.80%74.199%64.761%891.789
128 colours2,070,03820.08%79.922%65.588%882.335
64 colours1,545,66514.99%85.008%65.466%843.112
32 colours1,196,39011.60%88.396%65.157%1674.513
16 colours945,8659.17%90.826%65.647%1496.296

Look at the “changed” column. It barely moves — 64.761% down to 65.647% — while the mean shift quadruples from 1.789 to 6.296 levels. Cutting colours does not damage fewer pixels, it damages the same two thirds of them harder. A photo has 597,392 distinct values; almost every pixel is going to be remapped no matter which palette you pick. The only question is how far.

Now the same operation on the interface shot, 39 unique colours:

PaletteBytesBytes cutChangedMax
256 colours5,64346.052%00
16 colours3,98961.864%1.13% (14,644 px)15

Zero pixels changed, 46% of the bytes gone. That is not a compression trick, it is arithmetic: 39 colours fit in a 256-entry table, so nothing has to be approximated. The palette is a lossless move on this file and a lossy one on the photo, and the only thing separating them is how many unique colours the image happens to contain. A reducer that does not tell you which case you are in is asking you to guess.

The 16-colour row shows where flat art breaks: 14,644 pixels — 1.13% — moved, because the anti-aliased edges of the panels and the blurred text blocks need more than 16 values. Max shift 15 levels. Small, but no longer free.

Lever two: colour type and bit depth

PNG stores a colour type in its header, and the type decides how many channels ride along per pixel. An opaque image saved as truecolour-with-alpha carries a fourth channel of solid 255 for every pixel, and zlib has to encode it.

FileAs RGBAs RGBAExtra bytesExtra %
Photo (fully opaque)10,309,74011,553,9391,244,19912.068%
Interface shot (fully opaque)11,22812,5421,31411.703%

An editor that exports “PNG with transparency” by default will hand you the right-hand column even when nothing is transparent. It is 12% of your file, paid for a channel that is 255 everywhere.

Bit depth is the same story with a bigger multiplier. A 16-bit greyscale PNG of the test photo — 5,786,893 bytes — became 15,482 bytes at 8 bits per channel. That is 99.732% smaller, 373.8 times. The low eight bits of a 16-bit capture of an 8-bit source carry no information, and zlib still has to store them. If you did not shoot in 16-bit or grade in it, the depth is costing you a file size for nothing.

Lever three: encoder effort

This is the only lever that cannot touch a pixel, because the pixels never change. All that changes is how hard the encoder looks for repeated patterns before it gives up.

SettingPhotoInterface shot
Level 0 (stored, no compression)36,015,6563,890,236
Level 114,835,41245,620
Level 610,643,55511,228
Level 910,309,74010,460
Level 9 + optimize flag10,317,80310,460

Level 1 already captures 58.808% of the total gain over the uncompressed file. Going from 1 to 9 buys another 30.506%. Going from 6 to 9 buys 3.136%. And the optimize flag made the photo 8,063 bytes larger than plain level 9 — a real result, not a typo: the flag re-tries filter combinations, and on this image it picked a worse one. Effort has a ceiling, and past level 6 you are paying seconds for single-digit percentages.

Re-saving an already-optimized file moved 0 bytes. 10,317,803 in, 10,317,803 out. Once the encoder has found the floor, a second pass has nothing left to find. If a tool reports a big saving on a file that has already been through it, it is not recompressing — it is reducing colours or dimensions and calling that compression.

Lever four: pixel count

Halving the width and height cuts the pixel count to a quarter, and PNG responds roughly in proportion — not exactly, because the downscale smooths detail that was expensive to encode.

FileBeforeAfter half sizeBytes cut
Photo 3,000 × 4,00010,309,7403,171,698 (1,500 × 2,000)69.236%
Interface 1,440 × 90010,4607,809 (720 × 450)25.344%

The interface shot gains far less, and the reason is instructive: it was already tiny, so most of its bytes were structural overhead, not pixel data. Shrinking a 10 KB file cannot save what is not there. Shrinking a 10 MB photo can. Combine the two levers on the interface shot — half size, then 256 colours — and it lands at 3,290 bytes, 68.547% below where it started.

The alpha trap: 77,343 transparent pixels came back

The icon had 240 distinct alpha values, 184,540 pixels with partial transparency (70.397% of its 262,144), 77,343 fully transparent and 261 fully opaque. A soft shadow is exactly the case where alpha carries the design.

Run the fast palette path — 256 entries, alpha folded into the palette — and the file drops to 3,913 bytes, 81.718% smaller. It also ends with zero fully transparent pixels, 8 distinct alpha values instead of 240, and 254,455 pixels whose alpha changed. The shadow turned into a grey haze over the whole canvas, corners included. In a browser on a white page you would call it a bug. In a dark-mode app you would see a rectangle.

Run the careful path instead — reduce the colour channels to 256, carry the alpha channel through untouched — and the file is 21,404 bytes. Not smaller than plain re-encoding at level 9. Zero bytes saved, because the alpha channel was most of what made the file big, and the palette only touched the other three channels.

That is the honest summary for alpha artwork: colour reduction either eats the soft edge or saves nothing. If you need the edge, the levers left are dimensions, bit depth and encoder effort.

Your call, not ours: whether a 64.761%-of-pixels change is acceptable on your image. On a flat logo it is invisible. On skin, a clear sky, or a product shot with a gradient backdrop it bands, and no percentage tells you where your picture crosses that line. Look at the two versions side by side at 100% before you overwrite anything.

How to reduce PNG file size without breaking the file

Same order every time, because the free levers should be spent before the expensive one:

  1. Resize to the width it will be displayed at. Measured: 69.236% off the photo, 25.344% off the interface shot. Nothing else comes close per unit of effort.
  2. Check the colour type. If the image is opaque, export RGB not RGBA: 12.068% and 11.703% on the two test files.
  3. Check the bit depth. 16-bit only if the source really is 16-bit. Measured 99.732% off an 8-bit-source file stored at 16.
  4. Re-encode at level 9. 3.136% over level 6 on the photo, 6.84% on the interface shot. Free in pixels.
  5. Count the unique colours. Under 256, a palette is mathematically lossless — 0 pixels changed on the 39-colour file. Over 256, it is a lossy conversion, and the table above tells you what it costs.
  6. Strip metadata. A constructed worst case: 4,000 characters of text plus a 3,000-byte colour profile added 4,108 bytes to an 11,228-byte file, 36.587%. Real camera files carry less, but the direction holds, and the profile is sometimes the only reason two identical images look different.
  7. Consider the format, honestly. The same photo as a PNG is 10,309,740 bytes; as a JPEG at quality 85 it is 1,638,783. PNG is 6.30 times larger. Even after the 256-colour cut, the PNG is 2,660,064 bytes — 1.62 times the JPEG. If nothing in the image is transparent, PNG is the wrong container and no reducer fixes that.
Your call, not ours: where this file is going. An app asset that ships inside a bundle, an image on a page, a file someone will open in an editor later — three different answers. Only you know whether the copy you are about to overwrite is the last one with the original colours in it. Keep the master.
Compress an image to a target size — in the browser, no upload

What was measured, and what was not

Related guides

Frequently asked questions

For the web, PNG or JPEG — which has higher quality?

PNG, by definition: it returns the exact pixels it was given, and JPEG does not. But quality is rarely the binding constraint. The same 3,000 × 4,000 photo is 10,309,740 bytes as PNG and 1,638,783 bytes as a JPEG at quality 85 — PNG is 6.30 times the size for a difference most viewers will not find on a photograph. Where PNG wins outright is flat artwork, text and anything with transparency, where JPEG’s block coding shows up as fringing around every edge. Choose by content, not by format loyalty.

How do I speed up image loading on my website?

In this order: resize to the width the layout actually renders, check the colour type is RGB when the image is opaque, re-encode at maximum effort, then decide about colour reduction. On the interface test file that sequence went 11,228 → 10,460 → 5,643 bytes, and with a half-size render 3,290 bytes, 68.547% below the start. The single biggest item is almost always dimensions, because a 3,000-pixel-wide image displayed at 600 pixels is carrying four times the pixels anyone sees.

Can I undo colour reduction?

No. Once 597,392 colours are mapped onto 256 entries, the discarded values are gone from the file; opening it and saving it again cannot bring them back. That is why the master copy matters and why re-running an optimizer on an already-optimized file moved 0 bytes in our test — there was nothing left to recover or to remove. Work on a copy, compare at 100%, then replace.