Image Compressor

JPEG, PNG or WebP only. Up to 20 MB and 40 megapixels. Animated files are flattened to a single frame.

Output format

JPEG puts transparent areas on white. WebP keeps transparency. Export may remove metadata and change color representation; keep the original.

Processed locally in your browser. Your input is not uploaded or saved by this tool.

Choose an image and click Compress image to preview the result.

About this tool

This tool compresses JPEG, PNG and WebP images in your browser and can shrink their pixel dimensions at the same time. Bloggers, web developers and anyone attaching photos to email or forms use it to cut file size before uploading. Lossy compression reduces file size by discarding image detail that is hard to see; the quality setting controls how much is discarded, trading file size against visual fidelity.

Smaller images load faster on websites, fit within email attachment limits and use less storage. The two largest savings usually come from reducing dimensions a camera produced for printing to a size that suits a screen, and from re-encoding the result at a sensible quality.

How it works

The browser decodes your image and resizes it proportionally so neither dimension exceeds the limit. Smaller images are never enlarged. JPEG and WebP use lossy compression controlled by the quality setting. File-size savings depend on the source image; already optimized files may become larger. Animated input produces a still image.

Choose an image, pick JPEG or WebP as the output format, and set the quality slider and the maximum width or height. The defaults are JPEG at 80% quality and a 1920-pixel limit, which suit most photos for the web. Select Compress image to see the preview, the original and output sizes, the output dimensions and the size reduction, then download the result or change the settings and compress again.

Example

A 4000 × 3000 image with a maximum dimension of 1920 becomes 1920 × 1440. JPEG at 80% quality often reduces its size, but the exact reduction depends on the image and browser.

A portrait phone photo of 3024 × 4032 pixels works the same way: the longer side is 4032, so the scale is 1920 / 4032 and the output is 1440 × 1920. That cuts the pixel count from about 12.2 million to about 2.8 million, roughly 77% fewer pixels before compression even starts, which is why resizing often saves more than lowering quality.

Assumptions and limits

Input must be JPEG, PNG or WebP, up to 20 MB and 40 megapixels. Output is JPEG or WebP only, at 10–100% quality, with a maximum dimension of 100–8192 pixels. There is no lossless PNG optimization, batch processing or target file size. Metadata may be removed, and JPEG output fills transparent areas with white.

Frequently asked questions

Does my image leave my device?

No. Decoding, resizing, compression and download happen locally in your browser. No image-processing service receives your file. That makes the tool suitable for personal photos and documents you would rather not upload.

Does compression preserve the original file?

Yes. The original file is not overwritten. The download is a new image, which may have lower quality, fewer pixels, removed metadata or a changed color profile.

What quality setting should I use for JPEG or WebP?

Settings around 70–85% are a common starting point for photos on the web, but the best value depends on the image and how it will be viewed. Compare the preview with the original and lower the quality until differences become noticeable.

Is WebP smaller than JPEG?

WebP often produces smaller files than JPEG at similar visual quality and also supports transparency. Results vary by image and browser encoder, so compress with both formats and compare the reported sizes.

Why did my PNG get so much smaller?

This tool converts PNG input to lossy JPEG or WebP. PNG is lossless, so photographs saved as PNG are often large and shrink substantially when converted. Graphics with text or sharp edges may show artifacts, so check the preview.

Link with your values

Add these parameters to this page’s address to open it with the values filled in, for example to share a calculation or to link to it from an AI assistant. The result is calculated in the browser: the page HTML shows an example for the default values, and the tool sets the data-url-params attribute once the link’s values are applied.

ParameterValueIf omitted
formatOutput formatone of: jpeg, webpdefault jpeg
quality_pctQualitypercent: 6.5 means 6.5%; allowed 10–100default 80
max_dimensionMaximum width or height (100–8192 pixels)whole number; allowed 100–8192default 1920

Examples

  • ?format=webp&quality_pct=65&max_dimension=1280
  • ?quality_pct=50

Write decimals with a point. Encode a space as %20, + as %2B, # as %23 and & as %26.

Result elements: [data-result-block="compressed-image"]