Compress image
Compress images locally in your browser. Nothing is uploaded.
The tool shows each selected format in quality order. Lower quality is above higher
quality. The tool shows the file size on each result. A smaller file is not
always a better image. Compare the previews. The same quality values are used
for WebP, AVIF, JPEG, and JPEG XL, but the codecs can produce different file sizes and visual
results. JPEG XL quality is converted to a libjxl distance with the same formula
as cjxl, and the encoder uses effort 3. Effort 3 encoded a 16 MP photo in
1.6 s on an Apple Silicon Mac; the default effort 5 took 17 s and made a file
about 18% smaller. Browsers that cannot show JPEG XL get a PNG preview made from the
decoded pixels; the download is the JPEG XL file. Move the pointer over a preview to view source pixels at 1x scale.
Hold the mouse button to view the original image. The decoders support
images up to 25 MP. AVIF output supports up to 12 MP.
The JPEG decoder supports baseline and progressive JPEG. The PNG decoder
supports common non-interlaced 8-bit PNG files. The WebP decoder supports still
lossy and lossless WebP. The AVIF decoder supports still sRGB AVIF images
without an embedded ICC profile. The JPEG XL decoder supports still sRGB
images, lossy and lossless. The tool rejects other image features,
including animated WebP, AVIF and JPEG XL. It does not send your file to a server. Each
image is decoded to KTX2 (R8G8B8A8 sRGB) pixels, and each encoder reads those
pixels. The AVIF components use libavif and libaom. The JPEG component uses
MozJPEG and composites transparency onto white. The JPEG XL components use
libjxl to encode and jxl-rs to decode. Quality 100 is not lossless.
The tool supports sRGB images only. It does not convert wider color profiles.
Images with wider profiles, such as some Mac screenshots, can have color
shifts. Convert them to sRGB before selecting them.