Skip to contentSkip to the inputSkip to the result

Compress an image

Reduce an image file size by choosing a lossy quality.

Loading tool

Instructions

Compress an image

How to use

  1. Choose one image or several, a format and quality, and if you like a size goal and a longest side.
  2. Compare original and output sizes before downloading; several come as one ZIP.

Supported input

  • JPEG/WebP; up to 20 images.
  • Photos over 24MP or 8192px are read at a size within those limits.
  • A size goal lowers the quality first and then makes the picture smaller.
  • Output is not guaranteed to be smaller, and when it is larger the download keeps the original.
  • JPEG uses a white transparency background.

Input example

JPEG at quality 0.7

Result example

A new JPEG with reported output size

Troubleshooting

  • Check the supported format, file size and page selection.

How it works

  • Reduce an image file size by choosing a lossy quality.

Hitting a file-size limit: quality first, pixels second

Typical reasons to shrink a photo

  • An application portal or a government form that only accepts attachments "under 500 KB"
  • Several phone photos that will not fit into one email under the provider’s attachment cap
  • Product or blog images that make a page slow to load on a phone connection
  • Sending a picture yourself at a sensible size instead of letting a messaging app recompress it harder

How the size goal is met

The photo is first encoded once at the current quality (0.7 unless you change it). If that already fits, it is done. If not, the range between 0.1 and the current quality is halved six times, encoding a trial each time, and the highest quality that fits is kept. Starting from 0.7 the trials run 0.4, 0.25, 0.325 and so on; after six halvings the answer is within about 0.01 of the best possible quality.

Only when even quality 0.1 is too big does the picture lose pixels. An encode at quality 0.6 (or lower, if you set lower) serves as a reference, the scale is √(goal ÷ reference) × 0.92, never more than 0.9, and the quality search runs again at the new size. That can repeat up to four times. If the result lands below 60% of the goal, one slightly larger size is tried, so you end up with a sharp smaller photo rather than a blocky full-size one.

Worked example: a 4032 × 3024 photo under 200 KB

  1. 1Quality 0.7 comes out above 200 KB, so the halving search starts.
  2. 2Quality 0.1 is still too big. Say the reference encode at 0.6 is 2,000 KB: the scale is √(200 ÷ 2,000) × 0.92 ≈ 0.291.
  3. 3The photo is drawn at 1173 × 880 px and the quality search is repeated at that size.
  4. 4The result line names the size it used. Pick a 1920 px longest side as well and the search starts from 1920 × 1440 px, so less quality has to go.

Settings and what they change

  • Output is JPEG or WebP; this tool does not write PNG. Google reports lossy WebP files 25–34% smaller than JPEGs of equivalent quality, but check that whoever receives the file can open WebP.
  • Longest side (3840, 2560, 1920 or 1280 px) keeps the proportions and caps only the long edge. For pictures viewed on a screen, 1920 px is usually plenty.
  • A 48-megapixel shot (8064 × 6048) is read straight away at 5656 × 4242 px, the largest size inside the 24-megapixel working limit.
  • On wide-gamut screens the picture is drawn on a Display P3 canvas, so saturated phone colours are not squeezed into sRGB first.
  • With several files, each is processed in turn with the same settings, named with -compressed and packed into one ZIP. The goal applies to every photo, not to the ZIP: ten photos at 200 KB each make a ZIP of close to 2 MB.

Where the numbers trip people up

  • A goal of 200 KB here means 200 × 1,024 = 204,800 bytes. A portal that counts 200,000 bytes would reject a 201,000-byte file this tool accepts, so choose the next goal down when the limit is tight.
  • Compressing an already compressed file again costs a little more detail each round. Start from the original and go to the size you need in one step.
  • Screenshots full of text get smeared edges at low JPEG quality. Keep the quality high and reduce the longest side instead.

Checked

Frequently asked questions

Can I get a photo under 200KB?

Yes. Pick a size goal of 200KB, 500KB or 1MB and the tool tries several quality values to find the highest one that fits. If even quality 0.1 is too big, it makes the picture smaller and tries again, and the result says the size it used. Pick a longest side as well to shrink it to that size from the start.

Why did the file get bigger?

Re-encoding an already compressed JPEG or a simple PNG graphic can make it larger. The result shows the change against the original; if it grew, lower the quality or choose WebP.

Is photo metadata such as EXIF kept?

No. The image is redrawn on a canvas, so metadata such as date and location is dropped. Unless a longest side or size goal shrinks it, pixel dimensions stay the same, and transparent areas turn white in JPEG. Nothing is uploaded.