PNG Compressor

Choose a PNG and the number of colours it may keep. Fewer colours give a smaller file. The picture is reduced on your device and you download the new PNG.

Free Runs in your browser Checked Tuesday, November 10, 2026

This tool runs in your browser. What you enter is not sent to us.

How to use it

  1. Click Choose a file and pick a PNG, or drop it on the box. The picture size is shown under its name.
  2. Choose the Colours to keep. Start with 256, the most exact, and go down until the picture looks wrong.
  3. Click Compress the PNG, then download the new file. The size before and after is shown next to it.

How a palette PNG is made

A PNG can store each pixel as an index into a colour table (colour type 3), so each pixel needs one byte, or fewer bits when the table is small. This tool picks the colours from the pixels of your picture with a colour quantiser, writes each pixel as its index, and compresses the rows with deflate, the same method PNG always uses.

The PNG specification requires a PLTE chunk for this colour type and allows bit depths of 1, 2, 4 and 8, so a table of 16 colours uses four bits a pixel. Transparency is kept in the tRNS chunk: each colour gets its own alpha value, and colours that are not listed there are fully opaque.

What is lost, and what is not

Reducing the colours is lossy. A photograph with smooth gradients loses detail quickly as the number of colours falls, while a logo, an icon or a screenshot often keeps its look at fewer colours. The page shows the size before and after, so you can choose the smallest file that still looks right.

The tool does not resize the picture, and it does not change its transparency. A picture that already has few colours and is well compressed may come out larger; the note then says so, and the original file is the better choice.

Example: a 1200 × 800 logo

A logo of 1200 × 800 pixels reduced to 16 colours uses four bits for each pixel. Its raw pixel data is 480,800 bytes: 800 rows of 600 bytes, each row with one filter byte. The same picture stored as 24-bit colour would need 2,880,800 bytes before compression. Deflate then shrinks the rows further, and the size shown after compression is the one that counts.

Frequently asked questions

Is my PNG uploaded when I compress it?

No. The picture is read by your browser, its colours are chosen and the new PNG is written on your device. You can check this by turning off your internet connection after the page has loaded and compressing a small PNG.

Does compressing a PNG here change its quality?

Yes, the colours are reduced, so the result is lossy. The fewer colours you keep, the more the colours differ from the original. Choose the smallest number of colours at which the picture still looks right.

Is the transparent background kept?

Yes. Transparency is written in the tRNS chunk of the PNG, so the background stays transparent and semi-transparent edges keep their alpha values.

Why is the new PNG sometimes bigger than the original?

A PNG that was already saved with few colours and good compression can get no smaller by a palette. The page then says the new file is larger, and the original is the better file to keep.

What is the largest picture this tool can compress?

The picture is decoded by your browser and capped at about 50 million pixels, or 16 million on iPhone and iPad. Larger pictures are scaled down to that cap before the colours are reduced.

Sources

Figures and text last checked on Tuesday, November 10, 2026.

We use necessary cookies to run the site. With your consent, Google also uses advertising cookies to show personalised ads. If you reject them, you still see ads, but they are not personalised.