CodeKitHub中文

Compress PNG Images Online

Shrink PNG files dramatically while keeping transparency: this tool uses palette quantization — the same technique behind TinyPNG — running entirely in your browser. Typical savings are 50–70% for screenshots, logos and UI graphics, with no visible difference.

Fewer colors = smaller file; 256 is visually identical for most graphics

    What Is This Tool?

    PNG is lossless, so it has no "quality" setting to lower — naive re-encoding barely helps. Real PNG compression works differently: palette quantization reduces the image to a carefully chosen set of colors (up to 256). Since screenshots, logos and interface graphics rarely use more distinct colors than that anyway, the file gets 50–70% smaller while looking identical. Transparency (the alpha channel) is fully preserved.

    This is the technique behind well-known services like TinyPNG — the difference here is that it runs in your browser via an open-source engine, so your images stay on your device and there's no daily file limit.

    Why Use It?

    • Real compression (50–70% typical), not a placebo re-encode.
    • Transparency preserved — safe for logos, icons and UI assets.
    • No upload, unlike TinyPNG-style services — and therefore no file count limits.
    • Adjustable color budget (16–256) with per-image savings shown.
    • Batch support, free, no watermark.

    How to Use

    1. Drop PNG files onto the box (the compression engine loads automatically, once).
    2. Keep 256 colors for visually identical results, or lower it for smaller files.
    3. Each result shows the exact savings — click Download.
    4. If a photo-like PNG doesn't shrink enough, convert it to JPG instead (see PNG to JPG).

    Example

    Input

    app-screenshot.png — 980 KB

    Output

    app-screenshot-compressed.png — 290 KB (−70%), 256 colors

    Screenshots and UI graphics quantize beautifully; the palette covers every color they actually use.

    From our own testing

    Our launch test used a deliberately hostile image: a 600×400 PNG filled with 200 overlapping semi-transparent color patches — far messier than a typical screenshot. It quantized from 31.1 KB down to 7.8 KB (−75%) at 256 colors, with the alpha channel intact. Real-world UI graphics compress even better because they use fewer distinct colors than our stress test. The honest flip side we also confirmed: photographic content shows visible banding at 256 colors — that's when you want the JPG/WebP route instead, which is why the converter links sit one section up.

    Frequently Asked Questions

    How can a lossless format be compressed further?

    By making it slightly lossy in a smart way: quantization picks the ~256 colors that best represent the image and maps every pixel to them. For graphics with limited color ranges the result is visually identical — technically lossy, practically indistinguishable.

    Will transparency survive compression?

    Yes — the alpha channel is preserved, including semi-transparent pixels (drop shadows, anti-aliased edges). This is exactly what logos and UI assets need.

    When does PNG compression work poorly?

    On photographs and smooth gradients — they use thousands of colors, so 256 can show banding. For photo content, converting to JPG or WebP saves far more; that's what our PNG to JPG converter is for.

    How is this different from TinyPNG?

    Same underlying technique (palette quantization), similar savings. The practical differences: your files are never uploaded here, there's no 20-file batch limit, no 5 MB cap, and no paid tier — because there's no server doing the work.

    What color count should I choose?

    Start at 256 — visually identical for nearly all graphics. Drop to 64 or 32 for icons and simple UI elements to squeeze more; watch the preview thumbnail for banding.

    Related Tools