Image compressor · PNG Compress PNG: smaller files with fewer colours
PNG has no quality slider; it gets smaller when the picture uses fewer colours. This page reduces a PNG to a palette of up to 256 colours, the method tools like pngquant use, keeps transparency, and shows the result next to the original.
- Stays on your device
- Palette PNG, alpha kept
- Compare before and after
Compress PNG images
Output is PNG with 256 colours at the original size. Fewer colours give smaller files; images that already have 256 colours or fewer stay pixel-exact.
Saved to My tools
Open the free tools page next time and it is right at the top under My tools (stored in this browser only).
You can also press Ctrl+D to bookmark this page in your browser.You can also press ⌘+D to bookmark this page in your browser.You can also tap your browser’s Share button (at the bottom in Safari) and choose Add Bookmark or Add to Home Screen.You can also open the ⋮ menu at the top right and tap ☆ to bookmark it, or choose Add to Home screen.You can also tap ··· at the top right and choose Favorite, or open it in your browser and bookmark it there.
View My tools80 is a good starting point for photos.
Lowers quality step by step until the file fits. Works for WebP, JPEG and AVIF.
JPEG has no transparency, so transparent areas are filled with this colour.
Only when format and dimensions stay the same.
Fewer colours make smaller PNGs (palette quantisation). Images that already have fewer colours stay pixel-exact.
Mixes palette colours in a fine pattern so skies and shadows do not band. Turn it off for flat graphics and text.
No images yet. Choose, drop or paste images, or try the sample photo.
Before
—
After
—
Saved
—
Before and after
Drag across the image or use the slider. Left of the line is the original, right is the compressed version. Zoom in on edges, text and skies, where compression shows first.
What resizing does to a 12-megapixel phone photo
A 4032 × 3024 photo shrunk to fit a square limit. Pixel count drives file size and decoding memory, so resizing usually saves more than any quality setting.
| Max width and height | Output size (px) | Pixels removed | Memory once decoded |
|---|---|---|---|
| Original | 4,032 × 3,024 | — | 46.51 MB |
| 2,560 px | 2,560 × 1,920 | −60% | 18.75 MB |
| 1,920 px | 1,920 × 1,440 | −77% | 10.55 MB |
| 1,200 px | 1,200 × 900 | −91% | 4.12 MB |
| 800 px | 800 × 600 | −96% | 1.83 MB |
Decoded memory = width × height × 4 bytes (one byte each for red, green, blue and alpha), whatever the file size. File sizes depend on the picture, so the tool measures them instead of guessing.
Done here? Try these next
Use this tool often? Save it to My tools.Saved to My tools. Find it any time at the top of the free tools page. You can also press Ctrl+D to bookmark this page in your browser.You can also press ⌘+D to bookmark this page in your browser.You can also tap your browser’s Share button (at the bottom in Safari) and choose Add Bookmark or Add to Home Screen.You can also open the ⋮ menu at the top right and tap ☆ to bookmark it, or choose Add to Home screen.You can also tap ··· at the top right and choose Favorite, or open it in your browser and bookmark it there.
Problem or suggestion?Send feedbackChat with support
Version v1.1Updated Update history
NewNew “Smallest file” output: tries WebP, AVIF and JPEG for each image and keeps the smallest.
JPEG quality versus PNG colours
The two formats shrink in different ways, which is why one slider cannot serve both.
- Batch: drop up to 60 images
- Quality, max size or a target file size
- Strips EXIF and GPS, nothing uploaded

JPEG: rounding detail
JPEG keeps every colour but rounds away fine detail, block by block. Quality sets how much.
PNG: fewer colours
PNG never changes the pixels it stores; it compresses repeated patterns. A palette of 256 colours stores each pixel in 1 byte instead of 4, and long runs of the same index compress far better.
What is lost
Colours are merged into the nearest palette entry. Screenshots, icons and charts rarely show it; photos and gradients can band, which dithering hides.
Transparency
Each palette colour has its own opacity, so soft edges and shadows on transparent backgrounds are kept.
For photos, WebP or JPEG are almost always smaller than any PNG. Use palette PNG for screenshots, logos and UI images.
Compress PNG in three steps
The page opens with PNG output, 256 colours and dithering on.
-
1
Add the PNG files
Click to choose, drop them on the box or paste a screenshot. Up to 60 at once.
-
2
Pick the number of colours
Start at 256. Try 64 or 32 for icons and flat graphics; turn dithering off for text and sharp UI.
-
3
Compare and download
Drag the divider over gradients and edges, then download each file or a ZIP.
Why smaller images make the largest paint faster
Largest Contentful Paint (LCP) is the time until the biggest image or text block in the viewport is drawn. web.dev splits it into four parts: time to first byte, resource load delay, resource load duration and element render delay. When the largest element is an image, its file size sets the load duration.
- Good LCP: 2.5 seconds or less for at least 75% of page visits (web.dev)
- File size depends on pixel count × bytes per pixel; resizing cuts the first, quality and format the second
- This tool draws each image onto a canvas, scales it in steps of at most half for sharper results, then calls
canvas.toBlob(type, quality) - Compression does not fix a slow server or a late-discovered image: set
widthandheight, do not lazy-load the LCP image and considerfetchpriority="high"
| Format | Type | Transparency | Best for |
|---|---|---|---|
| WebP | Lossy or lossless | Yes | Website photos and graphics; supported by current browsers |
| AVIF | Lossy | Yes | Smallest files for photos; shown only if your browser can encode it |
| JPEG | Lossy | No | Email, upload forms and anything that refuses WebP |
| PNG | Lossless; lossy with fewer colours | Yes | Screenshots, logos and UI; choose a palette of 256 colours or fewer to shrink them |
Why a palette makes a PNG smaller
A 1600 × 1000 screenshot, before the zlib compression that every PNG applies.
| PNG type | Bytes per pixel | Raw image data |
|---|---|---|
| Full colour with alpha (RGBA) | 4 | 6,400,000 bytes |
| Palette, up to 256 colours | 1 | 1,600,000 bytes + palette |
| Palette, up to 16 colours | 0.5 (4 bits) | 800,000 bytes + palette |
| Palette, 2 colours | 0.125 (1 bit) | 200,000 bytes + palette |
zlib then compresses this data. The final size depends on the picture, so the tool measures it; the ratio between the rows is exact.
Where image compression goes wrong
Most oversized images on websites are not under-compressed; they are simply too big.
Uploading the camera original
A 4000-pixel photo shown 800 pixels wide makes every visitor download and decode five times the pixels in each direction. Resize before you compress.
Re-compressing a JPEG again and again
Every lossy save adds artefacts. Keep the original and compress from it, not from the last exported copy.
Saving photos as PNG
PNG is lossless, so photos stay huge. Use PNG for flat screenshots; for photos use WebP, AVIF or JPEG.
Lazy-loading the main image
loading="lazy" on the largest image above the fold delays LCP. Lazy-load images further down the page instead.
See whether your images slow real visitors down
Compressing images is the fix; real-user data tells you which pages need it. TapCub's script measures the same Largest Contentful Paint this page explains, on your visitors' devices.
Core Web Vitals at p75
LCP, INP and CLS for each page at the 75th percentile, the same threshold web.dev uses, collected from the first page load of each visit.
Learn moreSlowest pages first
Pages and templates sorted by LCP, so you compress the images that cost the most visitors first.
Learn morePages and sources together
Compare speed with traffic and conversions on the same pages to decide where an image fix matters.
Learn moreImage compression questions
Still have a question?
Chat with the team behind TapCub — we usually reply within a few hours on business days.
How do I compress a PNG without losing quality?
Choose "All colours (lossless)" only if pixels must not change; then the size barely moves. If the PNG has 256 colours or fewer, the palette option is also lossless and much smaller: the row says "all colours kept".
Does this work like TinyPNG or pngquant?
It uses the same idea: quantise to a palette of up to 256 colours with optional dithering and write an indexed PNG. The colour-picking algorithm here is median cut, so results differ in detail from pngquant.
Will transparency be kept?
Yes. Fully and partly transparent pixels keep their opacity through the palette’s transparency table.
Why is my compressed PNG still large?
Photos have too much detail for a palette to help much. Convert photos to WebP or JPEG, or reduce the dimensions as well.
Is this tool working for you?
Rate it, or tell us what went wrong and what you’d like improved. A person reads every message, and frequent requests go into the next update.
Need help right now?
Chat with our support team, best for urgent problems; you can leave a message when we are offline.
Chat with supportUpdate history
New features, fixes and data refreshes for this tool, newest first.
-
· v1.1
New featureNew “Smallest file” output: tries WebP, AVIF and JPEG for each image and keeps the smallest.
-
· v1.0
LaunchedFirst release.
Missing something or found an error? Tell us — requests that come up often go into the next update. All tool updates
Recommend this tool in an article or on your site
This tool is free to cite and share. Copy the URL or link below into your article, tutorial or resource page; to write a review, embed a tool or partner with us, get in touch.
https://tapcub.com/tools/image-compressor<a href="https://tapcub.com/tools/image-compressor">Image compressor - TapCub</a>Measure the speed your visitors actually get
Add TapCub's script and see LCP, INP and CLS for every page from real visits, next to traffic and conversions.