Image Compressor

Compress images to reduce file size without losing quality. Supports JPG, PNG, and WebP formats. Free, fast, and private — your images never leave your browser.

Drag & drop an image or

Supports JPG, PNG, WebP — Max 50 MB

Result

Original
Compressed
Saved

Lossy vs lossless: knowing what you're trading

Image compression falls into two families. Lossless (used by PNG, WebP-lossless) rearranges bits so the decoded image is bit-for-bit identical to the original; savings come from finding patterns. Lossy (used by JPEG, WebP-lossy) throws away detail the human eye doesn't notice — high-frequency components, subtle colour shifts — and can shrink a photo by 90%+ before most people see a difference. This tool uses the browser-image-compression library, which re-encodes your JPG through the browser's native JPEG encoder at the quality you pick. PNGs get converted to compressed JPEG unless you keep them as PNG.

How JPEG compression actually works

JPEG splits the image into 8×8-pixel blocks, converts each block from RGB into a luminance-plus-chrominance colour space (YCbCr), downsamples the colour channels (because human vision is less sensitive to colour detail than to brightness), applies a discrete cosine transform to each block, and quantises the resulting frequency coefficients more aggressively the higher the frequency. The "quality" slider on any JPEG encoder is really a scale factor for that quantisation table. At quality 90 you lose almost nothing visible; at 50 you see soft blocking; below 30 the 8×8 block structure becomes obvious.

Quality settings — a practical cheat sheet

  • 95–100: visually identical to source; file savings minimal. Use for print or archival.
  • 80–90: the sweet spot for web photos. About 30–50% of original file size, no visible loss at normal viewing distances.
  • 70–80: good default for blog post images and product photos. Clean look, big savings.
  • 50–70: visible softening on skin and smooth gradients. Fine for thumbnails.
  • Below 50: visible blocking and colour banding. Only when every kilobyte counts.

When JPEG is wrong

JPEG was designed for photographs. It mangles screenshots, logos, diagrams, pixel art, and any image with hard edges — you'll see "ringing" artefacts around every line. For those, stay with PNG (or WebP-lossless); the file is larger than a JPEG but doesn't look like it's been photocopied fifteen times. Same for images with transparency, which JPEG can't represent at all.

Other ways to shrink an image besides quality

  • Resize first. A 4000×3000 photo at 80% quality is still huge. Drop it to 1600×1200 and you'll save more bytes than any quality tweak.
  • Strip metadata. Camera EXIF can add 20–60 KB per photo. Most re-encoders drop it by default.
  • Switch to WebP. Same visual quality as JPEG at roughly 25–35% smaller file size, plus lossless mode and transparency. Supported by every browser released since 2020.
  • Switch to AVIF. Newer than WebP, another 20–30% smaller. Safari 16+, Chrome, Firefox, and Edge all read it.

Re-compression decay

Every pass through a lossy encoder throws away a bit more detail. Compressing, re-opening, editing, and re-compressing eventually leaves an image looking muddy and blocky — the "JPEG crunch" look you see in decade-old memes. Always keep a lossless master if you might edit the file again. Re-encode only when you export for the web.

Privacy

Your image is decoded and re-encoded in your browser tab. It does not upload. That also means the compression speed depends on your device's CPU and RAM — a 20 MP photo on an old phone takes a few seconds. On desktop, it's near-instant.