TapCub is live — analytics, insights and live chat, free on one platform

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.

Compress

80 is a good starting point for photos.

KB

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.

    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.

    What resizing does to a 12-megapixel phone photo
    Max width and heightOutput size (px)Pixels removedMemory once decoded
    Original4,032 × 3,024—46.51 MB
    2,560 px2,560 × 1,920−60%18.75 MB
    1,920 px1,920 × 1,440−77%10.55 MB
    1,200 px1,200 × 900−91%4.12 MB
    800 px800 × 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.

    Runs entirely in your browser. Nothing you type here is uploaded or stored by TapCub.

    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.

    Read the result

    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
    Image compressor illustration: Compress and resize JPG, PNG and WebP images in your browser, convert to WebP or AVIF, compare before and after, and download one by one or as a ZIP
    Image compressor, illustrated

    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.

    How to use it

    Compress PNG in three steps

    The page opens with PNG output, 256 colours and dithering on.

    1. 1

      Add the PNG files

      Click to choose, drop them on the box or paste a screenshot. Up to 60 at once.

    2. 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. 3

      Compare and download

      Drag the divider over gradients and edges, then download each file or a ZIP.

    How it works

    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 width and height, do not lazy-load the LCP image and consider fetchpriority="high"
    Output formats in this tool
    FormatTypeTransparencyBest for
    WebPLossy or losslessYesWebsite photos and graphics; supported by current browsers
    AVIFLossyYesSmallest files for photos; shown only if your browser can encode it
    JPEGLossyNoEmail, upload forms and anything that refuses WebP
    PNGLossless; lossy with fewer coloursYesScreenshots, logos and UI; choose a palette of 256 colours or fewer to shrink them
    Worked example

    Why a palette makes a PNG smaller

    A 1600 × 1000 screenshot, before the zlib compression that every PNG applies.

    Bytes per pixel before compression
    PNG typeBytes per pixelRaw image data
    Full colour with alpha (RGBA)46,400,000 bytes
    Palette, up to 256 colours11,600,000 bytes + palette
    Palette, up to 16 colours0.5 (4 bits)800,000 bytes + palette
    Palette, 2 colours0.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.

    Common mistakes

    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.

    FAQ

    Image 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.

    Feedback

    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.

    Rate this tool

    Please don’t include passwords or other sensitive information.

    Only used to reply to this feedback.

    Type, details and email are required.

    We only use this to handle your feedback. See the privacy policy.

    Feedback received

    Thank you! We will read it and reply from hello@tapcub.com if needed.

    Need help right now?

    Chat with our support team, best for urgent problems; you can leave a message when we are offline.

    Chat with support
    Changelog

    Update history

    New features, fixes and data refreshes for this tool, newest first.

    1. · v1.1

      New featureNew “Smallest file” output: tries WebP, AVIF and JPEG for each image and keeps the smallest.

    2. · 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

    Cite this tool

    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.

    URL
    https://tapcub.com/tools/image-compressor
    HTML link
    <a href="https://tapcub.com/tools/image-compressor">Image compressor - TapCub</a>

    See your data clearly. Find your growth.

    Every click, backed by data. Install one line of code and see your first numbers in a minute.

    No credit card · Free plans for analytics and chat · Cookieless analytics