Skip to content
I Hate Online Tools

JPG compressor

Re-encode JPEG at a chosen quality.

This runs in your browser. Nothing is uploaded.

About JPG compressor

Re-encodes a JPEG at a quality level you choose, in your browser, and prints the before and after file size so you can see what the trade actually cost.

Email attachment caps, forum upload limits, a CMS that rejects anything over 2 MB — the usual reason for compressing a JPEG is that some system has drawn a line and your photo is on the wrong side of it. A phone camera produces 4 to 8 MB files without trying, and most of that weight buys detail nobody viewing the image on a screen will ever notice.

The quality slider controls the quantisation tables the encoder uses: lower values discard more high-frequency detail before the file is written. Encoding runs through a WebAssembly JPEG encoder in your tab, at the image's original pixel dimensions — nothing is scaled. It works from decoded pixels rather than the container, so a PNG dropped here comes out as a JPEG as well.

Two things worth knowing. Compressing an already-compressed JPEG is a second generation of loss, and above roughly quality 0.9 the re-encode can come out larger than the file you started with. If your photo is heavy because it is 6000 pixels wide, quality is the wrong dial — resize it first and compress the smaller version.

How to use JPG compressor

  1. 1Drop your JPEG onto the panel or click to browse.
  2. 2Set the quality. 0.8 is the default and a sensible starting point for photos.
  3. 3Click Compress & download, then read the output and input sizes printed underneath.

What it won't do

  • Will not resize the image. A 6000-pixel-wide photo stays 6000 pixels wide.
  • EXIF metadata, including GPS and capture date, is not carried into the output.
  • Each pass is a fresh generation of loss, so compress from the best original you have rather than from a previous output.

Common questions

How much can I compress a JPEG without it looking bad?

Most photos survive quality 0.75 to 0.85 with no visible difference at normal viewing size, and that alone often halves the file. Below about 0.6 you start seeing blocking in skies and smooth skin, plus haloing along hard edges. Text and screenshots break down much sooner than photographs do, so judge by the image rather than the number.

Why did my file get bigger after compressing it?

Because the original was already compressed harder than the setting you chose. Re-encoding a JPEG saved at 0.7 back out at 0.95 asks the encoder to preserve existing compression artefacts in fine detail, and that costs bytes. Drop the quality below whatever the source used and the size falls. If you have no idea what it used, start at 0.7.

Does compressing a JPEG remove EXIF data?

Yes. The encoder works from decoded pixels, so the camera model, timestamp and GPS coordinates in the original are not written into the output. That is usually welcome, though it also means the copy you download has lost its capture date. Check the original with the image info tool first if you want a record of what was in it.

Can I compress to an exact file size instead?

Yes — use compress to target size. You give it a figure in kilobytes and it searches for the highest JPEG quality that lands at or under it, instead of making you guess at the slider. It is slower, because it encodes the image several times over to find the answer.

Related tools

Why this one doesn't upload your file

There is no server to upload to. This page is a static file, and the work happens in your browser using the same graphics and WebAssembly code that renders every other site you visit. Your file is read from disk into memory, processed, and handed back as a download. Once the page has loaded you can disconnect from the network entirely and it keeps working. The longer explanation

Install the app