F FileShrink

Compress PNG — re-encode and strip metadata

Drop a PNG below and get a re-encoded version that strips unnecessary metadata. Runs entirely in your browser via the Canvas API.

Your file is processed entirely in your browser. Nothing is uploaded.

PNG is a lossless format, which means there is no “quality slider” that trades visible detail for file size like JPG has. What the browser’s Canvas API can do is re-encode your PNG with its own internal DEFLATE compressor and strip metadata (EXIF chunks, color profiles, text chunks, creation timestamps) that many PNG files carry but no viewer needs for display. On some PNGs — especially those exported with verbose metadata or unoptimized compression settings — this re-encoding can shave 5 to 20 percent off the file size. On already-optimized PNGs (like those run through OptiPNG or pngquant), the output may be the same size or even slightly larger.

This tool is honest about its scope. It does not perform lossy palette reduction (like pngquant) or advanced DEFLATE optimization (like zopflipng). Both of those require WASM or server-side processing. What it does is give you a quick, client-side re-encode that works well as a first pass and costs you nothing in terms of privacy or uploads. If you need aggressive PNG compression, consider converting to WEBP instead — WEBP is typically 25 to 70 percent smaller than PNG at equivalent visual quality.

How to compress a PNG in 4 steps

  1. 1

    Select your PNG file

    Drop the file into the dropzone or click to browse.

  2. 2

    Let Canvas re-encode the image

    The browser decodes the PNG, draws it onto a Canvas, and re-encodes it as a new PNG. This strips all metadata and applies the browser’s own DEFLATE compression.

  3. 3

    Check the size difference

    The result panel shows original and re-encoded sizes. If the saving is small or negative, the PNG was already well-optimized.

  4. 4

    Download the re-encoded PNG

    If the result is smaller, save it. If not, your original was already as lean as the browser can produce and you may want to try WEBP instead.

Why PNG compression gains are limited

PNG uses lossless DEFLATE compression, which means every pixel is preserved exactly. Unlike JPG, there is no quality knob to turn — the encoder can only try harder at finding patterns in the data, not throw data away. The Canvas API’s PNG encoder is decent but not state-of-the-art. Dedicated tools like pngquant (lossy palette reduction) and zopflipng (brute-force DEFLATE search) can produce significantly smaller files, but they are not available as pure JavaScript in the browser without WASM. If PNG size is critical to your workflow, consider converting to WEBP (our PNG to WEBP tool) for 25 to 70 percent smaller files with no perceptible quality loss.

When should you re-encode a PNG?

Stripping metadata from a screenshot

Screenshots from some tools embed location, username, or device info in PNG metadata chunks. Re-encoding strips all of that, cleaning the file for public sharing.

Quick-optimizing PNGs exported from design tools

Figma, Sketch, and Canva exports sometimes carry large ICC color profiles or verbose metadata. Re-encoding removes that overhead.

Checking if a PNG is already optimized

If the re-encoded file is the same size or larger, you know the original is already lean. No more guessing.

Privacy-conscious sharing

Stripping EXIF and metadata from a PNG before sharing ensures no hidden information travels with the image.

Frequently asked questions

Why is there no quality slider for PNG?
PNG is a lossless format — there is no quality parameter. Every pixel is preserved exactly. The Canvas API encodes PNG without any quality knob; the only savings come from better compression patterns and metadata stripping.
Can the output be LARGER than the input?
Yes, in some cases. If the original PNG was compressed with an advanced tool like zopflipng, the browser’s simpler encoder may produce a larger file. The result panel always shows the comparison so you can decide.
Does this strip the alpha channel?
No. Transparency is preserved. The PNG is re-encoded with the same alpha channel as the source.
How is this different from pngquant?
pngquant is a lossy PNG optimizer that reduces the color palette (typically from 16M colors to 256) to achieve dramatic size reductions. This tool is lossless — it preserves every color exactly and only optimizes the compression and metadata. The gains are more modest but the quality is pixel-perfect.
Is my PNG uploaded?
No. The Canvas API decodes and re-encodes your PNG entirely in your browser. Nothing is uploaded, stored, or logged.

Related conversions