Skip to content

Compress PNG

Compress PNG files with this free online tool. It works by colour reduction: your picture is reduced to at most 256 colours, which makes the file smaller but is lossy. Pick a quality, or a target size in KB, and download the result.

  • PNG compression here reduces colours to 256 and is lossy, even though PNG is a lossless format.
  • Photographs and smooth gradients can get larger or show dithering. Try JPEG or WebP output, or Lossless PNG.
  • The web tool handles one image at a time, up to 5 MB per image without an account.

Drop an image here

PNG, JPG, WebP, AVIF, GIF, BMP or TIFF, up to 5 MB

PNG is made smaller by reducing the picture to at most 256 colours. That suits icons, illustrations and screenshots, not photographs or smooth gradients.

Lower means a smaller file and more visible loss (1 to 100, default 75).

Complete the human check to enable the button.

Result

Your PNG will appear here.

The free web tool takes images up to 5 MB, 30 per day. Signed in, the limit is 10 MB.

Retention: web-tool results are deleted after 10 minutes and no history is kept. API results are kept 1 day on the free plan and 7 days on Starter and Pro (30 days on Business).

  • No account needed

    30 images per day for free, no watermark.

  • Same pixel size

    Compression makes the file smaller without changing the width and height. Camera and location tags are not copied into the result.

  • Deleted automatically

    Web tool results are removed after 10 minutes.

Privacy: what you submit is used only to make this file. The working copy is deleted when the job ends, the result after 10 minutes. See the privacy policy.

Do this from your code

The same request, built from the input and options above. Create an account to get an API key.

curl -X POST https://api.aiipworld.com/v1/render \
  -H "Authorization: Bearer $AIIPWORLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html":"","output":"pdf","options":{}}'

# returns {"job_id": "...", "status": "queued"}; then poll:
curl https://api.aiipworld.com/v1/jobs/JOB_ID -H "Authorization: Bearer $AIIPWORLD_API_KEY"

Batches

The web tool handles 1 image at a time. The API takes one request per image, so you can script as many as your plan allows.

Retention

Web-tool results are kept 10 minutes; free API results 1 day; Starter and Pro results 7 days; Business 30 days. The web tool allows 10 conversions per minute and 50 per day per visitor.

In one sentence

A free online tool that makes a PNG file smaller by reducing it to at most 256 colours (lossy), or without colour reduction when you tick Lossless PNG, with the same pixel size.

Key facts

  • Input: PNG, JPG, WebP, AVIF, GIF, BMP or TIFF, up to 5 MB in the free tool and 10 MB when signed in, and up to 16 MP (4096 x 4096); the type is read from the file content, and HEIC, SVG, PDF and camera RAW files are not accepted.
  • Output: a PNG with at most 256 colours (palette quantisation with dithering, lossy) that keeps transparency; it suits icons, logos, illustrations and screenshots, not photographs or smooth gradients, which can show dithering or get larger. Quality 1 to 100 (default 75) or a target size in KB.
  • In our test a flat 1600 x 1200 px illustration of 90 KB became a 15 KB PNG at quality 75 and 62 KB with Lossless PNG, while a smooth gradient PNG of 48 KB grew to 76 KB; the test pictures were generated by our scripts.
  • The upload is deleted when the job ends and the result after 10 minutes; signed-in users pay 1 credit per image.
  • Free without an account: up to 10 conversions per minute and 50 per day per visitor, no watermark. Signed in, each render costs 1 credit (100 free credits every month).
  • Files are deleted automatically: 10 minutes after conversion without an account, 1 day with a free account.
  • Developers can run the same render with POST https://api.aiipworld.com/v1/render and an API key (see the API docs page).

How it works

  1. Upload your PNG file. The tool checks its type, size and pixel count before upload.
  2. Check the preview and the image size shown before you start.
  3. Keep Output format on PNG (colours reduced to 256), or choose JPEG, WebP or "Same as the original".
  4. Set the quality (default 75), or a target file size in KB. Tick "Lossless" to skip colour reduction.
  5. Run the compression and download the result. Read the panel to see the new size and the colour limit.

Example output

Original PNG, 1600 x 1200 px, 90 KB

The sample illustration before compression

Compressed PNG, quality 75, 256 colours, 15 KB

The sample illustration after PNG compression
The flat test illustration (1600 x 1200 px PNG, 90 KB) compressed with PNG at quality 75: a 15 KB PNG reduced to 256 colours, 83% smaller, with the same pixel size. Converted by this site's own engine. Open the converted file (or select the picture) to see it at full size.

How to compress a PNG

Start by uploading your PNG file to the tool above. The browser checks the file type, size and pixel count, and shows a preview with the image size. Then choose your settings and run the compression.

When the job finishes, the result panel shows the original size, the new size and the percentage saved. For PNG output it also shows the colour limit that was used. Download the file if the result suits you.

  • Check the result panel before you replace your original file.
  • Keep a copy of the original in case you need the full colour set later.

What PNG compression does here

This tool makes a PNG file smaller by palette quantisation. The picture is reduced to at most 256 colours, with dithering, by libimagequant. This is lossy, even though PNG itself is a lossless format.

The pixel size of the picture never changes. The tool keeps transparency by default. There is no resize step, so the width and height stay the same.

Colour reduction: 256 colours at most

Colour reduction is the main way this tool makes a PNG smaller. Each pixel is mapped to one of at most 256 colours in a palette. Dithering may be used to blend the colours, so edges and gradients can look different from the original.

The quality setting controls how hard the colour reduction works. In our tests, the flat illustration came out at 15 KB at quality 50 and 17 KB at quality 90, so the setting moved the size only a little. Results vary by picture.

Which pictures it suits

Colour reduction suits pictures with a small number of flat colours. Icons, logos, illustrations, diagrams and screenshots are good examples. Many of these have sharp edges and few colours, so 256 colours is often enough.

In our tests, a flat 1600 x 1200 illustration went from 90 KB to 15 KB at the default quality of 75. A transparent 1024 x 1024 logo went from 37 KB to 8.1 KB. Results vary with each picture.

Which pictures it does not suit

Photographs and smooth gradients do not suit colour reduction. A photograph reduced to 256 colours can show dithering or banding. A smooth gradient can even become larger.

In our tests, a smooth 1200 x 600 gradient went from 48 KB to 76 KB at quality 75. The panel warned that the result was not smaller. For these pictures, choose JPEG or WebP in "Output format", or tick "Lossless" for PNG.

Choosing the quality

The quality setting runs from 1 to 100, and the default is 75. A higher quality keeps more detail in the colour reduction, but the file may be larger. A lower quality makes the file smaller, but may look rougher.

Changing the quality does not always change the size much. In our tests, a flat illustration moved only between 15 KB and 17 KB when quality went from 50 to 90. Try a few settings and compare the results.

Compress a PNG to a target size in KB

You can set a target file size in KB instead of a quality value. The tool searches for a quality that gets close to your target, with at most 7 trial encodes. For PNG, if the target is still not reached, it steps down the palette.

If the target cannot be reached, the tool returns the smallest result it found. The panel says the target was not reached. In our tests, a 20 KB target was reached at 18 KB, and a 10 KB target was not reached; the smallest result was 15 KB.

  • Enter a target in KB, or a quality value. Do not use both at once.
  • A search may stop early to stay inside the time limit. The panel then says so.

Lossless PNG: no colour reduction

Tick "Lossless" to skip colour reduction. This keeps every colour and every pixel. The tool uses only the strongest deflate setting, so the file is smaller only if the original was not already well compressed.

In our tests, a flat illustration went from 90 KB to 62 KB with Lossless PNG. MDN advises lossless encoding for screenshots, diagrams, logos and line art, because blurring and coloured fringes around text and sharp edges are very visible.

Transparency and the background colour

The tool keeps transparency, which is the alpha channel, by default. A transparent logo stays transparent after colour reduction. Lossless PNG also keeps transparency.

If you change the output to JPEG, transparent areas are filled with the background colour. JPEG has no transparency, so choose the background colour before you run the job.

Which files the compressor accepts

The compressor accepts PNG, JPG (also .jpeg and .jfif), WebP, AVIF, GIF, BMP and TIFF. It does not accept SVG, PDF, HEIC/HEIF, BigTIFF or camera RAW files. The file type is read from the file content, not the file name.

Free web tool limits: up to 5 MB per image, 30 images per day per visitor, and up to 16 MP (4096 x 4096) per image. Signed-in users can upload up to 10 MB per image. Signed-in users pay 1 credit per image, plus 1 credit for each 5 MB of result after the first 5 MB. If the result is larger than 20 MB, the job fails with an "output too large" message.

Compress PNG from code

Use the API to send an image to the compressor from your own code. Send the raw image bytes as the request body, with a Content-Type such as image/png. Use op=image_compress and set your options in the query string. The API takes one request per image, and there is no batch endpoint.

The job returns a job ID that you check until it succeeds or fails. The API docs cover the parameters. The page shows a ready cURL, Node and Python example below the tool.

Privacy: what happens to your file

Your image is sent to our server; it is not processed in the browser. The uploaded image is used only to make the result, and it is deleted as soon as the job ends, whether it succeeds or fails. You must have the right to use any image you upload, under the Acceptable Use Policy.

The result is deleted after 10 minutes in the free web tool. No history is kept, and download links are short-lived. Camera and location tags are not copied into the result.

Questions

Can I compress a PNG for free?

Yes. You can compress a PNG on this page for free, with no signup, within the free limits shown above.

Is PNG compression lossy or lossless here?

Lossy by default. The tool reduces colours to at most 256, which is lossy. Tick "Lossless" to keep every colour.

How many colours does the compressed PNG have?

At most 256. The result panel shows the colour limit that was used.

Why did my PNG get bigger?

Smooth gradients and some photographs can grow after colour reduction. The panel warns you when the result is not smaller than the original, and the file is still offered.

Will transparency be kept?

Yes, transparency is kept by default. Lossless PNG keeps it as well.

Can I compress a PNG to a specific size in KB?

Yes. Enter a target size in KB from 1 to 20480. The tool searches for a result close to it, but if the target is not reached, the panel says so.

What quality should I use?

Start with the default of 75. Try a few values, because results vary by picture.

Does it change the picture size in pixels?

No. The pixel size never changes, and there is no resize in this tool.

Should I compress a photograph as PNG?

Usually not. Colour reduction can show dithering or banding on photographs. Try JPEG or WebP output, or Lossless PNG.

When should I tick Lossless PNG?

Tick it for screenshots, diagrams, logos and line art, where you need every colour kept.

Can I reduce PNG size without losing quality?

Only with Lossless PNG, which keeps every colour but may save little. The default way to reduce file size for PNG is colour reduction, which is lossy. Results vary by picture, so compare both on your own file.

How long is my file kept?

The result is deleted after 10 minutes in the free web tool. The uploaded image is deleted as soon as the job ends.

Can I compress PNG files in code?

Yes. Use the image compress operation through the API with the raw image bytes and a PNG Content-Type. The page shows cURL, Node and Python examples.

Need this in your app or in bulk?

This tool runs on the same platform as the API, so the same image is one HTTP request from your code. A free account includes 100 credits a month.

Related tools