Krunkit

Optimize JPG

Reduce JPG file size with smart re-encoding. Same visual quality, smaller files.

Drop images here or click to browse (up to 10)

JPEG, PNG, WebP, AVIF up to 50MB each

JPG Optimization Guide

How It Works

Re-encodes your JPG with MozJPEG, an optimized encoder that produces smaller files.

Quality 80

The default quality 80 typically reduces file size by 30-50% with no visible difference.

Quality 60-70

For web thumbnails and previews where smaller size matters more than pixel perfection.

Quality 90+

For high-quality photos where visual fidelity is the top priority.

MozJPEG: The Engineering Behind Superior JPEG Optimization

Krunkit uses MozJPEG, an open-source JPEG encoder developed by Mozilla Research, to optimize JPG files. Unlike the standard libjpeg encoder that ships with most software, MozJPEG employs trellis quantization — an algorithm that evaluates multiple quantization paths for each 8x8 pixel block and selects the one producing the smallest output at the target quality level. This approach consistently produces files 5-15% smaller than standard JPEG encoders at identical visual quality, without changing the format itself.

The trellis quantization in MozJPEG works by treating each DCT coefficient block as a graph problem. Instead of simply rounding each coefficient to the nearest quantization step (as libjpeg does), MozJPEG evaluates the coding cost of multiple rounding choices using the Viterbi algorithm. This computational approach finds the globally optimal rounding pattern that minimizes total file size while staying within the specified quality target. It is more CPU-intensive but produces measurably better results.

Progressive encoding is another MozJPEG advantage for web delivery. A progressive JPEG renders in multiple passes — first a blurry full-frame preview, then increasing detail — instead of loading top-to-bottom like a baseline JPEG. Users perceive progressive images as loading faster because they see a complete (if initially blurry) image within 200-300 milliseconds. MozJPEG's progressive scan script is hand-tuned to front-load the most visually important frequency components, making the first pass look better than generic progressive encoders.

Optimization differs fundamentally from conversion: the output file is still a standard JPEG that every browser, device, and application can display. No compatibility concerns, no fallback formats needed, no HTML picture element required. A 300 KB product photo run through MozJPEG at quality 80 typically shrinks to 200-220 KB with no visible difference — immediate bandwidth savings with zero deployment complexity. This makes JPEG optimization the lowest-risk, highest-reward image performance improvement available.

Pro Tips

  • Re-encode existing JPEGs at quality 80 for web — even if they are already 'optimized'

    Most cameras and image editors use libjpeg's standard encoder, which wastes 5-15% of file size compared to MozJPEG. Re-encoding an 'optimized' JPEG through MozJPEG at the same quality level typically yields an additional 8-12% size reduction with no quality loss visible to the human eye.

  • Enable progressive encoding for any image above 10 KB

    Progressive JPEG adds a trivial overhead of 200-500 bytes but dramatically improves perceived loading speed on slow connections. For images below 10 KB (small thumbnails), the overhead is proportionally too large. Above 10 KB, the perceptual benefit always outweighs the minor size increase.

  • Optimize camera JPEGs before archiving to save 30-40% storage

    Modern cameras save JPEG at quality 95-97 with libjpeg, producing unnecessarily large files. A 12 MP photo at camera quality weighs 6-8 MB. Running it through MozJPEG at quality 88 reduces it to 3.5-5 MB with imperceptible quality difference — a 35-40% reduction that compounds across thousands of archived photos.

Frequently Asked Questions

Does optimizing JPG reduce quality?

At quality 80+, the difference is invisible to the naked eye. The file size reduction comes from more efficient encoding, not quality removal.

How much can I reduce JPG file size?

Typically 30-50% at quality 80. Results vary based on the original image and how it was initially compressed.

What encoder do you use?

We use MozJPEG, Mozilla's optimized JPEG encoder that produces the smallest files at any given quality level.

Is this different from JPEG compression?

We use the same JPEG format but with a more efficient encoder. Think of it as smarter compression, not more compression.