getPNGgetSVG
File formats10 min read

How to reduce a PNG's file size without losing transparency

Reduce PNG file size by resizing, cutting colours and lossless optimising, with free PNG optimizer tools that keep transparency and run on your own device.

The getPNG team16 Sept 2026

Short answer

To reduce PNG file size and keep the transparent background: first resize it to the largest size it will actually be shown at, then reduce its colours to a palette of 256 or fewer with a PNG optimizer such as pngquant or Squoosh (often 60 to 80 percent smaller), then run a lossless optimiser such as oxipng. For a website, saving as WebP with transparency is usually smaller still.

To reduce PNG file size you have four levers: fewer pixels, fewer colours, a more efficient file layout, or a different format. Used in the right order they can take a 6 MB transparent PNG down to a few hundred kilobytes and keep the transparent background intact. Used in the wrong order, or with the wrong tool, they either do almost nothing or quietly flatten your transparency onto white.

This guide explains why PNGs get so large, what each kind of PNG optimizer actually does, how to use the free tools that run on your own device, and when you should stop squeezing the PNG and save a WebP or JPG instead. The tools were checked on 16 September 2026.

Why is my PNG so large?

PNG is lossless. It compresses a picture the way a zip file compresses a document: it finds patterns and stores them more briefly, but it never throws anything away. That works brilliantly on screenshots, logos and flat graphics, which are full of repeated colours. It works badly on photographs, where almost every pixel is slightly different from its neighbour.

Several things make a PNG larger than it needs to be:

  • It is a photograph, or contains one. A cutout of a person or a product is still photographic detail. As a PNG it is typically several times the size of the same picture as a JPG.
  • It is bigger in pixels than it is ever shown. A 4000 pixel wide product photo displayed at 800 pixels carries 25 times the pixels anyone sees.
  • It has millions of possible colours. A standard PNG with transparency stores 32 bits per pixel: 8 each for red, green, blue and alpha. A photo uses tens of thousands of distinct colours, and each one costs space.
  • It has 16 bits per channel. Some editors and scanners save PNGs with twice the colour depth, doubling the raw data for no visible gain on a screen.
  • It carries metadata. Colour profiles, editing history, text notes and thumbnails add bytes. Usually a small share, occasionally a large one.
  • It was saved with low compression effort. Apps often save quickly rather than compactly.

The transparent area itself is not the problem. Large runs of fully transparent pixels compress to almost nothing. What costs space is the subject and its soft edges. What is an alpha channel explains how that fourth number per pixel is stored.

The four ways to make a PNG smaller

Method Typical saving Changes the picture? Keeps transparency?
Resize to display size 50 to 90 percent Fewer pixels Yes
Reduce colours (quantise) 60 to 80 percent Slightly, usually invisible Yes, with the right tool
Lossless optimise A few percent to about a third No Yes
Save as WebP instead 25 percent (lossless) to far more (lossy) Only if lossy Yes

The savings are rough ranges; a photo and a flat logo react very differently. The order matters: resize first, reduce colours second, optimise losslessly last. Each step works on the output of the one before, and a lossless optimiser run before colour reduction is wasted effort.

Step 1: resize to the size it is actually shown

This is the largest and most overlooked saving. File size grows with the number of pixels, which grows with the square of the width. Halve the width and height of a PNG and you remove about three quarters of its pixels, and roughly that share of its size.

Work out the largest size the picture will ever be displayed at, then double it if it will be seen on high-density phone and laptop screens. A product image shown 800 pixels wide on a shop page is well served at 1600 pixels. A profile picture shown at 200 pixels needs no more than 400. Any image editor can resize; keep the aspect ratio locked and save as PNG so the transparency stays.

Keep the full-size original separately. Resizing is the one step you cannot undo later.

Step 2: reduce the colours with a PNG optimizer

This is what TinyPNG, pngquant and the Reduce palette option in Squoosh do, and it is where the dramatic savings come from. The technique is called colour quantisation: the tool picks the best 256 or fewer colours for your particular picture, including partially transparent ones, and maps every pixel to the nearest one. The file then stores a small palette and one byte per pixel instead of four.

Done well, the difference is very hard to see on most pictures. pngquant’s own site says it often reduces files by as much as 70 percent and preserves full alpha transparency. TinyPNG describes the same approach: similar colours are combined, turning 24-bit PNGs into much smaller 8-bit indexed images.

Reducing colours in Squoosh (runs in your browser)

Squoosh is a free image compression web app made by Google Chrome Labs. Its documentation states that it does not send your image to a server and that compression happens locally, in the browser tab.

  1. Open squoosh.app in Chrome, Edge, Firefox or Safari and drop your PNG on the page.
  2. Choose OxiPNG in the compression settings on the right. That keeps the output a PNG.
  3. Turn on Reduce palette. Start with 256 colours.
  4. Compare. Drag the divider across the picture to see the original on one side and the result on the other, and read the new file size and percentage underneath.
  5. Lower the colour count step by step while the result still looks right. Many cutouts hold up well at 128 colours; smooth gradients may need the full 256.
  6. Download with the button at the bottom right.

Reducing colours with pngquant (command line)

pngquant is a free command-line tool (GPL, with a commercial licence available) and the engine behind many graphical tools. A reasonable starting command, which writes a new file next to the original:

pngquant --quality=65-85 --skip-if-larger cutout.png

The quality range tells it to aim high and give up rather than save a result below 65. It runs entirely on your computer.

What about TinyPNG?

TinyPNG gives very good results with the same technique and handles many images at once: its site says the free version takes up to 20 images at a time, each up to 5 MB. It works by uploading the images to its servers; the site says only you have access to them and they are kept for a maximum of 48 hours. For a logo that may be fine. For a photo of a person, a document or an unreleased product, a local tool gives the same kind of result without the upload. Is it safe to upload photos online goes through what several popular services say about the files they receive.

Find the colour count where your cutout starts to break

  1. Drop a transparent PNG with soft edges (hair or fur is ideal) on squoosh.app.
  2. Choose OxiPNG, turn on Reduce palette and set 256 colours. Note the size.
  3. Lower the count to 64, then 32, zooming to 200 percent on the edge each time.

You should see: at 256 and usually 128 colours the edge looks the same as the original. Somewhere below that, the soft edge shows visible steps or speckle, and that is your floor; go back up one step.

If you do not: if even 256 colours shows banding, the picture has a smooth gradient or many semi-transparent shades. Skip colour reduction and use lossless optimisation, or save a WebP instead.

Step 3: optimise losslessly

A lossless optimiser rewrites the PNG more efficiently without changing a single pixel. It tries different filter and compression settings, removes metadata you do not need, and drops unnecessary data such as an alpha channel that is fully opaque everywhere. oxipng is a fast, free, open-source one, and it is the engine Squoosh uses for its OxiPNG setting.

On the command line:

oxipng -o 4 --strip safe cutout.png

-o sets the effort from 0 to 6 (higher is slower and a little smaller) and --strip safe removes metadata that does not affect how the picture looks. oxipng also has an --alpha option that changes the hidden colour values of fully transparent pixels to compress better; the documentation notes that it is technically lossy, although nothing visible changes.

Expect a saving from a few percent on a PNG that was already well saved to around a third on one written quickly by an app. Run it last, after resizing and colour reduction.

Step 4: consider a different format

Sometimes the right answer is to stop making the PNG smaller and use a format built for the job.

  • For a website: WebP. Google’s WebP documentation says lossless WebP images are 26 percent smaller than PNGs, and that lossy WebP with transparency is typically about three times smaller than PNG. Every current browser displays it. PNG vs WebP for websites covers when each one is the better choice.
  • When no transparency is needed: JPG for photographs. A product photo on a white background has no transparent pixels, so a JPG at quality 85 is a fraction of the PNG’s size.
  • For a logo, an icon or flat artwork: SVG. It is geometry rather than pixels, so it is usually a few kilobytes whatever size it is shown at, and it stays sharp when enlarged. getSVG traces a PNG into one in the browser with PNG to SVG, and its guide to reducing an SVG’s file size covers what makes a traced file heavier than it needs to be.
  • Keep the PNG when the picture is going somewhere that may not read WebP, such as a document, a print service or an older app, or when you need a master copy for further editing.

When reducing a PNG does not help much

  • It is already an 8-bit palette PNG. Colour reduction has been done; only lossless optimisation or resizing is left.
  • It is a large photograph with no transparency. No PNG trick gets close to a JPG. Convert.
  • Soft, semi-transparent edges band at low colour counts. Hair, smoke and glass need many alpha levels. Keep 256 colours or skip quantisation. If an edge already shows a pale fringe, white halos around a cutout explains where that comes from.
  • The app re-saves it. Some platforms re-encode every upload. Optimising first can still help with upload limits, but the published file is theirs.

The broader question of which format a picture should be in at all is covered in the photo file formats guide.

The free way

Need a smaller cutout in the first place?

getPNG does not compress PNGs, but it lets you pick a lighter format for the cutout itself. Drop a photo and it removes the background at the full resolution of the original; then save a WebP with transparency for a website, or a JPG on white or any colour when nothing needs to be see-through. For the smallest transparent PNG, download it from getPNG and run it through the steps above.

Your photo never leaves this device.Open getPNG

The steps, in short

  1. Resize to the size you need. Scale the PNG down to the largest width it will be displayed at, keeping the aspect ratio. Halving the width removes about three quarters of the pixels.
  2. Open a PNG optimizer that runs locally. Open squoosh.app in a browser, which compresses on your device, or use pngquant on the command line.
  3. Reduce the palette. In Squoosh choose OxiPNG as the format and turn on Reduce palette; start at 256 colours and lower it while comparing with the slider.
  4. Check the edges. Zoom in on soft edges such as hair against a dark background, and raise the colour count if they look banded or speckled.
  5. Optimise losslessly and download. Keep OxiPNG's effort high, download the result, and compare its size with the original.

Questions

How do I reduce PNG file size without losing quality?

Use a lossless optimiser such as oxipng, which rewrites the file more efficiently and strips unneeded metadata without changing a pixel; expect a saving of a few percent to around a third. Larger savings need colour reduction, which changes pixels but is often invisible, or resizing.

What is the best PNG optimizer?

For the biggest savings, a colour quantiser: pngquant on the command line, or Squoosh and TinyPNG in a browser. For no change at all to the pixels, oxipng. Many people run the two in that order. Squoosh does the work in the browser; TinyPNG uploads the file to its servers.

Does compressing a PNG remove transparency?

Not with tools built for PNG: pngquant says it preserves full alpha transparency, and oxipng is lossless. Transparency is lost only if you convert to JPG, or use a tool that flattens the image onto a background.

Why is my PNG file so large?

Usually because it is a photograph, which lossless compression cannot shrink much, or because it is much larger in pixels than it is ever shown. Metadata, 16 bits per channel and an unused alpha channel add to it.

Is WebP smaller than PNG?

Usually. Google's WebP documentation says lossless WebP images are 26 percent smaller than PNGs, and lossy WebP with transparency typically about three times smaller. It suits websites; PNG is still the more widely readable format elsewhere.

Is TinyPNG safe?

TinyPNG works by uploading your images to its servers. Its site says only you have access to them and that they are kept for a maximum of 48 hours before deletion. If you prefer the picture not to leave your device, Squoosh or pngquant do the same kind of reduction locally.

Tags
File formatsPNGWebPTransparency