The Magic Codex

Image Compressor

Shrink your images and convert them to JPEG, WebP, or PNG — resized, recompressed, and downloadable in seconds.

Private by design: your images never leave your browser. Compression happens on your device — nothing is uploaded or stored.

Drag & drop images here, or

JPEG, PNG, WebP, GIF, BMP, AVIF — as many as you like.

Settings

Lower quality = smaller file. 75–85% looks great for photos.

Resizing is the biggest lever — shrinking to display size can shed 80%+ of the bytes.

Your images

No images yet — add some above.

How to compress images without losing quality

Most "huge image" problems come from two things: photos saved at far higher resolution than they'll ever be displayed at, and formats that were never meant for the web. Fixing both takes about thirty seconds per image with the tool above — and the visual difference is usually nil.

  1. Add your images with the picker or by dragging them onto the dashed card. As many as you like.
  2. Set a max dimension. A photo that will be shown at 1200px wide doesn't need to be 4000px — resizing is the single biggest size lever.
  3. Pick WebP at 80–85% quality for photos. It typically runs 25–35% smaller than an equivalent JPEG.
  4. Download each compressed file, or grab them all with "Download all".

JPEG vs WebP vs PNG: which format should you pick?

WebP is the best default for photos and screenshots on the modern web: small files, great quality, supported by every current browser. JPEG is the safe universal choice — it opens everywhere, including older software. PNG is lossless (pixel-perfect), so it's right for graphics with sharp text and edges, but it's the heaviest of the three — never use it for photos if size matters.

Why resizing beats quality cuts

Halving an image's dimensions removes roughly three-quarters of its pixels — and its bytes. Dropping JPEG quality from 85% to 60% saves far less and shows far more. So when a file is stubbornly large, resize first and only then nudge quality down.

How does this image compressor work?

Your browser does all the work: each image is drawn onto a canvas at your chosen size and re-encoded as JPEG, WebP, or PNG using canvas.toBlob(). Your files are never uploaded to a server, queued, or stored anywhere — the compression happens entirely on your own device.

How can I reduce image size online without losing quality?

Start by resizing: shrinking a 4000px photo to the 1200px it will actually be displayed at often removes 80% or more of the file size with zero visible change. Then use WebP at 80-85% quality, which looks identical to the original for most photos. Only drop quality below 70% if you truly need the smallest possible file.

How do I convert an image to WebP?

Choose WebP in the output format dropdown above, then download each image. WebP is supported by all modern browsers and typically produces files 25-35% smaller than equivalent-quality JPEGs, making it the best default choice for photos on the web.

Why is the quality slider disabled when I pick PNG?

PNG is a lossless format — it keeps every pixel exactly, so there is no quality setting to adjust. The slider only applies to JPEG and WebP, which are lossy formats where lower quality means a smaller file. Pick PNG when you need pixel-perfect output, like screenshots with text or graphics.

Is there a limit on file size or number of images?

No artificial limits — compress as many images as you like, one after another. The only real constraint is your device's memory: extremely large photos (tens of megapixels) on a low-memory phone may struggle, in which case compress a few at a time.

Are my images uploaded anywhere?

No. Everything runs in JavaScript in your browser on your own device. Your images never leave your computer or phone — there is no server, no upload queue, and nothing is stored or tracked.

More from the codex