Skip to content
Tools

Image Compressor

Compress and resize images without losing visible quality. Batch processing, WebP and AVIF output, and a before-and-after comparison — all running locally in your browser.

Drop images here

Or paste from the clipboard, or . JPEG, PNG, WebP, AVIF and GIF, up to 75 MB each.

Compression runs on this device. Nothing is uploaded, nothing is stored, and the page works with the network switched off.

Preset

Custom settings. Pick a preset to start from a known-good combination.

Format

Quality

80

Good — the usual choice for the web

Resize

Resize mode

Keeps the dimensions as they are.

Background

Used only when a transparent image is saved as JPEG, which has no alpha channel. Without it, transparency turns black.

Metadata

EXIF is not carried over. Re-encoding through a canvas drops it, so camera model, GPS coordinates and timestamps do not survive — deliberately, since a photo published with its location attached is the usual accident. Rotation is the one tag that is read, and it is applied to the pixels before it is discarded.

No images yet.

Everything happens locally in your browser. Your images are never uploaded, and EXIF metadata — including GPS coordinates — is stripped from every file this tool produces.

What is image compression?

Image compression reduces the number of bytes needed to store a picture. It works because photographs are enormously redundant: neighbouring pixels are usually similar, and the eye is far more sensitive to brightness than to colour, and far more sensitive to large shapes than to fine texture. A compressor exploits all three.

An uncompressed 12-megapixel photograph is about 36 MB — three bytes for every pixel. The JPEG your camera writes is perhaps 4 MB. Re-encoded as WebP at a sensible quality and sized for a web page, it is nearer 150 KB. Nothing has been lost that you can see at normal viewing size; what has gone is detail that was costing bandwidth and buying nothing.

Every one of those steps happens here inside your browser. There is no upload step, no queue, and no server that ever receives the file.

Lossy vs lossless compression

This is the one distinction worth understanding, because it determines what you can and cannot do afterwards.

Lossy

JPEG, WebP and AVIF discard information permanently. They transform the image into frequency components, keep the ones the eye notices and round away the ones it does not. The saving is dramatic — often 95% — and the discarded detail is gone. Compressing an already-compressed image a second time discards a second time, so repeated saves degrade an image in a way a single save does not.

Lossless

PNG stores every pixel exactly. It saves space only by describing repetition more efficiently, which is why it does brilliantly on a screenshot of flat interface colours and badly on a photograph of leaves. Decompressing a PNG returns the original bytes, so you can edit and re-save it indefinitely without decay.

The practical rule: photographs lossy, graphics lossless. A photograph has no flat areas for a lossless coder to exploit and plenty of texture a lossy one can throw away. A screenshot is the reverse — flat colour everywhere, and sharp text edges that lossy compression turns into a halo.

Choosing a format

Four output formats, and in practice one right answer most of the time.

FormatTypeAlphaBest for
WebPLossyYesWebsites, Product photography, Anything with transparency
JPEGLossyNoPhotographs, Email attachments, Maximum compatibility
AVIFLossyYesModern websites, Large hero images, Bandwidth-sensitive delivery
PNGLosslessYesScreenshots, Logos and line art, Images needing exact pixels

WebP is the default because it wins on nearly every axis: 25–35% smaller than JPEG at matched quality, a full alpha channel, and support in every browser shipping today. The reasons to choose otherwise are specific — JPEG for software too old to know what WebP is, PNG for pixel-exact output, AVIF when you want the absolute smallest file and can accept the slower encode.

AVIF is the newest and the smallest, typically another 20% below WebP. Its weakness is not decoding, which is widespread, but encoding, which is not — and the browser API fails silently, handing back a PNG when asked for something it cannot make. The tool tests for this on load and marks the format unavailable rather than giving you the wrong file.

Picking a quality setting

The quality number is not a percentage of anything. It is a dial on how coarsely the encoder rounds away detail, and its relationship to file size is steeply non-linear: the last ten points cost far more bytes than the first fifty.

  • 95–100 — visually lossless, and expensive. The file can be several times the size of the same image at 85 for differences you would need a pixel-difference tool to locate.
  • 85–94 — excellent. Indistinguishable at normal viewing size. Use this for photography where the image is the point.
  • 75–84 — the usual choice for the web, and where the default of 80 sits. Artefacts exist but you have to look for them.
  • 60–74 — softening becomes visible on close inspection, especially around high-contrast edges. Fine for thumbnails.
  • Below 60 — obvious blocking, ringing around text, and colour banding in smooth areas. Only worth it when bandwidth genuinely dominates.

Rather than trusting the numbers, drag the slider and look. The comparison view lays the compressed image directly over the original at the same size and position, so anything you can see moving is a real change in the pixels rather than a difference in how the two are displayed.

Why resizing matters more than quality

This is the part most compression advice skips, and it is the larger lever by a wide margin.

File size scales with the pixel count, and the pixel count scales with the square of the dimensions. Halving both sides leaves a quarter of the pixels. No quality setting achieves a 75% reduction without visible damage; halving the dimensions of an image that was being displayed at half size anyway costs nothing at all, because those pixels were never reaching the screen.

A 4000×3000 photograph displayed in a 800-pixel-wide column is carrying twenty times the pixels it can use. Compressing it harder is optimising the wrong thing. Resizing it to 1600px — twice the display width, so it still looks sharp on a high-density screen — removes 84% of the data before the encoder even starts. If the real photograph does not exist yet, the dummy image generator makes a placeholder at the exact dimensions you have decided on.

Downscaling here is done in halving steps rather than one jump. drawImage samples rather than averages when it shrinks by a large factor, so going from 4000px to 400px in a single pass discards nine of every ten pixels and leaves visible aliasing on any fine detail. Halving repeatedly averages instead, which is what a proper image library does internally.

Enlarging is refused unless you explicitly ask for it. There is no information in an image that was not captured, so scaling up invents pixels by interpolation: the file gets bigger and the picture gets softer, which is the opposite of what a compressor is for.

How PNGs actually get smaller

PNG has no quality slider, because it is lossless — there is no detail to trade away. What it has instead is a palette.

A full-colour PNG stores three or four bytes per pixel. A palette PNG stores an index into a table of up to 256 colours, which for a 128-colour image is a single byte, or less once the compressor has been over it. That is where the saving comes from, and on the right image it is enormous: a screenshot of an interface might contain a few dozen distinct colours, and storing 16 million possibilities to represent them is pure waste.

Median cut

Choosing which colours to keep is the interesting part. The tool uses median cut: it puts every colour in the image into one box, then repeatedly splits the box with the widest spread along its widest channel, at the median, until there are as many boxes as colours wanted. Each box contributes its average colour. Splitting at the median rather than the midpoint means each box ends up holding a similar number of pixels, so the palette is spent where the image actually is.

The channel choice is weighted perceptually — green counted heaviest, blue lightest, in the proportions the eye actually uses. A palette chosen by raw numeric spread wastes entries on blue gradations nobody can distinguish while banding the greens everybody can.

Dithering

Once the palette is fixed, every pixel has to map to one of its entries, and a gradient that used 200 shades mapping onto 16 produces visible bands. Floyd–Steinberg ditheringfixes this by carrying the rounding error forward: the difference between a pixel’s true colour and the palette entry it received is pushed into its not-yet-processed neighbours in fixed proportions. The result is a fine pattern that averages to the right colour, and a gradient stays smooth.

Turn it off for logos, icons and line art. Those areas are meant to be perfectly flat, dithering makes them noisy, and the noise also compresses worse — so you get a larger file that looks wrong.

How to compress an image

  1. 1. Add your images. Drag them in, paste from the clipboard, or choose files. Add as many as you like — they queue and process two at a time.
  2. 2. Pick a preset. Ten of them, each setting format, quality and size together, because those three decisions are related and setting one in isolation usually leaves the biggest saving on the table.
  3. 3. Adjust if you need to. Format, quality, palette, dithering and resize are all exposed. Changing anything and pressing Ctrl+Enter re-runs the whole batch.
  4. 4. Check the result. The slider overlays compressed on original at the same size; zoom to 8× to inspect a specific area. Each image reports its before-and-after size, its saving and how long it would take to arrive over slow 3G.
  5. 5. Download. Individually, or the whole batch as a ZIP with Ctrl+Shift+D.

If an image comes back larger, the tool says why rather than reporting a negative saving and leaving you to guess. The usual cause is re-encoding an already-compressed file at a high quality, where the second pass has to store the first pass’s artefacts as though they were real detail.

The presets, and what they do

Each one sets a format, a quality and a size together. Read from the tool’s own preset list, so what is described here is exactly what the buttons apply.

Website

WEBP · 1920px

WebP at 80% quality, capped at 1920px. The sensible default for anything going on a page — usually 80-90% smaller than a camera original.

Thumbnail

WEBP · 400px

400px WebP at 75%. Small enough that a grid of them loads instantly, large enough to survive a retina screen at 200px.

Email attachment

JPEG · 1200px

JPEG at 70%, capped at 1200px. JPEG because email clients are old, and 1200px because nobody reads mail at full screen.

Social media

WEBP · 1200px

1200px WebP at 85%. Platforms re-compress whatever you give them, so send good quality at their display size rather than a huge original.

Hero banner

WEBP · 2560px

2560px WebP at 82%. Wide enough for a large desktop display without carrying a print-resolution original to every visitor.

Screenshot

PNG

PNG reduced to 128 colours. Screenshots are flat colour and sharp text, which quantises extremely well and stays crisp — where JPEG would ring around every letter.

Logo or line art

PNG

PNG at 64 colours with no dithering. Flat artwork needs few colours, and dithering would add noise to areas that should be perfectly flat.

Print quality

JPEG

JPEG at 95%, no resize. Keeps the original dimensions and almost all the detail — for anything that will be printed rather than viewed.

Smallest possible

AVIF · 1600px

AVIF at 55%, capped at 1600px. Visible softening on close inspection, and often a tenth of the original — for when bandwidth matters more than fidelity.

Lossless

PNG

PNG with the full palette and no resize. Changes nothing about the picture; use it when the pixels must be exact and any saving is a bonus.

Compression, page speed and SEO

Images are typically the majority of a page’s weight, which makes them the majority of its loading time — and loading time is a ranking signal through Core Web Vitals.

Largest Contentful Paint measures when the biggest visible element finishes rendering, and on most pages that element is an image. Google considers it good below 2.5 seconds. A 2 MB hero on a mobile connection cannot meet that no matter what else you do; the same image at 150 KB usually can. Of all the levers available for LCP, compressing and correctly sizing the hero is normally the largest and the cheapest.

It is worth being precise about the mechanism: the ranking factor is the speed, not the compression. Compression is simply where the speed usually is. Serving a correctly sized image matters just as much — a 4000px file displayed at 800px is slow even when it is well compressed, which is why the presets set dimensions rather than only quality.

The share preview is a separate file with its own size, and it is the one people forget: the Open Graph generator writes the tags that point at it once you have a compressed version to link to.

Two more things that cost nothing once the file is small: set explicit width and height so the browser reserves the space and the layout does not shift, and use loading="lazy" on anything below the fold.

Why nothing is uploaded

Every other compressor of this kind sends your images to a server, compresses them there, and sends them back. That is a reasonable engineering decision and a poor privacy one: photographs carry GPS coordinates, faces, documents, screenshots of things not meant to be seen, and once a file has been transmitted you are trusting a policy rather than a mechanism.

This tool does the work in your browser instead — the canvas API to decode and re-encode, a Web Worker so the page stays responsive while it happens. Your images never leave the device. The claim is easy to check: load the page, disconnect from the network, and carry on compressing. It will keep working, because there was nothing on the other end of a connection to begin with.

What happens to the metadata

Re-encoding through a canvas discards everything except the pixels, so EXIF does not survive: camera model, lens, exposure, timestamps and GPS coordinates are all gone from the output. That is the desired outcome — a photograph published with its location attached is a common and consequential accident.

The single exception is the orientation tag, which is read before anything else happens and applied to the pixels themselves. That is why a phone photograph comes out the right way up here, and why it stays that way afterwards: the rotation is in the image rather than in a tag that the next piece of software may or may not honour.

Common use cases

Anywhere an image has to travel over a network to reach somebody.

Website and app assets

WebP at 80% capped to 1920px is the default for a reason: it is usually 85–95% smaller than a camera original and indistinguishable on a page.

Core Web Vitals

The Largest Contentful Paint element is nearly always an image. Compressing and correctly sizing the hero moves the metric more than almost anything else you can change.

E-commerce product photos

Hundreds of images at consistent settings, batched, with the palette left alone — product colour has to stay accurate, so quality goes above the site default.

Email attachments

JPEG at 70% and 1200px keeps a set of photos under the size limit most mail servers still enforce, and inside what a phone will download over mobile data.

Screenshots for documentation

PNG at 128 colours: flat interface colours and sharp text quantise almost invisibly, where JPEG would ring around every letter.

Social media

Platforms re-compress whatever they are given, so sending a good-quality image at their display size beats sending a huge original that gets mangled.

Logos and line art

PNG at 64 colours with dithering off. Flat artwork needs very few colours, and dithering would add noise to areas meant to be perfectly flat.

Photo sharing and archives

Resizing to a long edge of 2560px removes most of the file size while keeping every image comfortably sharp on any screen it will ever be viewed on.

Frequently asked questions

Is this Image Compressor free?

Yes. Every format, every preset, batch compression and the ZIP download are free, with no account, no watermark, no daily limit and no cap on file size beyond what your browser can hold in memory.

Are my images uploaded to a server?

No. Compression happens inside your own browser using the canvas and Web Worker APIs that are already in it. There is no upload, no temporary storage and no server that ever sees the image. You can disconnect from the network after the page loads and keep compressing — which is the simplest way to verify the claim for yourself.

How much smaller will my images get?

For a camera photograph going to WebP at 80% quality and 1920px, usually 85–95% smaller. For a PNG screenshot reduced to 128 colours, typically 60–80%. For an image that is already optimised, sometimes nothing at all — and the tool says so rather than pretending otherwise.

Will compression ruin the quality of my photos?

At 80% quality, not in any way you will see at normal viewing size. The slider is there so you can decide: drag it and watch the file size and the preview change together. The comparison slider overlays the compressed version on the original at the same size, so any difference on screen is a real difference in the pixels.

Which format should I choose?

WebP for almost everything on the web — it is 25–35% smaller than JPEG at the same quality and every current browser reads it. JPEG when something old has to open the file. PNG only when you need pixel-exact output or a transparent background that WebP cannot give you. AVIF when you want the smallest possible file and can accept slower encoding.

What is the difference between lossy and lossless compression?

Lossy compression throws away detail your eye is bad at noticing and cannot get it back — JPEG, WebP and AVIF all work this way. Lossless compression stores every pixel exactly and only removes redundancy, which is what PNG does. Lossy wins enormously on photographs; lossless is the only option when the pixels themselves matter.

Why did my image get bigger instead of smaller?

Almost always because it was already compressed and you re-encoded it at a high quality — the second pass has to store the first pass's artefacts as though they were detail. Converting a JPEG to PNG does the same thing for the same reason. Lower the quality, keep the original format, or resize instead: dimensions are a bigger lever than quality.

Is resizing better than lowering the quality?

Usually, yes, and it is the thing most people skip. Halving both dimensions quarters the pixel count — no quality setting comes close to that — and if the image is displayed at 800px on the page, the 4000px original was never doing anything except costing bandwidth.

What quality setting should I use?

80 for the web. Above 90 the file grows fast for differences nobody can see; below 60 artefacts start appearing around sharp edges. If the image contains text or line art, either go higher or use PNG, because those are exactly what lossy compression handles worst.

How do I compress a PNG without losing transparency?

Keep the format as PNG, or convert to WebP — both have a full alpha channel. Then reduce the colour palette, which is what actually makes a PNG smaller. JPEG has no transparency at all, so choosing it flattens the image onto the background colour you pick in the settings.

What does reducing the colour palette do?

A PNG stores an index into a palette rather than a full colour per pixel when the palette is small enough, which is where the saving comes from. Reducing 16 million colours to 128 is invisible on a screenshot or a logo and dramatic on the file size. On a photograph it produces visible banding, which is why dithering exists.

What is dithering and when should I turn it off?

Dithering approximates a colour the palette does not have by mixing nearby ones in a fine pattern, so a gradient stays smooth instead of banding. Turn it off for logos, icons and flat artwork: those areas are meant to be perfectly flat, and dithering adds noise that also makes the file larger.

Can I compress several images at once?

Yes. Drop as many as you like — they queue and compress two at a time, each showing its own before-and-after size. When they are finished you can download them one by one or take the whole batch as a ZIP.

Is the EXIF data removed?

Yes, and deliberately. Re-encoding through a canvas discards all metadata, which means camera model, lens, timestamps and GPS coordinates do not survive — and a photo published with its home address attached is a common accident. The one tag that is read is orientation, and it is applied to the pixels before being discarded, so a phone photo comes out the right way up.

Why do my phone photos come out sideways elsewhere but not here?

Phones store the sensor image and a tag saying how to rotate it. Software that ignores the tag shows it sideways; software that applies it twice shows it upside down. This tool reads the tag, bakes the rotation into the pixels, and then drops the tag — so there is nothing left to interpret incorrectly.

What is the largest image I can compress?

75 MB per file, and 100 megapixels of image data. Those limits exist because everything happens in your browser's memory, and a tab that runs out of it crashes rather than warning you. In practice a 100-megapixel image is well past what any camera you are likely to be holding produces.

Which image formats can I open?

JPEG, PNG, WebP, AVIF, GIF and BMP — anything your browser can decode. Output is WebP, JPEG, AVIF or PNG. An animated GIF will lose its animation, since a compressed still is a single frame.

Does this work offline?

Once the page has loaded, yes. There is no network call in the compression path, so pulling the plug changes nothing about how it behaves.

Why does AVIF sometimes not appear?

Because encoding support is not universal yet, and the browser API for it fails quietly — asking for AVIF on a browser that cannot make one returns a PNG without telling you. The tool tests each format when it loads and marks anything unavailable rather than silently handing you the wrong file type.

Does compressing images help SEO?

Indirectly but substantially. Largest Contentful Paint is one of Google's Core Web Vitals and is usually an image; a hero cut from 2 MB to 150 KB moves it more than most other changes available to you. The ranking factor is the speed, not the compression, but images are almost always where the speed is going.

Should I compress images before or after uploading to WordPress?

Before. WordPress generates its thumbnail sizes from whatever you give it, so a compressed, correctly-sized original produces smaller derivatives everywhere it appears — and saves the storage as well.

How is this different from TinyPNG or Squoosh?

TinyPNG uploads your images to its servers and limits how many you can do. This does neither, because it does not have a server involved. The closest comparison is Squoosh, which also works locally; this adds batch processing, presets, a ZIP download and the colour quantiser for PNG in one screen.

Popular tools

↑ ↓NavigateOpenEscClose