Compress a JPG
Shrink JPG photos free with MozJPEG, the encoder Mozilla built for the web. Typically 20 to 40 percent smaller, with no watermark and no daily limit.
Drop files here (up to 30)
or paste from the clipboard
How it works
The image is decoded to raw pixels by the browser, then re-encoded by MozJPEG compiled to WebAssembly and running in a Web Worker. MozJPEG is Mozilla's encoder, and it does two things the built-in canvas encoder does not: trellis quantisation, which chooses coefficients by weighing size against distortion rather than rounding them, and progressive scan optimisation, which searches for an efficient arrangement of scans. The 246 KB module is fetched only after you choose a file, so the page itself stays light.
Measured results
These figures come from running this exact tool over a fixed set of sample files on every build, not from an estimate.
| Sample file | Settings | Before | After | Change |
|---|---|---|---|---|
| photo-gradient.jpg | MozJPEG quality 75 | 504 KB | 117 KB | −77% |
| photo-gradient.jpg | MozJPEG quality 90 | 504 KB | 409 KB | −19% |
- photo-gradient.jpg: dimensions: 1600x1000
- photo-gradient.jpg: dimensions: 1600x1000
Benchmark run 2026-08-02.
What to watch out for
If a file has been through MozJPEG or a similar encoder before, re-encoding adds nothing and may add bytes. The tool detects this and says the original is smaller rather than handing back a bigger file labelled compressed.
JPEG is lossy, so this is not a reversible optimisation. Compressing an already-compressed photo discards detail again. Work from the largest original you have rather than from a file that has been through the process before.
JPEG has no alpha channel. A PNG with transparent areas comes out with those areas white, so this is the wrong tool for logos that need to sit on a coloured background.
Limits
Files up to about 50 MB work reliably. Beyond that, the ceiling is your device's memory rather than any rule we impose — the work happens on your own machine. Tested in Chrome 140, Firefox 143, Safari 18.
Why not just re-save at lower quality
Your browser already has a JPEG encoder, and this tool deliberately does not use it for the final output. The reason is worth understanding, because “compress JPG” tools vary enormously in results while all claiming the same thing.
JPEG compression works by transforming each block of the image into frequency coefficients and then rounding them — coarser rounding means smaller files and more visible artefacts. A basic encoder rounds each coefficient to the nearest allowed value and moves on.
MozJPEG instead evaluates the choices. Trellis quantisation considers, for each coefficient, what rounding it differently would cost in visible distortion versus save in bytes, and picks accordingly. It also searches for a good arrangement of progressive scans instead of using a fixed one.
The difference is measurable. Encoding the sample files below at quality 75 with the browser’s own encoder and then with MozJPEG, at the identical setting, MozJPEG produced files 20% smaller for a flat-colour logo, 27% smaller for a screenshot and 35% smaller for a photograph. That is the entire justification for downloading a 246 KB module rather than calling the encoder already present in the browser.
Reading the quality number
The scale is not a percentage of anything meaningful, so treat it as a dial with known landmarks rather than a measurement.
Above 90 the files get large quickly for differences almost nobody can see. Around 75, the default here, is where most photographs sit comfortably: no visible artefacts at normal viewing size, and a substantial saving. Between 60 and 70 is reasonable for images that will be displayed small. Below 60 the 8×8 block structure starts showing in smooth areas like skies, and halos appear around high-contrast edges.
Detailed photographs tolerate lower settings than you would expect, because noise and texture hide the artefacts. Images with large flat areas or text are the opposite: they show blocking early, and PNG or WebP is often the better answer for them.
What progressive encoding does
A progressive JPEG stores the image in successive passes, coarse to fine, rather than one row at a time. On a slow connection the viewer shows a blurry complete picture almost immediately and sharpens it, instead of painting the image top to bottom.
There is a second, quieter benefit: progressive files are usually slightly smaller than the equivalent baseline file, because the scan arrangement compresses better. It is on by default for both reasons. The one situation to turn it off is when a specific piece of older software refuses to open progressive files, which is rare but does still happen with some embedded and print systems.
Your files never leave your browser. Last updated 2026-07-31.
Next step
Your file is already here in this browser, so the next tool starts with it loaded.
Related tools
- Convert PNG to JPGConvert PNG images to JPG free, with no watermark and no daily limit. Pick the quality and the colour that replaces transparency. Nothing is uploaded.
- Convert JPG to PNGConvert JPG photos to lossless PNG free, with no signup and no watermark. Useful when a tool refuses JPEG or you need to edit without further loss.