How do you use this tool?
- Drop one or many PNG files into the area, or pick them through the file browser.
- Choose mode — lossless (bit-identical pixels) or lossy (reduced palette).
- In lossy mode, set quality 1–100; lossless ignores the slider.
- Enable per-file override when individual images need different settings.
- Hit 'Compress', inspect the A/B image, and download files individually or as a ZIP.
How does PNG compression work in the browser?
PNG is a lossless image format: every pixel is stored exactly, and file size comes from three layers — filters (how each pixel row is made predictable), DEFLATE compression (zip-like reduction of redundant bytes) and the chunk structure (mandatory chunks like IHDR/IDAT/IEND plus optional ancillary chunks for metadata). To shrink a PNG you have two levers: better filter/DEFLATE choices (lossless) or fewer colors (lossy).
The tool ships two specialised encoders, both as WebAssembly inside the browser tab:
PNG (1–50 MB)
↓
[1] Alpha scan → opaque / binary / semi-transparent
↓
[2a] lossless: OxiPNG optimizer (level 2) — bit-identical pixels
[2b] lossy: palette quantisation — 8 to 256 colors
↓
[3] Strip metadata (tEXt, iTXt, zTXt, eXIf, tIME)
↓
[4] A/B slider + per-file stats
↓
ZIP or individual files
When the WASM path fails to initialise in your browser, the tool silently falls back to the Canvas API — smaller than the original, but without the full optimizer gain.
When lossless, when lossy?
Pick lossless when pixels must be exact:
- Screenshots with text, UI mockups, code snippets as image
- Pixel art, icons, logos with hard edges
- Diagrams, charts, technical drawings
- anything that may still get post-processed later
Lossless delivers a typical 20–40% reduction. On modern smartphone screenshots (PNGs with minimal compression from source) up to 50%.
Pick lossy when file size matters more than pixel fidelity:
- decorative illustrations with soft gradients
- photo material that historically sits as PNG (better still: consider JPEG)
- 3D renders for web delivery
- background images where posterisation in smooth areas is acceptable
Lossy delivers a typical 60–80% reduction. Quality 80 is the sweet spot for most illustrations; below quality 50 the palette becomes small enough to show banding.
What does the alpha-channel diagnostic show?
Before you compress, the tool scans the alpha channel of each file and classifies it into one of three categories:
- Fully opaque: every pixel has alpha 255. PNG is often overkill here — we surface a hint link to the JPG compressor, which typically delivers much smaller files for opaque images.
- Binary transparency: only alpha 0 or 255, no intermediate value. Classic with icons that have hard edges or sprite sheets. Both modes work here without visible artefacts.
- Soft transparency (X%): intermediate values present, X% of pixels are semi-transparent. Classic with shadows, glowing effects, anti-aliased edges. Lossless keeps every value exactly; lossy can round alpha values minimally — we surface a warning.
The diagnostic runs immediately after drag & drop, without you having to compress. It helps with mode selection and is the basis for the cross-link to the JPG compressor.
What the A/B slider shows
The A/B view layers original and compressed and reveals each through a vertical divider you drag with mouse or keyboard. With PNG, artefacts become visible especially in these regions:
- Smooth gradients: In lossy mode, posterisation appears here — stripes of discrete color steps instead of a soft gradient.
- Thin lines and text: At very aggressive quality, thin anti-aliased edges can break.
- Shadows and glow: Semi-transparent regions can occasionally turn edgier under lossy quantisation.
Click anywhere in the image to zoom into a region — both sides zoom synchronously, so the comparison stays precise. ‘Reset zoom’ returns to the overview. For opaque PNGs, the A/B view also makes it obvious whether JPEG would be visually sufficient — the comparison between PNG lossless and PNG lossy makes the difference clear quickly.
Metadata in PNG — what gets removed?
PNG files often carry more metadata than you can see. Typical sources:
- tEXt/iTXt/zTXt: Text fields with author, software name, comments. Photoshop, Affinity and GIMP often write program name and creation date here.
- eXIf: EXIF block with camera brand, GPS coordinates, capture time. Rare in PNG, but present in iPhone screenshots.
- tIME: Modification date as a 7-byte timestamp.
The strip-metadata toggle (on by default) removes these chunks and trims file size a little extra. Important: the ICC color profile, sRGB marker, gamma and chromaticity values and pixel density stay — otherwise color rendering shifts or the image renders at the wrong size.
For a separate, fine-grained metadata removal (per-field selection, preview scan) use our dedicated metadata-remover tool — it complements compression.
How does privacy work — does anything leave the browser tab?
Many free online tools for the same problem upload your images to their servers, promise 24-hour deletion, and mostly do delete. The problem is not the deletion but the upload: whoever runs the server sees the images. ID scans, screenshots with password fields, internal mockups — everything passes through other hands, even briefly.
None of that happens here. Once the page is loaded, all processing runs over web standards (Canvas API, WebAssembly) inside the browser tab. You can verify in the Network panel of the developer tools: during compression no image file goes out. No telemetry either, no click analytics, no cookies.
What this tool deliberately does NOT do
We are building a PNG compressor, not an image swiss-army-knife. Deliberately excluded:
- WebP/AVIF export: would be a different tool (png-to-webp, png-to-avif exist). This page keeps the scope at PNG → PNG.
- Server API: breaks the pure-client promise — no lever for discussion.
- 50+-file stress test: soft cap at 30 files with a warning. Very large batches need a server workflow we deliberately don’t have.
- Per-pixel custom filters: no sharpening, no posterize-with-slider, no dithering picker. That’s what image-editing programs are for.
- Color-profile conversion sRGB ↔ P3: complex, error-prone, not included. We preserve the existing profile and don’t convert between color spaces.
- Resize during compression: own tool Image resizer. If you need both, run them sequentially.
The tool does one thing well and is clear about where its limit lies.
Which image tools are related?
More tools from the kittokit ecosystem that pair well with PNG workflows:
- JPG compressor — when your image is opaque and JPEG is visually sufficient, the JPG version is much smaller.
- Remove metadata — fine-grained per-field selection for JPG, PNG, WebP and PDF.
- Image format converter — convert PNG to WebP or AVIF, both smaller than PNG at comparable quality.
Last updated: