Skip to content

Free browser tool

Compress an image and watch exactly what it costs

This compressor re-encodes your image at a quality you control and reports the new file size as you move the slider. A draggable divider shows the original and the compressed version side by side at the same point in the frame, so you can judge the trade-off with your own eyes rather than trusting a percentage.

It is built for people who need a page to load faster, an email attachment to fit, or a form to stop rejecting their photo — and who would rather not hand a personal image to an anonymous upload endpoint to get there.

All encoding is done by your own browser through the Canvas API. Because there is no round trip to a server, the preview updates in well under a second, and the image never exists anywhere except in your tab's memory.

Compression is lossy for JPEG and WebP: the discarded detail cannot be restored from the exported file. PNG is lossless and therefore has no quality setting — for photographs, converting it to WebP saves far more than any PNG optimiser could.

Accepts
JPEG, PNG, WebP
Exports
JPEG · WebP · PNG
Size targeting
Automatic quality search
Uploads
None

Compress · quality explorer

Drop an image here

JPEG, PNG or WebP up to 40 MB. Compression happens in this tab only.

or paste with Ctrl / ⌘ + V

Step by step

How to use this tool

  1. 01

    Add an image

    Drop in a JPEG, PNG or WebP, or paste one from the clipboard. It is decoded locally, not uploaded.

  2. 02

    Move the quality slider

    The compressed result is re-encoded as you drag and the new file size appears immediately underneath the preview.

  3. 03

    Compare before and after

    Drag the comparison divider across the image to see the original and the compressed version at the same spot.

  4. 04

    Or aim for a size

    Type a target in kilobytes and press Find it. The tool runs a binary search over the encoder and settles on the highest quality that still fits.

Practical guide

A practical guide to image compression

Most oversized images are not badly compressed — they are simply too big, in the wrong format, or optimised for the wrong thing. Here is how the pieces fit together.

Lossy and lossless are different jobs

Lossless formats such as PNG reconstruct the original pixel for pixel. Lossy formats such as JPEG and WebP throw information away — mostly fine colour variation and high-frequency detail that human vision is poor at noticing — and reconstruct an approximation.

That is why a photograph saved as PNG can be ten times larger than the same photograph as a good WebP, and why a screenshot of text saved as JPEG looks fuzzy around the letters. Match the format to the content, not to habit.

  • Photographs and complex gradients → WebP, or JPEG for maximum compatibility
  • Screenshots, diagrams, logos, anything with sharp edges → PNG, or WebP lossless
  • Images needing transparency → PNG or WebP; never JPEG
  • Icons and simple shapes → SVG, which has no pixels to compress at all

Dimensions beat quality settings

File size scales with the number of pixels, so width matters quadratically: halving a photo's width removes roughly 75% of its data before the encoder makes a single decision. A 4000 px photo displayed in a 600 px column is wasting about 97% of the bytes it costs.

Cap the width to the largest size the image is actually displayed at — doubled if you are serving high-density screens — and then use the quality slider for the rest. That is the order that gets small files without visible damage.

Where the artefacts show up

Lossy encoders work on 8×8 or 16×16 blocks. As quality drops, the first casualties are subtle gradients — skies and skin tones develop banding — followed by ringing around high-contrast edges and, eventually, visible block boundaries in flat areas.

Inspect those three places when comparing: a large area of sky, a face, and any hard edge between light and dark. If they survive, the rest of the image almost certainly has too.

Budget-driven compression

Sometimes the requirement is a number: under 200 KB for an upload form, under 100 KB for an email signature, under 1 MB for a job application. Guessing at the slider wastes time and usually lands well below what the budget allows.

The Find it button encodes the image at several quality levels, halving the search range each time, and keeps the highest quality that still fits. Seven passes are enough to land within about 1% of the ideal setting, and each pass takes only milliseconds because it runs locally.

Before you export

Important considerations

Honest limits matter more than a longer feature list. These are the trade-offs worth knowing before you download the result.

Lossy compression is one-way

Detail removed by the encoder cannot be recovered from the output file. Always compress from your original, never from a previous export.

PNG has no quality dial

The slider is disabled for PNG output because the format is lossless. To shrink a PNG photograph meaningfully, convert it to WebP or JPEG.

Encoders vary between browsers

Chrome, Firefox and Safari each ship their own JPEG and WebP encoders, so the same quality value can produce slightly different file sizes. Visual quality is equivalent.

Transparency and JPEG do not mix

Exporting an image with an alpha channel as JPEG flattens transparent pixels onto white. Choose WebP or PNG to keep transparency.

Metadata and colour profiles are dropped

Canvas re-encoding discards EXIF, XMP and ICC data. For wide-gamut photography that relies on an embedded profile, compress in an application that preserves it.

Very small budgets have limits

If a target size is unreachable even at the lowest quality, reduce the dimensions as well — the width cap and the quality slider work together.

Questions

Frequently asked questions

How much can I compress an image before it looks bad?

For photographs, JPEG and WebP hold up remarkably well down to about 70–75% quality; between 60% and 70% you start to see softening in fine texture, and below 50% flat areas break into visible blocks. Graphics with hard edges, screenshots and text degrade much earlier, because the encoder spends its budget smoothing exactly the edges that carry the meaning. Use the comparison divider rather than a rule of thumb — your image is the only reliable test.

Why does compressing my PNG barely change anything?

PNG is lossless: it stores every pixel exactly and has no quality dial at all. Its size is driven by how many distinct colours and how much repetition the image contains. To make a PNG photograph meaningfully smaller you have to change format — converting it to WebP or JPEG typically cuts the size by 60–80%.

What does the quality number actually mean?

It is a parameter passed to the browser's encoder, not a percentage of visual fidelity. It scales the quantisation tables that decide how aggressively fine detail is discarded. Because each browser ships its own encoder, the same number can produce slightly different byte counts in Chrome, Firefox and Safari — the visible result is comparable.

Is it better to resize or to compress?

Resize first, then compress. File size grows roughly with pixel count, so halving the width of an oversized photo removes about three quarters of the data before the encoder has done anything. Compressing a 4000 px image to fit a 600 px slot is optimising the wrong variable — which is why this tool can cap the width as well.

Can I compress the same image twice?

You can, but each pass re-encodes an already-compressed image and the artefacts accumulate, an effect known as generation loss. Always start again from the original rather than re-compressing an export.

Does compression remove my EXIF data?

Yes, as a side effect: the image is redrawn on a canvas, which keeps only pixels, so camera, timestamp and GPS tags do not survive. If your goal is specifically privacy and you do not want to re-encode the pixels, use the Remove EXIF Data tool, which strips metadata losslessly.

Privacy & security note

Compression happens in your browser. The file is read with the File API, decoded into a canvas and re-encoded by the browser's own JPEG, PNG or WebP encoder on your device. No copy is uploaded, queued or stored, and the comparison preview you see is generated from local memory.

This matters for the images people usually need to compress — identity documents, medical scans, contract screenshots and family photos. Because the bytes never leave the tab, there is nothing on our side to leak, retain or subpoena.

Read the full privacy policy