Small SEO Tools

Why a PNG Gets Larger After Compression

A PNG can become larger after passing through a browser image compressor, even when its pixel dimensions stay unchanged. For a small graphic, the original may already use a compact indexed-color representation that the new export does not retain.

Use the Image Compressor to compare a candidate with your original, then decide whether the new file earns its place. Keeping the original is a useful result when re-encoding adds bytes without providing a needed change.

Read both size fields when Saved says zero

The current compressor displays Original, Compressed and Saved. Its Saved percentage stops at zero when the output is larger. That means 0% Saved can describe growth; it does not establish that the two files have the same size.

Compare Original with Compressed and read the before-and-after captions. For a close decision, download the candidate and compare the actual file byte counts. Our guide to checking an exact image byte limit explains why rounded displays are insufficient for a strict upload cap.

PNG is a format with several pixel representations

An indexed-color PNG stores a palette and an index for each pixel. A truecolor PNG stores color channel values instead, with an optional alpha channel. The W3C PNG specification describes these representations and how indexing can make limited-color images more efficient to encode.

Two files can therefore both be PNG, show the same picture and occupy different numbers of bytes. Filtering and compression choices also affect the result. A palette is not a universal promise of a smaller file, and the PNG extension alone does not tell you which representation a file uses.

The tool redraws the loaded image on a canvas and exports a new PNG. Keep original format preserves PNG as the chosen format for this PNG input; it does not promise to preserve its palette or original encoded bytes. A format-aware image editor or inspector can help confirm whether your source is indexed-color.

Compare a PNG export without resizing it

  1. Keep the source file separately. Load that PNG using Choose an image to compress; the current displayed input limit is 20 MB.
  2. Choose Keep original format under Output format. The menu also offers JPEG and WebP, which would make this a different comparison.
  3. Leave Maximum width in px blank. Confirm that the before-and-after captions show the same width and height.
  4. Read the size fields and the PNG note. The current PNG path ignores the Quality slider. MDN documents canvas quality settings for lossy formats, such as JPEG and WebP; this slider is not a PNG compression-level control.
  5. Use Download compressed if you need to inspect the candidate. Open that saved file, check its dimensions and compare its details with the original.

If the PNG grew, repeatedly lowering Quality will not fix this PNG export. Return to the actual size comparison before making another candidate.

What the indexed-color test showed

We created one opaque, four-color diagram at 256 by 128 pixels. Its original PNG used two-bit palette indexes. We ran the current compressor code locally in Chrome, selected Keep original format and left Maximum width blank.

File Bytes PNG representation
Original 196 Indexed-color, two-bit indexes
PNG at Quality 80 1,521 Truecolor with alpha, eight-bit channels
PNG at Quality 20 1,521 Truecolor with alpha, eight-bit channels

An independent PNG header check identified those representations. A separate image decoder confirmed unchanged dimensions and zero differing RGBA pixels. The two exports were also byte-identical. Both showed 0% Saved, although each contained 1,325 more bytes than the original.

This was one synthetic graphic and one browser encoder. The measured representation change helps explain this case; it does not prove that every extra byte came from the palette change or predict another PNG result.

For this task, the smaller original already supplied the required pixels, so the larger export offered no size benefit. Make the same decision from your own file requirements and saved result. If dimensions or another format must change, follow the broader website image compression workflow and inspect that separate candidate.