How to Compress JPEG Images and Reduce File Size
Compress a JPEG by adjusting quality and pixel dimensions, hit a target size in KB, and check the result for artifacts, metadata and format limits.
JPEG compression makes a file smaller by discarding image detail that is less noticeable to the eye. You control the result with two main settings: the quality level used when saving and the pixel dimensions of the image. Lower quality and fewer pixels both produce a smaller file, but too much of either causes visible damage.
Before you start
Make a copy of the original photo and work only on the copy. JPEG compression is lossy, so detail removed during saving cannot be recovered. Each time a JPEG is opened, edited and saved again, a little more quality is lost.
Decide what you need before you begin. That might be a maximum file size in KB for an upload form, a maximum width and height in pixels, or both. If the image is going to a specific website, application or email system, check its stated limits first.
Find out where the processing happens. Desktop image editors and photo apps that export JPEG files usually work on your own device. Online JPEG compressors usually upload your photo to a server, although some browser-based tools say they process files locally. Do not assume either way. Read the tool's documentation and privacy policy to see whether files are uploaded, how long they are kept and who can access them, especially for personal photos, ID scans or documents.
Photos from cameras and phones often contain metadata such as the capture date, device model and sometimes GPS location. Some tools remove this metadata when they save, and others keep it. Check the export options if this matters to you.
Step-by-step instructions
1. Open the copy in a tool with JPEG quality control
Use an image editor, photo app or dedicated compressor that lets you set JPEG quality when saving or exporting. The option name varies between tools. It might be called quality, compression level or something similar, and it may be a slider or a number. In some tools a higher compression value means lower quality, so confirm which direction the setting works before you rely on it.
2. Reduce the pixel dimensions if they are larger than needed
Resizing often saves more space than lowering quality. Camera and phone photos frequently have far more pixels than a web page, chat message or form needs. Set the long edge to the size the image will actually be displayed at. Keep the aspect ratio locked so the picture is not stretched or squashed. If you need a specific shape, crop it as a separate step. Resize and compress in the same save, because resizing an already compressed file and saving it again adds another round of loss.
3. Choose a quality setting
Start with a fairly high quality and lower it gradually until the file is small enough or the image begins to look worse. Quality scales are not standardized, so the same number can give different results in different programs. If the tool shows a preview, compare it with the original at 100% zoom instead of judging a scaled-down thumbnail.
4. Review optional settings
- Metadata: remove it if you do not need it. This makes the file slightly smaller and removes information such as location.
- Progressive or baseline: a progressive JPEG loads in several passes on web pages. Both are standard JPEG variants, and the difference in file size depends on the image.
- Chroma subsampling: some tools let you reduce color resolution. This can shrink the file, but it may blur fine colored edges such as red text.
- Color profile: removing an embedded profile saves little space and can shift colors in some applications. For web use, converting to sRGB is the common choice.
5. Save under a new name
Save the compressed version as a separate file. The .jpg and .jpeg extensions refer to the same file format, so a tool advertised as a JPEG to JPG compressor is not converting between formats. Renaming one extension to the other does not change the image data.
Reducing a JPEG to a specific size in KB
Some compressors offer a target file size mode. If yours does not, lower the quality in small steps and check the file size after each save. If the image starts to look poor before you reach the target, go back to a higher quality and reduce the pixel dimensions instead. Operating systems and websites do not always count a kilobyte the same way, with some using 1024 bytes and others 1000. Aim slightly below the limit.
Check the output
Check the saved file's size in your file manager or in the file properties. The size estimate shown inside an editor may differ from the actual file on disk.
Open the compressed image next to the original at 100% zoom. Look for blocky patches in smooth gradients such as sky, halos or ringing around sharp edges and text, color banding, and smeared fine texture such as hair, grass or fabric.
Confirm the pixel dimensions and orientation. Some photos rely on a metadata tag to display the right way up. If that metadata was removed and the tool did not apply the rotation first, the image may appear sideways.
Keep the format's limits in mind. JPEG does not support transparency, so converting a PNG with transparent areas fills those areas with a solid color. Screenshots, text and line art often look worse as JPEG because sharp edges produce artifacts. A lossless file format such as PNG may suit those images better.
Common problems and next steps
The file barely got smaller or got larger
The JPEG may already be heavily compressed. Compressing it again gains little and adds more artifacts. Choosing a quality setting higher than the one originally used can even make the file larger. Reduce the pixel dimensions instead, or start again from the original camera file if you have it.
The image looks blocky or blurry
The quality is set too low for the target size. Go back to your original copy, raise the quality, and reduce the pixel dimensions to reach the same file size with fewer visible artifacts.
An upload is still rejected
Check whether the limit applies to file size, pixel dimensions or both. Leave some margin below a KB limit. Also confirm that the form accepts JPEG files and the specific extension you used.
Colors look different after compression
This often happens when the embedded color profile was removed or not converted. Export again with the profile kept, or convert to sRGB if the image is going to the web.
You need to compress many photos
Some image editors and command-line tools can batch export with the same quality and resize settings. Try the settings on a few representative images first, check the results as described above, and keep the originals until you are satisfied with the whole batch.