compress · jpeg · webp · png · local

Compress images with quality control

Lossy compression for JPEG and WebP, lossless re-encode for PNG. Live before/after with the size savings displayed. Runs locally.

Image Compressor
Input
—
no file
Output
—
jpg
Saved
—
—
Quality
0.80
image/jpeg
Format:
Quality:0.80
input · image

image/* · runs locally · nothing uploaded

output · preview
Pick an image to begin.
Quick Start

How it works

Pick an image, tune the options, then download the result. Everything runs in your browser.

  1. 01

    Pick a source image

    Any browser-supported raster works as input — PNG, JPEG, WebP, GIF (first frame), AVIF. The file is decoded into an HTMLImageElement and rendered to an off-screen <canvas> for re-encoding.

    The source on disk is never modified; you always download a new file.

    PNGJPEGWebPcanvas
    input · imagedecoded
    load: image/*
    canvas: w × h
    loadedready
  2. 02

    Choose target format

    JPEG is the workhorse for photographs — small, ubiquitous, no alpha. WebP usually beats JPEG at the same visual quality (Google’s VP8-based codec). PNG stays lossless, only stripping EXIF and colour-profile metadata in the re-encode.

    Pick the target that matches downstream consumers — JPEG for legacy mail clients, WebP for modern web, PNG for design tools.

    JPEGWebPPNGEXIF stripped
    config · formatjpg
    encode: image/jpeg
    setformat-aware
  3. 03

    Tune quality

    The quality slider feeds canvas.toBlob(mime, q). Values run 0.1 to 1.0 — JPEG/WebP are lossy at q < 1; PNG ignores quality entirely (it’s a lossless codec).

    For photos, WebP 0.75–0.85 typically beats JPEG 0.85 in size while looking identical. For UI screenshots stick to PNG.

    toBlobJPEG quality 0-1lossless PNGWebP
    config · quality0.80
    canvas.toBlob(
      "image/jpeg",
      0.80
    )
    appliedlive
  4. 04

    Compress and save

    Hit Compress, review the before/after preview, then download. The stats panel surfaces the Saved % so you can confirm the trade-off before shipping.

    Everything runs locally — your image never leaves the browser.

    before/aftersize ratiodownloadprivacy-first
    export · compressedready
    ✓ Downloaded: compressed.jpg
    ✓ Saved 42% on size
    ✓ 100% client-side
    ready to shipsuccess
Pro tips

Browser-only image work that scales

Convert with quality control

JPEG/WebP let you pick a 0–1 quality. Default 0.92 is a good compromise of size and visible quality.

PNG isn&rsquo;t free

Use PNG only for transparency or sharp edges. For photos, WebP is smaller at the same perceived quality.

Strip EXIF for privacy

Photo EXIF often contains GPS, camera model, and timestamps. Strip before sharing public uploads.

Watch the colour profile

Convert to sRGB before web export. Wide-gamut images render oversaturated in non-managed browsers.

AVIF when it&rsquo;s available

AVIF beats WebP on size at the same quality. Detect support via <picture> with fallbacks.

Lazy-load below the fold

Add loading="lazy" on <img>. The browser handles scheduling — no IntersectionObserver needed.

Use Cases

When to use this tool

Common workflows it speeds up.

Web performance

Shrink hero images for faster page loads. Decoded into a Canvas 2D context — original bytes never leave the tab, so you can process customer-uploaded photos, internal screenshots, or sensitive diagrams without privacy concerns.

px-perfect

Email attachments

Squeeze big photos under mail-server limits. Encoders expose quality 0–1 where the format supports it (JPEG, WebP); PNG and AVIF stay perceptually lossless. Pick 0.85 for web, 0.95 for archival, 0.7 for thumbnails.

quality-tunable

CMS uploads

Pre-compress before WordPress, Strapi, etc. Pair with the EXIF Stripper before sharing user-uploaded photos publicly. Camera serial numbers, GPS coordinates, and timestamps often hide in image metadata and leak more than the picture itself.

format-aware

Portfolio export

Smaller previews while keeping originals safe. Output preserves colour profile (sRGB) so it renders consistently across browsers, monitors, and print pipelines. Wide-gamut workflows can opt into Display P3 for modern Apple devices.

EXIF-safe

API payloads

Cap request sizes when posting images to backends. Re-runs only on option changes, never on window resize, so the canvas stays responsive on large images. drawImage uses the browser's bilinear filter for fast resampling.

client-side

Bandwidth savings

Mobile-friendly thumbnails for slow networks. Downloads as .png, .jpg, .webp, or .avif with the correct MIME so editors apply native handling on save. The filename inherits a sensible suffix derived from the input.

compression-ready
FAQ

Frequently asked questions

JPEG and WebP at quality < 1 are lossy. PNG output is always lossless (re-encoded).
Yes. Canvas re-encoding drops metadata including EXIF and color profiles.
Canvas re-encoding can grow simple PNGs. For PNG, try the PNG Color Quantizer for real savings.
WebP at 0.75–0.85 usually beats JPEG at the same visual quality.
No. Everything runs locally in your browser.
Suggest a tool

Something missing?

Tell us what you need. We ship the top requests every two weeks.

Sent straight to the maintainers · no account needed
47 in queue·8 shipped this month
Request queued. Thanks!