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/* · runs locally · nothing uploaded
How it works
Pick an image, tune the options, then download the result. Everything runs in your browser.
- 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
HTMLImageElementand rendered to an off-screen<canvas>for re-encoding.The source on disk is never modified; you always download a new file.
PNGJPEGWebPcanvasinput · imagedecodedload: image/* canvas: w × h
loadedready - 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 strippedconfig · formatjpgencode: image/jpeg
setformat-aware - 03
Tune quality
The quality slider feeds
canvas.toBlob(mime, q). Values run 0.1 to 1.0 — JPEG/WebP are lossy atq < 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 PNGWebPconfig · quality0.80canvas.toBlob( "image/jpeg", 0.80 )
appliedlive - 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-firstexport · compressedready✓ Downloaded: compressed.jpg ✓ Saved 42% on size ✓ 100% client-side
ready to shipsuccess
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’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’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.
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-perfectEmail 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-tunableCMS 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-awarePortfolio 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-safeAPI 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-sideBandwidth 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-readyFrequently asked questions
Something missing?
Tell us what you need. We ship the top requests every two weeks.