Compress JPEG
Shrink JPG photos with the MozJPEG encoder — the same encoder-level optimization build tools use, running entirely in your browser. Pick a quality or a target size, and every row shows the percent actually saved on your file, measured from real bytes.
Compress JPEG files with MozJPEG
Drop JPG files (other formats convert to JPEG, disclosed per file), pick quality or a target size, and download verified JPEGs with the measured savings.
This page or the Image Compressor — which one?
Simple rule: if your file is a JPG and you want the smallest result, use this page. If you have WebP files, want WebP output, or want PNG-with-transparency to stay transparent, use theImage Compressor. Both are honest about the result — the difference is the encoder. The Image Compressor uses the canvas encoder built into your browser: fast, fine, and format-flexible. This page runs MozJPEG, Mozilla's JPEG encoder, compiled to WebAssembly and served by this site: it spends more computation per file on trellis quantization, optimized Huffman tables, and progressive scan scripts, which is exactly the work that makes a JPEG smaller at the same visual quality. Same photo, same quality number, fewer bytes — and your file's row measures the difference rather than asserting it.
What MozJPEG actually does differently
Every JPEG encoder makes the same basic trade: throw away detail the eye is least likely to miss, then entropy-code what remains. The differences are in the effort. MozJPEG performs trellis quantization — a per-block optimization that picks coefficient values with the best rate-versus-distortion trade — and builds custom Huffman tables for your specific image instead of using the generic defaults. It also defaults to progressive scan order, which tends to shave a few more percent and makes the image appear early while loading. None of this changes what a JPEG is: the output is a completely standard file that decodes everywhere JPEGs decode.
The honest details
- Measured, not promised: every row shows real input bytes, real output bytes, and the computed percent change. Files that come out larger say "larger — keep your original".
- Lossy, deliberately: compression works by discarding detail. The default quality 75 (MozJPEG's own default) is a strong size/quality trade for photos; push the slider up for archival quality, down for chat-thumbnail duty.
- Recompressing a JPEG adds a generation: each re-encode loses a little more. For best results compress from the highest-quality source you have, and keep your original.
- Non-JPEG inputs convert first: PNG, WebP, GIF, BMP, HEIC, and AVIF files are decoded and re-encoded as JPEG (disclosed on the row); transparency flattens onto your chosen background because JPEG has no alpha channel.
- Metadata is stripped: EXIF — including GPS location — does not survive the re-encode. A privacy win for sharing; keep your originals.
- Encoded by MozJPEG locally:MozJPEG (based on libjpeg-turbo, IJG/BSD licenses) compiled from pinned upstream source to WebAssembly, self-hosted by this site, and running in a bounded worker only in your browser. Details on the methodology page.
- Verified output: every JPEG is re-sniffed and re-decoded before its download button appears.
Related tools
Need WebP or PNG handling, or WebP output? TheImage Compressor is the general-purpose lane. Want even smaller files in a modern format? JPG to AVIF typically beats JPEG compression outright — at the cost of a few seconds of encoding per photo. If the dimensions are the real problem, the Image Resizer shrinks pixels before you shrink bytes.
Frequently asked questions
How is this different from the Image Compressor on this site?
The Image Compressor uses your browser’s built-in canvas encoder and also handles WebP and PNG. This page is JPEG-only but encodes with MozJPEG, which spends more effort per file — trellis quantization, optimized Huffman tables, progressive scans — and typically produces a meaningfully smaller file at the same visual quality. Every result row shows the measured difference on your actual file.
What is a progressive JPEG, and why is it on by default?
A baseline JPEG decodes top-to-bottom; a progressive JPEG encodes in passes so the whole image appears quickly at low detail and sharpens as it loads. Progressive files are usually also slightly smaller, which is why the toggle starts on. Every current browser and OS displays progressive JPEGs; a few very old or niche tools prefer baseline, and the toggle is there for them.
How much smaller will my file get?
It depends entirely on the photo and how it was compressed before, so this page refuses to promise a number. Instead it measures: each row shows your file’s real input bytes, output bytes, and the computed percent change. If the result comes out larger — which happens with already-optimized files at high quality settings — the row says that too, and recommends keeping your original.
What does the target file size mode do?
It answers "the form says maximum 200 KB". The tool encodes, measures the real bytes, and binary-searches the quality range until it lands at or just under your target — at most eight encodes, each one measured. If the target is unreachable even at minimum quality, it says so honestly and offers the smallest file it could produce.
Can I compress a PNG or HEIC file here?
You can drop one, and it will be converted to JPEG first — that is the only way a JPEG encoder can compress it, and the row discloses the conversion. Transparency is flattened onto the background color you choose, because JPEG has no alpha channel. If you want to keep transparency, WebP via the Image Compressor or AVIF via PNG to AVIF are the better routes.
Is my photo uploaded anywhere?
No. The MozJPEG encoder is WebAssembly served from this site and running in your browser tab. The site’s security policy blocks requests to any other origin — verifiable in your browser’s network inspector.
Local processing: your photos are compressed and verified inside your browser and never transmitted. JPEG encoding byMozJPEG (this site includes the libjpeg-turbo software), self-hosted and built from pinned upstream source — see themethodology page for full attribution and how to verify the no-upload claim yourself.