Image Compressor

Shrink JPG, PNG, WebP, AVIF or GIF images: convert, resize, strip metadata and compare sizes.

JPG, PNG, WebP, AVIF or GIF (first frame), max 30 MB.

When you run the tool, this file is uploaded to our server, processed and then deleted. The files the tool creates stay on our server for about 2 hours: download them to keep them, or save them to your Google Drive.

1 = smallest file, 100 = best quality. Ignored for PNG, which is always lossless.

More options
px

Optional. Larger images are scaled down proportionally; smaller ones are never enlarged.

px

Optional. Applied together with the maximum width.

Try an example: ·

More about this tool

Part of Reelcraft Audio, video & images

How it works

Re-encodes an image as WebP, AVIF, JPEG or PNG at the quality you choose, optionally scales it down to a maximum width or height and removes metadata such as GPS location. Shows the before/after size, the saving and the new dimensions, with a preview and a download.

  • The file type is detected from its first bytes, not from the file name; only JPEG, PNG, WebP, AVIF and GIF are accepted. For animated GIFs only the first frame is used.
  • ImageMagick decodes the image, applies the EXIF orientation, optionally scales it down (never up) to fit the maximum width/height, and encodes it in the chosen format. AVIF is encoded with libavif (avifenc) when it is installed.
  • Quality is passed to the encoder as is (1–100). PNG output is lossless, so quality does not apply; PNG is usually larger than WebP/AVIF for photos.
  • With "Remove metadata" on, EXIF/XMP/IPTC data (including GPS location and camera details), comments and embedded profiles are removed. Timestamps are never written, so the same input always gives the same file.
  • Files are processed in a private temporary folder that is deleted right after processing. The result is kept for about 2 hours so you can download it, then deleted.

Lossy formats (WebP, AVIF, JPEG) discard detail; keep your original.

Use this tool in an app

These free programs for your browser have this tool built in, next to everything else the task needs.

  • Reelcraft Audio, video & image batch studio

    Audio, video & image batch studio: cut, convert, compress, subtitle, reframe

    Open Reelcraft

How to use the Image Compressor

Shrink a JPG, PNG, WebP, AVIF or GIF by re-encoding it as WebP, AVIF, JPEG or PNG, scaling it down and removing GPS and camera metadata.

What it is for

A photo straight from a camera or phone is often several megabytes: too big for a fast website, an email or an upload form. Most of that size is unnecessary for screen use. This tool re-encodes one image in the format and quality you choose, optionally scales it down to a maximum width or height, and removes metadata such as the GPS location.

You can output WebP (small, supported by all current browsers), AVIF (often smaller still, slower to encode), JPEG (works everywhere) or PNG (lossless, for graphics and transparency). The result shows sizes before and after, the saving and the new dimensions, with a preview and download.

It handles one image per run. For many images at once, use the Batch Image Resizer, which also converts formats.

Worked example

A 4000 × 2670 landscape JPG (1.28 MB) with GPS coordinates, camera model and a serial number in its EXIF data. Maximum width 1600, metadata removal on (the default), three formats:

Worked example
OutputResultSaving
WebP, quality 75109 KB91.5%
AVIF, quality 60115 KB91.0%
JPEG, quality 80209 KB83.7%

All three came out at 1600 × 1068 px. WebP gave the smallest file here, and even staying with JPEG cut the size by more than 80%, mostly thanks to the smaller dimensions.

Without the maximum width, WebP at quality 75 still saved 72.1% (356 KB at the full 4000 × 2670). Resizing is where most of the saving comes from: a 1600-pixel image has about a sixth of the pixels of a 4000-pixel one.

A transparent 1200 × 900 PNG cut-out of a product (1.02 MB) became a 14.5 KB WebP at quality 80, keeping its transparency.

How to read the result

  • Metrics: original size, new size, saving in percent and the final dimensions.
  • Before and after table: format, bytes, width, height and whether metadata was removed.
  • Preview and download: check fine detail, skies and skin tones at 100% zoom before you replace the original.

A saving close to 0%, or a negative one, means the input was already well compressed. Try a lower quality, a smaller size or a different format.

Tips and common mistakes

  • Set a maximum width first. For a blog or shop, 1200–2000 px wide is plenty, and it saves far more than lowering quality.
  • Quality 70–80 is the sweet spot for WebP and JPEG photos. Below 60, banding in skies and blocky edges appear.
  • AVIF quality numbers aren't directly comparable with JPEG. Compare the previews, not the numbers.
  • Use PNG only for screenshots, logos and graphics with sharp edges or transparency. For photos, PNG is usually much larger than the JPG you started with.
  • Keep "remove metadata" on for anything you publish. Phone photos often contain the exact GPS location where they were taken.
  • Animated GIFs lose their animation: only the first frame is used.

FAQ

WebP or AVIF?

Both are much smaller than JPEG at similar quality. WebP encodes faster and is supported everywhere current. AVIF can be smaller on some photos but not all, as the example shows. Try both on a typical image.

Does compressing an already compressed JPG lose quality?

Yes. Every lossy re-encode discards a little more detail. Always start from the best original you have and keep it.

Will small images be enlarged to the maximum width?

No. The maximum width and height only scale images down. Smaller images keep their size.

Is my photo stored on the server?

It's processed in a private temporary folder that is deleted right after. The result can be downloaded for about two hours.

Guide last updated:

For scripts and AI agents

  • JSON API: POST https://imagecompressor.usefulweb.site/api/v1/calculate (same calculation as this page)
  • Interface description: OpenAPI 3.1 · AI guide: llms.txt
  • MCP server (Streamable HTTP): https://imagecompressor.usefulweb.site/mcp · tool name image_compressor
Example request
curl -s -X POST https://imagecompressor.usefulweb.site/api/v1/calculate \
  -H 'content-type: application/json' \
  -d '{"file":{"filename":"gradient.png","contentType":"image/png","contentBase64":"iVBORw0KGgoAAAANSUhEUgAAADAAAAAgEAIAAACLJrAIAAAAvElEQVRo3u3ZIRLDMAxE0XZmPSqzUA4W3h40uVRwQgqEJcEE/HcCg7W1tt/Lsq7H8UJCNsd2fe9exnPJXPv5u3sZz0WCGrI5SFBBNrWdJCgl87FdJCgVW4wEpWRzbJxBOZmLKVZgijVii5GglGyOnSmWkzk9qBJXDRKUogc19HHRgwpxSJOgFE26IXN6UEU2RQ8q0KQb3MUa8WBGglLx5EqCUvSgRox5EpTiV6PBe1CDHtSQOT2oIpv8alT+GThGqh2cdAQAAAAASUVORK5CYII="},"format":"webp","quality":75}'
Feedback · ideas & bug reports welcome