PNG compression is not simply JPEG compression with a different filename. You can re-encode decoded pixels losslessly, or you can first reduce the number of colors and then encode the simplified result. Both can produce a valid PNG, but only the first aims to preserve all decoded color values.

Choose based on the image’s purpose. A logo, software screenshot, gradient illustration and camera photograph do not need the same treatment.

Start with a lossless reference

Open the PNG compressor and select the all-colors lossless option when colors must not change. Process one image and compare the actual bytes with the source.

Lossless re-encoding does not guarantee a smaller file. The original may already be efficiently compressed, while a browser-based decode and encode may use different container settings. A larger result is a reason to keep the smaller original when appropriate, not proof that the image gained quality.

“Lossless” here refers to encoding the decoded pixel result. It does not promise preservation of every metadata chunk, original file byte or color-management behavior through the browser workflow.

Try palette reduction for suitable artwork

For icons, flat illustrations and some screenshots, reducing the palette to 256, 128 or 64 colors can make the image smaller while keeping it visually useful. Begin with the less aggressive choice and compare.

Palette reduction changes pixel colors. A gradient can develop bands; an antialiased font can become rough; a small accent color can shift. Do not describe those changes as pixel-identical lossless compression just because the final PNG encoding is lossless.

Image type Reasonable first test Detail to inspect
Flat icon or simple logo 256-color palette Brand colors and edge antialiasing
Software screenshot Lossless, then cautious palette test Small text and subtle interface shades
Smooth gradient artwork Lossless first Banding and transparency transitions
Camera photograph Resize or an accepted alternative format Texture, skin and large smooth areas

These are starting tests, not rules that guarantee a saving. The image content and destination decide which result is acceptable.

Preserve transparency on purpose

Keep PNG output for a cutout or logo that needs alpha. Inspect partly transparent shadows and edges after palette reduction, not only the large opaque areas. Fewer colors can change the appearance of those transitions.

If your destination supports it, PNG to WebP is another option. WebP supports transparency as well as different compression modes, but the website’s browser encoder and the receiving application still determine which export is usable. Check the actual result rather than assuming a fixed percentage saving.

Converting to JPEG discards transparency. If JPEG is required, choose a background color using the PNG-to-JPG guide.

Reduce unused dimensions before destroying detail

A screenshot delivered at twice its needed width and height has four times as many pixels as the smaller version. If its text remains readable at the intended display size, a deliberate resize may be better than an extreme palette reduction.

Keep dimensions unchanged when an asset must match an exact UI or print specification. For a strict byte target, inspect whether the compressor reduces dimensions to fit and verify the resulting grid. KB versus pixels explains why both checks matter.

Choose an acceptable export, not just the smallest one

Download a representative image and inspect it over the intended background. For a batch, include a detailed screenshot, a gradient and a transparent asset in your review. One easy icon cannot stand in for all three.

Keep-original optimization can retain an unchanged source when it is smaller and otherwise suitable. That also retains the source metadata. Disable it when a fresh encoding is required, and keep the original separately when it remains the best delivery asset.