Tools Hub

Compress PNG

Shrink PNG files with a lossless re-encode or an optional palette reduction.

Browser onlyYour data never leaves this device.

Everything runs in your browser. The PNG you select is decoded, re-encoded, and saved on this device only.

Details: Privacy policy

Input

Drop files here or Browse

Drag and drop works here too.

PNG up to 20 MB and 40 megapixels. Drag and drop or browse.

Lossless mode keeps every pixel value identical and only re-encodes the file. Color reduction is lossy: it maps opaque pixels onto a smaller palette while leaving transparency untouched.

Result

No image yet.

Choose a PNG above, pick a mode, then compress it locally.

Compress PNG reduces the storage footprint of PNG graphics using two distinct processing strategies: a strictly lossless re-encode that leaves every single pixel value intact, and an optional color-reduction pass that quantizes opaque pixels to a compact palette. Unlike Image Resizer, which shrinks storage by discarding physical pixel dimensions, Compress PNG preserves the original width and height while optimizing data stream density. In lossless mode, pixel arrays and transparency channels remain mathematically identical, though tightly packed source files may occasionally gain bytes—a fact truthfully reported in the exact before-and-after byte summary rather than masked by artificial claims. When aggressive file reduction is necessary, color reduction applies deterministic median-cut quantization to between two and 256 colors while preserving alpha channels byte-for-byte. The tool operates under explicit boundaries, accepting PNG files up to twenty megabytes and forty megapixels while imposing an internal thirty-second processing budget. Everything runs locally in browser memory using standard Canvas 2D and typed arrays, guaranteeing your private screenshots and brand assets never upload to third-party infrastructure.

Key facts

Input
PNG
Output
PNG, lossless or palette-reduced
Limits
Only accepts PNG files; files exceeding 20 MB or 40 megapixels (8,000 px max dimension) are rejected. Color reduction quantizes opaque pixels to a fixed palette (2–256 colors), permanently altering color fidelity.
Processing
In your browser — nothing is uploaded
Sign-up
Not required
Cost
Free

Limits above are read from the same code that enforces them; formats are the ones the tool accepts and produces.

How to use Compress PNG

  1. Select or drag a PNG file up to 20 MB and 40 megapixels into the upload area.
  2. Choose between Lossless mode for identical pixels or Reduce Colors mode for smaller file weight.
  3. If reducing colors, configure the palette limit between 2 and 256 colors based on visual detail.
  4. Click Compress PNG to execute decoding, palette quantization, and canvas re-encoding.
  5. Examine the byte comparison panel to inspect before-and-after sizes and real savings percentages.
  6. Download the resulting 32-bit RGBA PNG image or clear the screen to process another image.

What you get

  • A losslessly re-encoded PNG, or a palette-reduced one when you opt into colour reduction.
  • Exact before and after byte counts, with the saving rounded to a whole percent.
  • Alpha preserved byte-for-byte, including fully transparent pixels, in a 32-bit RGBA output.

When to use Compress PNG

  • Re-encode a large screenshot to see whether the browser's PNG encoder beats the original file.
  • Cut the palette of a flat-color icon or diagram to 16 colors and check the byte saving.
  • Prepare a PNG with transparency for a webpage without flattening the alpha channel.

Frequently asked questions about Compress PNG

Does Compress PNG transmit my photos or screenshots across the network?

No. Decoding, quantization, and PNG encoding take place entirely in browser memory on your client device; no image data ever leaves your computer.

What are the maximum file and dimension caps for PNG compression?

The engine accepts PNG images up to 20 MB in file size, up to 40 megapixels in total area, and with a maximum edge dimension of 8,000 pixels.

Why does a losslessly compressed PNG sometimes grow in file size?

Browser canvas encoders make different trade-offs than specialized CLI tools; if your PNG was already heavily compressed, re-encoding can yield slightly larger byte counts.

How does color reduction handle transparent areas and alpha channels?

The quantization algorithm only clusters opaque RGB values; every alpha byte is preserved intact, ensuring fully transparent and semi-transparent regions never corrupt.

How does Compress PNG differ from Image Resizer?

Image Resizer modifies physical pixel dimensions (width and height), whereas Compress PNG preserves original pixel dimensions and optimizes data streams or palette depth.

Guides that compare Compress PNG

Free Software Alternative Comparisons:

⚡Embed Compress PNG on Your Site & Get Badge↓

Embed this in-browser tool into any blog, documentation, or dashboard. Includes an optional dofollow backlink badge to credit Tools Hub.

Height:
<iframe src="https://salaq.com/embed/image/compress-png" title="Compress PNG — Tools Hub" width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden;max-width:100%;" loading="lazy"></iframe>
<p style="font-size:12px;color:#6b7280;margin-top:6px;font-family:system-ui,-apple-system,sans-serif;">Powered by <a href="https://salaq.com/tools/image/compress-png" target="_blank" rel="noopener" style="color:#2563eb;text-decoration:underline;">Compress PNG on Tools Hub</a></p>

Feedback

Send feedback about this tool (placeholder — feedback collection is not wired up yet).