Guide

Compress Image

Reduce image file size while maintaining visual quality

Drop your jpg/jpeg/png file here or click to browse

Max file size: 100MB

Higher compression reduces file size but may affect image clarity.

How the Compression Engine Works

When you upload an image for compression, the file goes directly to CloudConvert where it is processed by a format-specific compression engine. The tool detects whether your file is a JPG or PNG and routes it through the appropriate encoder. The output format stays the same as the input — a JPG in produces a JPG out, a PNG in produces a PNG out — so you never lose format-specific features like PNG transparency.

For JPEG files, CloudConvert uses mozjpeg, an optimized JPEG encoder originally developed by Mozilla. mozjpeg applies trellis quantization to find the mathematically optimal way to round DCT coefficients during compression, progressive scan ordering so the image loads in successive quality passes in browsers, and optimized Huffman tables that are computed from the actual image data rather than using generic defaults. The result is 5-10% better compression than a standard libjpeg encoder at the same visual quality — meaning your files come out smaller without looking any different.

For PNG files, the engine uses pngquant, which takes a different approach entirely. Instead of re-encoding the same pixel data more tightly, pngquant reduces a 24-bit PNG (16.7 million possible colors) to an 8-bit palette with up to 256 colors. It selects the optimal palette using median cut quantization, then applies Floyd-Steinberg dithering to simulate missing colors through pixel-level blending. This works exceptionally well for screenshots, icons, diagrams, and any graphic with flat color regions — the type of content PNG is most commonly used for. The quality parameter controls how aggressively colors are reduced.

Convert-To Tip
The quality slider maps to different things depending on format. For JPG, it controls DCT quantization table scaling — lower values mean more aggressive quantization and smaller DCT coefficients, which means smaller files. For PNG, it controls the color reduction aggressiveness — lower values allow pngquant to use fewer palette colors, producing smaller files at the cost of color accuracy.

The Quality Slider: What Each Range Does

The quality value (1-100) is the single most important setting for compression. It directly determines how aggressively the encoder reduces data, and the file size differences between quality levels are substantial. Here is what to expect at each range:

Quality RangeVisual ResultTypical ReductionBest For
95-100Near-lossless, pixel-level differences only10-20%Archival, print preparation
80-94Excellent — indistinguishable at normal viewing40-60%Photography portfolios, high-quality web
60-79Good — minor artifacts on close inspection60-75%General web use, social media, email
30-59Visible artifacts, softened detail75-85%Previews, low-bandwidth contexts
1-29Heavy artifacts, blocking visible85-95%Thumbnails, placeholders only

A concrete example: a 4.2 MB iPhone photo compressed at quality 75 typically produces a 900 KB-1.2 MB output — roughly 70-80% smaller while looking virtually identical on a phone screen or web page. The same photo at quality 50 drops to 500-700 KB but shows softness in hair and fabric textures when viewed at full size.

Convert-To Tip
The default quality of 75 is the sweet spot for most use cases. It sits right at the knee of the quality-vs-size curve where mozjpeg achieves aggressive compression before visible artifacts appear. If you're unsure, leave it at 75 and only adjust if the result doesn't meet your needs.

JPG vs PNG: Why Compression Works Differently

JPG and PNG use fundamentally different compression strategies, which means the quality slider and file size behavior work differently for each format. Understanding this helps you set expectations and choose the right quality level.

JPG is already lossy. The original JPEG encoding split the image into 8×8 pixel blocks, applied a DCT (discrete cosine transform) to each block, and quantized the frequency coefficients — permanently discarding some data. When you compress a JPG here, mozjpeg decodes those blocks and re-encodes them with a new quantization pass. This means compression is cumulative: each round of re-encoding loses slightly more detail. The quality slider controls how aggressive the new quantization table is — lower values discard more high-frequency coefficients (fine texture, sharp edges), producing smaller files at the cost of subtle softness.

PNG is lossless by default. Standard PNG uses DEFLATE compression (the same algorithm behind ZIP files) to store pixel data without any loss. When pngquant compresses a PNG, it applies a completely different kind of trade-off: instead of discarding spatial frequency data like JPEG, it reduces the number of distinct colors. A 24-bit PNG might have 200,000 unique colors; pngquant maps those down to 256 or fewer using median cut quantization, then uses dithering to simulate smooth gradients with the reduced palette. The visual impact depends entirely on the image content — screenshots and icons look nearly identical, while photographic PNGs may show banding in smooth gradients.

CharacteristicJPG (mozjpeg)PNG (pngquant)
Compression typeLossy (DCT quantization)Lossy (color palette reduction)
What gets reducedHigh-frequency spatial detailNumber of distinct colors
Visible artifactsBlocking, ringing around edgesBanding in smooth gradients
TransparencyNot supportedFully preserved
Best content typePhotographs, natural imagesScreenshots, icons, graphics
Re-compression riskHigh — cumulative quality lossLow — palette is already reduced

JPG compression benefits most from photographs and natural images where subtle detail loss is invisible. PNG compression works best on content with flat colors, sharp edges, and limited color palettes — exactly the kind of images people typically save as PNG in the first place. Learn more about the differences in our guide to lossy vs lossless compression, or read about the JPG format and PNG format in detail.

When Compression Produces Poor Results

Compression is not universally beneficial. Some images respond poorly, and knowing the failure modes helps you avoid wasting time or degrading images you care about.

Already heavily compressed images have the least to gain. If a JPG was saved at quality 60 from a camera or editing app, compressing it again at quality 75 won't make it smaller — it may actually get slightly larger because mozjpeg is re-encoding with a less aggressive quantization table. Re-compressing at a lower quality like 50 will shrink the file but stacks a second round of DCT quantization on top of the first, producing noticeably worse blocking artifacts than if the image had been compressed to 50 from the original source in a single pass.

Screenshots with small text are a common pain point for JPEG compression. The 8×8 block quantization in JPEG encoding blurs fine text edges, making characters at small font sizes (10-12px) harder to read. If your screenshot contains important text, keep quality at 85+ or use PNG format instead — pngquant handles sharp text edges much better because it reduces colors rather than spatial frequencies.

Medical and scientific images where subtle gradients carry diagnostic or analytical information should not be compressed with lossy settings. A chest X-ray or microscopy image might have critical detail in faint gray transitions that JPEG quantization would merge into flat blocks. For these use cases, lossless formats or very high quality (95+) are non-negotiable.

Images with large flat color regions and sharp edges — like logos on solid backgrounds or cartoon-style illustrations — can develop JPEG ringing artifacts: visible halos around high-contrast boundaries where the DCT approximation overshoots. PNG compression via pngquant is usually a better fit for this type of content.

Finally, beware the re-compression trap: compressing an output file a second time. Each JPEG re-encoding pass introduces cumulative generation loss. If you need to try different quality settings, always start from the original uncompressed source each time — never feed a compressed output back through the tool. Learn more about how images lose quality after conversion.

Privacy Note
Your images are uploaded over an encrypted HTTPS connection directly to CloudConvert for processing. Files are never viewed, analyzed, or stored beyond processing. All uploaded and output files are automatically deleted within 15 minutes. Read more about our privacy practices.

Image Compression: Frequently Asked Questions

Answers to common questions about compressing JPG and PNG images.

Typical reduction depends on the source image and quality setting. At quality 75 (the default), most JPG photos shrink by 60-75% — a 4 MB iPhone photo often compresses to 900 KB-1.2 MB. PNG screenshots with flat colors can drop by 70-80% after pngquant palette reduction. Already-compressed images or images saved at low quality will see smaller gains, sometimes only 10-20%, because there is less redundant data left to remove.