Compress a PNG losslessly

Shrink PNG files without changing a single pixel, using oxipng in your browser. No colour quantisation, no upload, and the file is never re-encoded.

Drop files here (up to 30)

or paste from the clipboard

Options

Higher levels try more filter combinations. Time grows steeply while the extra saving is usually under two percent.

Rewrites the colour hidden under fully transparent pixels so it compresses better. Safe for display, but it changes those bytes.

Results appear here. Nothing is uploaded.

    How it works

    Your file goes straight to oxipng as bytes. There is no canvas in this tool at all, which is the important part: nothing is decoded to pixels and re-encoded. oxipng re-tries PNG's row filters, rebuilds the compressed stream with a better deflate implementation, and drops chunks that carry no display information. Every pixel value you started with is still there afterwards.

    Measured results

    These figures come from running this exact tool over a fixed set of sample files on every build, not from an estimate.

    Sample fileSettingsBeforeAfterChange
    logo-transparent.pngeffort 219 KB9 KB−51%
    photo-gradient.pngeffort 23.36 MB2.29 MB−32%
    screenshot-text.pngeffort 2219 KB114 KB−48%
    logo-transparent.pngeffort 419 KB9 KB−53%
    photo-gradient.pngeffort 43.36 MB2.32 MB−31%
    screenshot-text.pngeffort 4219 KB113 KB−48%

    Benchmark run 2026-08-01.

    What to watch out for

    How much you save depends entirely on where the file came from

    A PNG straight out of a browser, a screenshot tool or a canvas export has a great deal of slack, and thirty to fifty percent is normal. One that has already been through an optimiser has almost none left, and a few percent is a good result. The measured table below shows the first case, so read it as an upper bound rather than a promise.

    More effort is not reliably smaller

    Level 4 searches more filter combinations than level 2, but it picks per image and the winner is not always the one that compresses best overall. On the photographic sample in the table below, level 4 actually produced a slightly larger file than level 2. Try both on anything you will ship repeatedly.

    Nothing here reduces your colours

    Tools advertising seventy or eighty percent off a PNG are usually quantising the image to a 256-colour palette without saying so. That is lossy and shows as banding on gradients and skin tones. This tool never does it, which is why its numbers are honest rather than impressive.

    Limits

    Files up to about 30 MB work reliably. Beyond that, the ceiling is your device's memory rather than any rule we impose — the work happens on your own machine. Tested in Chrome 140, Firefox 143, Safari 18.

    Lossless means exactly what it says

    A PNG stores an image in two stages. First each row of pixels is transformed by a filter that predicts it from the row above. Then the filtered rows are compressed with deflate, the same algorithm inside a zip file.

    Both stages leave money on the table. Most encoders pick a filter quickly rather than correctly, and most use a fast deflate rather than the best one available. oxipng re-does both decisions properly: it tries the filter combinations, packs the stream with a stronger compressor, and removes metadata chunks that affect nothing on screen.

    Decode the result and you get back exactly the pixel values you started with. Not approximately, not visually indistinguishably — identically.

    What other PNG compressors are actually doing

    This matters, because the numbers look so different.

    A tool promising to make your PNG seventy percent smaller is almost certainly running colour quantisation: reducing the image to a palette of 256 colours and dithering the difference. On a flat logo the result can be hard to fault. On a photograph, a gradient or a soft shadow it produces visible banding and speckle, and no amount of later processing brings the original colours back.

    That is a legitimate technique, and sometimes the right one. It is not lossless, and describing it as compression without saying so is the part worth objecting to.

    What to actually expect

    The honest answer is that it depends almost entirely on what produced your file, and the range is wide.

    PNGs exported by browsers, screenshot utilities and canvas-based tools are generally written for speed rather than size. There is real slack in them, and the measurements below — taken on exactly that kind of file — land between thirty and fifty percent.

    Anything that has already passed through an optimiser is a different story. The work has been done, and a second pass may find a few percent or nothing at all. When there is genuinely nothing to win, your original file is handed back untouched and the result says “already optimal” instead of inventing a number.

    When to reach for something else instead

    If your PNG is a photograph, the format is the problem, not the compression. A photo belongs in a lossy format, and converting it to WebP will beat any lossless optimiser by an order of magnitude.

    If it is a screenshot or a diagram destined for a web page, WebP again wins comfortably while keeping transparency. Stay with PNG and this tool when the file must remain a PNG — for software that accepts nothing else, for an asset pipeline that expects one, or when the image will be edited further and every save must be exact.

    Why the effort dial is short, and not a slider to the right

    Higher effort levels are not free. oxipng’s cost rises steeply because it is searching a combinatorial space of filter choices, and it runs here on one core inside your browser rather than on a build server.

    They are also not reliably better. Effort decides how many filter combinations are tried per image, and a combination that wins on one row can lose on the file as a whole once deflate has had its say. In the table below, level 4 beats level 2 on the logo and the screenshot and loses to it on the photograph.

    Levels beyond 4 are not offered at all: they multiply the wait for changes typically under two percent. Level 2 is the sensible default, and on a file you will ship many times it is worth running both and keeping the smaller one.

    The compression runs in a Web Worker on your own machine. Nothing is uploaded, which is also why there is no file-size limit imposed by anyone’s hosting bill.

    Your files never leave your browser. Last updated 2026-08-01.