Skip to the tool
OnPageKit

Image Compressor

Shrink images for the web without uploading them.

80%
px, blank = keep

Choose an image to see the size before and after.

Everything runs in your browser. Nothing you type is sent to a server.

Found a bug in this tool? Report it.

Share this tool

Compress images without uploading them

This image compressor makes photos and screenshots smaller for the web entirely inside your browser. Drop a file, choose a quality and an output format, optionally cap the width, and the page shows the size before and after, the dimensions and the percentage saved. There is no upload step, because there is no server involved: the picture is decoded, redrawn and re-encoded in this tab.

How to use it

  1. Drop a JPEG, PNG, WebP, GIF, AVIF or BMP onto the box, or click it to pick a file.
  2. Choose the output format. WebP is the sensible default; JPEG is the fallback for old systems.
  3. Move the quality slider and watch the byte count. Stop where the preview still looks right.
  4. If the image is wider than the space it will fill on the page, type a maximum width.
  5. Download the result. The file name keeps the original stem with -compressed added.

Why width matters more than quality

The fastest way to reduce image size for the web is not the quality slider; it is the number of pixels. A 4000-pixel phone photo shown in a 800-pixel column carries twenty-five times the pixels it needs, and no quality setting recovers that waste. Set the maximum width to the largest size the image is displayed at — doubled if you want it sharp on high-density screens — and the file often drops by 80% before quality even comes into it. The proportions are kept, and the tool never enlarges a picture that is already smaller than the limit.

Choosing the image compression quality

The quality number is a hint to the encoder, not a percentage of anything measurable. It controls how aggressively fine detail is thrown away, and the curve is steep at the top: going from 100 to 90 often halves the file, while going from 60 to 50 saves little and costs a lot. For photographs, 75 to 85 is where most sites land. Screenshots with text and flat colour behave differently — lossy formats smear sharp edges, so check the preview closely or keep a PNG for those.

To compress JPEG online and keep it a JPEG, choose JPEG as the output. Transparent areas are filled with white in that case, since JPEG has no alpha channel. WebP and AVIF keep transparency.

AVIF, WebP and what the browser can encode

Every current browser can display WebP and AVIF, but encoding is a separate question. Canvas encoding of WebP is universal; AVIF encoding depends on the browser and version. When a browser cannot produce the format it was asked for, it does not raise an error — it returns a PNG. This tool checks the type of what came back and tells you, rather than handing you a mislabelled file.

A privacy bonus: EXIF is gone

Photos from phones carry EXIF metadata: the camera model, the exact time, and often the GPS coordinates of where the picture was taken. Publishing that file publishes the location. Because the output here is rebuilt from bare pixels, none of that metadata survives. The orientation tag is dropped as well, but the browser rotates the pixels before drawing, so portraits stay upright.

Once the file is lean, give it a description with the image alt checker, and if it is going to be the preview picture for a shared link, set it up with the open graph generator.

Frequently asked questions

What image compression quality should I use?

Start at 80 for photographs in JPEG or WebP and only go lower while you cannot see the difference at the size the image is displayed. Between 70 and 85 the file usually shrinks by half or more with no visible change; below 60 banding appears in skies and gradients. AVIF holds up better at low settings, so 55 to 65 is often enough there.

Is my image uploaded anywhere?

No. The file is read from your disk by the browser, drawn onto a canvas inside this tab and encoded again there. No request carries the picture or any part of it, which you can confirm in the network panel of your developer tools.

Why did the compressed file come out larger than the original?

Because the original was already compressed harder than the settings you chose, or it was a small PNG with few colours, which lossy formats handle poorly. The tool tells you when that happens. Lower the quality, switch format, or simply keep the original — re-encoding a file that is already lean only adds generational loss.

Does compressing remove EXIF data and GPS location?

Yes. A canvas holds only pixels, so the re-encoded file carries no EXIF block at all: no camera model, no timestamp and no GPS coordinates. The orientation flag goes too, but the browser applies it to the pixels before drawing, so the picture stays the right way up.

Why is AVIF not available in my browser?

Encoding AVIF from a canvas depends on the browser shipping an AVIF encoder, and not every one does. When it is missing, the browser quietly hands back a PNG; this tool compares what it asked for with what it received and warns you instead of offering the wrong file. WebP is supported everywhere current and is the safe choice.

Related tools

Updated