# Free Online PNG Compressor

> Batch compress up to 30 PNG images (25 MB each) right in your browser using UPNG palette quantization (256/128/64/32 colors). Keeps full alpha transparency, original dimensions, no server upload.

**Free Online PNG Compressor – Optimize Transparent PNGs Locally | docsmall**

- Canonical HTML: https://docsmall.com/en/compress-png
- Markdown: https://docsmall.com/en/compress-png.md
- Language: en
- Updated: 2026-12-06

docsmall optimizes PNG files locally in your browser using UPNG palette quantization — reducing 24/32-bit truecolor PNGs to 256, 128, 64, or 32 indexed colors while preserving alpha transparency and crisp edges. Batch up to 30 images (25 MB each) with zero server uploads.

## Price · Processing · Key strength · Batch limits

- **Price:** Free, no sign-up or limits
- **Processing:** Local UPNG quantization, no uploads
- **Key strength:** Preserves alpha transparency & pixels
- **Batch limits:** Up to 30 images, 25 MB each

## How to compress PNG images online

Drop your transparent PNGs, UI assets, or screenshots, choose a color palette tier, and download smaller PNGs locally.

1. **Add up to 30 PNG files** — Click to choose files, drop PNGs onto the page, or press Ctrl+V / ⌘V on desktop to paste screenshots directly. Up to 30 images per batch, 25 MB each (JPG and WebP also work in the same queue).
2. **Choose a palette tier and start** — Pick Slight (256 colors), Normal (128 colors), Strong (64 colors), or Extreme (32 colors). Use Slight for smooth gradients or shadows, Normal for most screenshots and icons, then click Start compressing.
3. **Inspect results and download** — Review compressed size and savings for each PNG. If gradients show banding, switch to Slight and click Compress again; then save individually or bundle 2+ files as a ZIP.

PNG works very differently from JPG: the browser’s native PNG encoder has no quality slider, and lossless re-packing rarely saves much space. This tool runs UPNG palette quantization (256 down to 32 colors) inside local Web Workers while keeping full alpha transparency — shrinking logos, UI screenshots, and transparent cutouts without blurring text.

- Alpha transparency intact: transparent backgrounds, soft shadows, and anti-aliased corners remain transparent PNGs
- Four palette tiers: switch freely among 256, 128, 64, and 32 colors — every re-run starts from the original PNG
- Private local batches: up to 30 files (25 MB each), no uploads, original file names or _compressed suffix, and one-click ZIP

## Complete Guide to PNG Compression & Transparency

Learn why truecolor PNGs get so large, how UPNG indexed-palette quantization keeps alpha transparency intact, which color count fits each graphic, and when converting to JPG makes more sense.

### What is PNG compression, and why are PNG files so heavy?

Screenshots and design exports are usually saved as 24-bit (RGB) or 32-bit (RGBA) truecolor PNGs, storing 3 to 4 bytes per pixel with lossless DEFLATE compression. On high-DPI displays or graphics with soft shadows, a single PNG easily grows to 2–10 MB.

Purely lossless re-packing typically trims only 5%–15%. To achieve major reductions while keeping the PNG format and sharp edges, tools like pngquant and docsmall’s local UPNG encoder quantize 32-bit pixels into an 8-bit indexed palette — merging nearly identical colors so files shrink dramatically.

- Outputs standard indexed PNGs compatible with every browser and OS.
- Original pixel dimensions stay untouched (e.g., 2560 × 1440 stays 2560 × 1440).
- Indexed quantization delivers the biggest wins on UI assets, logos, and screenshots.

### How does docsmall compress PNGs locally with UPNG?

Unlike JPG compression which adjusts a quality percentage, this page decodes each PNG onto an OffscreenCanvas inside a Web Worker, reads the RGBA pixel buffer, and encodes an optimized indexed PNG via UPNG.js capped at 256, 128, 64, or 32 colors.

Up to three Web Workers run in parallel right on your device, so unreleased UI mockups, brand logos, and internal screenshots never leave your browser. Re-running with another tier always reads the original PNG rather than quantizing an already reduced file.

- True UPNG palette quantization instead of ineffective lossless re-saving.
- Every re-compression reads your original PNG, preventing stepped color decay.
- Built-in size check preserves the original file as Already optimal if bytes don’t drop.

### Choosing among 256, 128, 64, and 32 colors

Flat UI icons, diagrams, and crisp software screenshots often use only a few dozen distinct colors. Quantizing them to 128 or 64 colors looks virtually identical while cutting file size drastically.

Graphics with smooth color gradients, glassmorphism blur, soft drop shadows, or photographic cutouts need more palette slots. Start with Slight (256 colors) for those; forcing 32 colors on a gradient can create visible banding.

- Slight (up to 256 colors): transparent cutouts, smooth gradients, UI cards with soft shadows.
- Normal (up to 128 colors): default tier for web icons, app screenshots, and documentation visuals.
- Strong (up to 64 colors): flat illustrations, solid logos, charts, and wireframes.
- Extreme (up to 32 colors): minimal icons, QR codes, and simple two-tone diagrams.

### Are transparent backgrounds and soft shadows preserved?

Yes — transparent areas never turn white or black. Unlike GIF, which only supports binary on/off transparency, indexed PNG uses a tRNS alpha table that assigns 0–255 opacity levels to palette entries, keeping soft shadows, feathered edges, and anti-aliased icons smooth.

Because each unique color-plus-alpha combination takes one slot in the palette, graphics with lots of semi-transparent glow or shadow benefit from Slight (256 colors) so edge transitions stay silky.

- Full alpha channel preserved — no opaque white or black background fill.
- Smooth semi-transparent shadows and anti-aliased corners at 256 and 128 colors.
- More translucent shading means a higher palette tier (256 colors) looks cleanest.

### When to compress PNG vs. convert to JPG instead

Camera photos or realistic scenes saved as PNG often weigh 5–10 MB and remain bulky even after 256-color quantization, while losing smooth tonal gradations in skies or skin tones.

If an image is a photograph that does not require a transparent background, convert it locally with [PNG to JPG](https://docsmall.com/en/png-to-jpg) (and fine-tune with [Compress JPG](https://docsmall.com/en/compress-jpg) if needed) for a much smaller, smoother result. Stick to PNG whenever you need transparency, sharp UI text, or artifact-free flat graphics.

- Logos, transparent cutouts, crisp screenshots, and text charts → keep PNG and compress here.
- Opaque camera photos, landscapes, and rich gradients → convert to JPG instead.

### Common workflows for PNG compression

Unoptimized PNGs are one of the fastest ways to bloat a web page, mobile app bundle, or presentation deck. Local batch quantization fits seamlessly into these tasks.

- Web & app UI assets: shrink transparent icons, badges, and empty-state graphics without losing crisp edges.
- Post-cutout optimization: after generating transparent PNGs with [Remove Background](https://docsmall.com/en/image-remove-bg), compress them here so multi-megabyte cutouts upload fast.
- Docs & tutorials: compress batches of high-DPI screenshots while keeping code blocks and UI labels razor-sharp.
- Review decks & archives: optimize PNG mockups first, then bundle them with [PNG to PDF](https://docsmall.com/en/png-to-pdf) for a compact review file.

### Are PNG design files and screenshots uploaded?

No. Reading pixel data, running UPNG palette quantization, and creating ZIP archives all happen locally inside your browser’s Web Workers. No PNG bytes ever touch docsmall servers.

Unreleased product designs, internal dashboard screenshots, and proprietary brand marks stay strictly on your device. Results live only in tab memory and are cleared as soon as you refresh or close the page.

### Limits, compatibility, and what to keep in mind

Each batch accepts up to 30 files and 25 MB per image. While dedicated to PNG, the queue also supports static JPG and WebP and preserves each file’s format. For format-specific guides, see [Compress JPG](https://docsmall.com/en/compress-jpg), [Compress WebP](https://docsmall.com/en/compress-webp), or the general [Image Compressor](https://docsmall.com/en/image-compress).

Palette quantization is controlled lossy color reduction rather than bit-identical lossless packing, and auxiliary PNG text chunks or embedded ICC profiles are stripped. Already minimal PNGs that cannot shrink further are preserved as-is and marked Already optimal.

This tool does not resize pixel dimensions and does not preserve APNG multi-frame animations (only the first frame is decoded). Resize oversized 2×/3× screenshots with the [Image Resizer](https://docsmall.com/en/image-resize), optimize animations with the [GIF Compressor](https://docsmall.com/en/gif-compress), or read [File Too Large to Upload? How to Choose Between Compressing, Resizing, and Splitting](https://docsmall.com/en/blog/file-too-large-to-upload).

## How different PNG types respond to quantization

Transparent logos, crisp UI screenshots, and photographic PNGs behave very differently under palette reduction.

| PNG type | Transparency & color traits | UPNG quantization behavior | Suggested tier (colors) | Output |
| --- | --- | --- | --- | --- |
| Transparent logos, icons & cutouts | Full alpha channel with solid fills or soft shadows | Large size drops while keeping transparent edges smooth | Slight (256) for soft shadows; Strong (64) for flat logos | PNG |
| Screenshots & UI graphics | Flat backgrounds paired with sharp text, icons, and charts | Ideal for indexed palettes; text stays crisp without JPEG blur | Normal (128 colors) or Strong (64 colors) | PNG |
| Photographic truecolor PNGs | Opaque photos containing hundreds of thousands of tones | 256-color cap can leave files large or introduce subtle grain | Prefer PNG to JPG; if PNG is required, use Slight (256) | PNG |

## Choosing among the four PNG palette levels

PNG compression tiers control maximum palette colors. Start with Normal (128 colors) for screenshots and icons, or Slight (256 colors) for rich gradients.

| Level | Max palette colors | Recommended PNGs | Quality & alpha note |
| --- | --- | --- | --- |
| Slight | Up to 256 colors | Transparent cutouts, smooth gradients, shadowed UI cards | Smoothest gradients and semi-transparent edges. |
| Normal | Up to 128 colors | App screenshots, web icons, charts, transparent stickers | Default balance of crisp text and strong size reduction. |
| Strong | Up to 64 colors | Flat illustrations, solid logos, diagrams, wireframes | Heavy reduction; smooth gradients may show light banding. |
| Extreme | Up to 32 colors | Minimal icons, QR codes, simple two-tone graphics | Smallest output; best reserved for low-color graphics. |

## Real transparent PNG before & after comparison

Pixel dimensions stay 1920 × 960 with transparency intact. Drag the slider to inspect edges, tones, and details.

- **Transparent PNG Sample** — Original PNG 2.19 MB, Dimensions 1920 × 960, Compressed 740 KB (67% smaller). [Original](https://docsmall.com/images/image-compress/png-before.webp) · [Compressed](https://docsmall.com/images/image-compress/png-after.webp)

Real 1920 × 960 transparent PNG sample (2.19 MB → 740 KB). Actual savings depend on color count, resolution, and chosen palette tier.

## 6 practical tips for optimizing PNG files

Working with PNG’s palette strengths keeps transparency clean, text razor-sharp, and file sizes low.

### Convert opaque photos from PNG to JPG

Photos saved as PNG are inherently oversized. Convert them locally with [PNG to JPG](https://docsmall.com/en/png-to-jpg) and then tune size with [Compress JPG](https://docsmall.com/en/compress-jpg) for a smaller, smoother file.

### Downscale 2×/3× Retina screenshots first

High-DPI screens capture huge pixel dimensions. Resize screenshots to their actual display width with the [Image Resizer](https://docsmall.com/en/image-resize) before quantizing here for double the savings.

### Use 256 colors for soft drop shadows

Semi-transparent gradients consume extra palette entries. If 128 colors makes a shadow look stepped, switch to Slight (256 colors) and click Compress again.

### Crop unused canvas margins

Trim extra desktop space or empty padding with the [Image Crop tool](https://docsmall.com/en/image-crop) before compressing so fewer pixels need encoding.

### Use the naming toggle to fit your workflow

Leave “Keep original file names” checked when overwriting web asset folders, or uncheck it to append _compressed and keep original masters untouched.

### Archive your original 32-bit PNG master

Palette quantization is irreversible. Deploy the quantized PNG on the web or in apps, and keep the full-color master for future edits.

## PNG Compression FAQ

### Does compressing a PNG keep its transparent background?

Yes. UPNG writes an indexed PNG with a full alpha transparency table, so transparent backgrounds, feathered cutouts, and semi-transparent drop shadows remain transparent.

### Why do PNG levels use 256/128/64/32 colors instead of a quality percentage?

The PNG specification has no JPEG-style quality percentage. Quantizing 24/32-bit truecolor PNGs into an indexed palette of up to 256 colors is the standard way to slash file size while staying pure PNG.

### Is this PNG compression lossless or lossy?

Palette quantization merges visually similar colors (like TinyPNG and pngquant), making it controlled lossy reduction rather than bit-identical lossless packing. That is why it achieves dramatic savings while looking nearly identical.

### Will my PNG files be uploaded to a server?

No. Pixel reading, UPNG quantization, and ZIP packaging all run locally in your browser’s Web Workers. No files leave your device, and tab memory clears on refresh or close.

### How do I fix color banding on gradients or soft shadows?

Banding happens when a gradient runs out of palette slots at 32 or 64 colors. Switch to Slight (up to 256 colors) and click Compress again — the tool always re-quantizes from your original PNG.

### Why does a small PNG show “Already optimal”?

If a PNG was already quantized or contains very few colors, re-encoding may not reduce its byte count. The tool preserves your smaller original file for download and marks it Already optimal.

### Why is a photographic PNG still larger than a JPG after compression?

Photographs contain far more distinct color tones than an indexed PNG palette can efficiently compress. When transparency isn’t needed, use [PNG to JPG](https://docsmall.com/en/png-to-jpg) for much smaller files.

### Will PNG compression change pixel dimensions or blur text?

No. Pixel width and height remain identical, and unlike JPEG’s 8 × 8 block blur, indexed PNG keeps pixel-sharp edges so UI labels, code screenshots, and diagrams stay crisp.

### How does “Keep original file names” work?

Checked by default and saved in browser storage, it keeps original names like logo.png. Uncheck it to add _compressed (logo_compressed.png). Duplicate names inside a ZIP automatically receive -2, -3 suffixes.

### How many PNGs can I compress at once?

Up to 30 images per batch, up to 25 MB each. Excess or oversized files are flagged and skipped without stopping the batch. With 2 or more results, click Download ZIP to save docsmall-image-compressed.zip.

### Does this tool support animated PNG (APNG) files?

No. Canvas decoding reads only the first static frame of an APNG and exports a static PNG. For animated images, use the [GIF Compressor](https://docsmall.com/en/gif-compress).

### Are PNG metadata chunks and ICC color profiles preserved?

No. Re-encoding pixel data through Canvas and UPNG strips text chunks, EXIF, and embedded ICC profiles, which also helps trim extra kilobytes.

### Is this PNG compressor free and without sign-up?

Yes. It is completely free with no usage caps, no watermarks, and no login. Everything runs locally on your device without using server credits.

### Can I compress JPG or WebP files in the same batch?

Yes — static JPG and WebP work in the same queue and keep their original formats. You can also visit [Compress JPG](https://docsmall.com/en/compress-jpg) or [Compress WebP](https://docsmall.com/en/compress-webp) for format-specific guides.

## Related Tools

Converting photo PNGs to JPG, shrinking 2× Retina screenshots, or trimming margins? Pair with these tools.

- [PNG to JPG](https://docsmall.com/en/png-to-jpg) — Turn opaque photographic PNGs into much smaller standard JPGs locally, with customizable background fill.
- [Image Resizer](https://docsmall.com/en/image-resize) — Downscale oversized Retina PNG screenshots to their display width first, then quantize here for maximum savings.
- [Image Crop](https://docsmall.com/en/image-crop) — Remove unused borders around screenshots or transparent graphics before compressing to save extra bytes.

## PNG compression queue

- Up to 30 images, 25 MB max per file — built for PNG quantization (JPG & WebP also accepted)
- **Compression level** · **Keep original file names**
- **Start compressing** / **Compressing...** / **Compress again**
- **Clear files** · **Download ZIP** (docsmall-image-compressed.zip) · **Download PNG**
- Waiting · Compressing... · Done · Already optimal · Failed

Compressed PNGs stay only in this tab’s memory and disappear on refresh or close. Download them before leaving.

## Choose language

[中文](https://docsmall.com/compress-png) · [**English**](https://docsmall.com/en/compress-png) · [Français](https://docsmall.com/fr/compress-png) · [Español](https://docsmall.com/es/compress-png) · [Italiano](https://docsmall.com/it/compress-png) · [Deutsch](https://docsmall.com/de/compress-png) · [Bahasa Indonesia](https://docsmall.com/id/compress-png) · [Português](https://docsmall.com/pt/compress-png) · [日本語](https://docsmall.com/ja/compress-png) · [한국어](https://docsmall.com/ko/compress-png) · [ไทย](https://docsmall.com/th/compress-png) · [Tiếng Việt](https://docsmall.com/vi/compress-png) · [العربية](https://docsmall.com/ar/compress-png) · [Русский](https://docsmall.com/ru/compress-png)

---

[docsmall](https://docsmall.com/en) · [HTML](https://docsmall.com/en/compress-png) · [llms.txt](https://docsmall.com/llms.txt) · [sitemap.xml](https://docsmall.com/sitemap.xml)
