Skip to content

Compress JPG images

Make JPEG photos smaller with MozJPEG, right in your browser. Nothing is uploaded.

Drop files here

or

Choose files

JPG · PNG · GIF · SVG · TIFF · WebP

Files never leave your device

Loading the compressor…

How to compress JPG files

  1. Add your files

    Drop files on the box, paste them or choose them from your device. Nothing is uploaded.

  2. Check the settings

    The default preset suits most files. Change quality, size or format if you need a smaller file.

  3. Download the result

    Save each file or all of them as one ZIP. If a file cannot get smaller, you keep the original.

What JPEG is and where you meet it

JPEG (named after the Joint Photographic Experts Group, standardized in 1992) is the format almost every camera, phone gallery and website uses for photos. A JPEG stores full color (16.7 million shades), but no transparency and no animation, which is why logos and screenshots are usually saved as PNG instead.

A typical 12-megapixel phone photo is 4000 × 3000 pixels. Uncompressed that would be 36 MB (3 bytes per pixel); as a JPEG from the camera it is usually a few megabytes, and there is often room to go much further without a visible change.

How JPEG compression works

The encoder converts the picture from RGB to brightness plus two color channels. Because the eye is far less sensitive to color detail than to brightness, the color channels are usually stored at half the width and half the height (called 4:2:0 subsampling), so only a quarter of the color samples are kept. The image is then cut into 8 × 8 pixel blocks, each block is turned into frequencies, and fine high-frequency detail is rounded away. The quality setting controls how hard that rounding is.

This tool encodes with MozJPEG, an encoder from Mozilla that adds trellis quantization, progressive scans and optimized Huffman tables. In practice that means a smaller file at the same quality number than many older encoders produce.

Quality is not linear. Going from 100 to 90 removes a lot of data that nobody can see; between about 70 and 85 most photos look the same as the original at normal viewing size; below about 60 you start to see blocky squares in skies and halos around sharp edges. The number of pixels matters even more: halving the width and height leaves only a quarter of the pixels, so a 4000 × 3000 photo resized to 2000 × 1500 carries 3 megapixels instead of 12.

Which settings to pick

UseResize (longest side)Quality
Email attachment1920 px75–80
Website imagetwice the displayed width (for example 1600 px for an 800 px column)70–80, or switch the output to WebP
Forms with a 1–2 MB limit1600 px70
Photo archivekeep the original size90–95, or keep the original file

By default the tool removes EXIF data such as the GPS position and camera details, but keeps the color profile and the rotation, so photos stay upright and their colors do not shift. Turn off "Remove metadata" if you need the capture date or location in the file.

Common problems and when another format is better

  • The file barely shrinks. It was probably already saved at a moderate quality. Lowering the quality further mostly adds artifacts; reducing the dimensions helps much more.
  • Text and diagrams look smudgy. JPEG blurs sharp edges. Screenshots, charts and line art compress better and stay crisp as PNG.
  • Every save makes it worse. JPEG loses a little detail each time it is re-encoded. Always compress from the best copy you have, not from an already compressed one.
  • You need smaller files for a website. WebP at a similar visual quality is usually smaller than JPEG and works in all current browsers.

If the compressed JPEG would not be smaller than the one you dropped, the tool hands back your original instead of a bigger file.

JPG questions

What quality number should I use?

Start at 75. Look at the before/after slider at 100 % zoom on a detailed area such as hair, leaves or text on a sign. If you cannot see a difference, try 65; if you can, go up to 85.

Is JPG the same as JPEG?

Yes. MS-DOS and early versions of Windows only allowed three-letter extensions, so .jpg became common. The file inside is identical, and you can rename one to the other.

Why did my photo lose its location?

GPS coordinates are part of the EXIF metadata, which is stripped by default to protect your privacy and save a few kilobytes. Switch off the metadata option before compressing if you want to keep it.

Can a JPEG be compressed without any loss?

Only a little. Lossless JPEG optimization rewrites the Huffman tables and scan order without touching the pixels, which usually saves a few percent. oCompress has no lossless JPEG mode: it always re-encodes with MozJPEG at your quality setting.

How small should a photo be for email?

Around 1920 pixels on the long side at quality 75 keeps it sharp on any screen and lets you attach many photos within the usual 20–25 MB limit. See our list of file size limits for each service.

Related tools

The image compressor takes every image type in one batch; how it works explains the local processing.