No upload, 100% local, no account

How-to

Compress images without losing visible quality

Most images leave a camera or design tool far heavier than a browser or email requires. Compression is not about ruining clarity: with the right format and balanced quality settings, the output looks identical to the source while loading two to five times faster. The trick is choosing the right format first, then dialing in compression locally.

Step by step

  1. Choose an output format that the destination accepts. The compressor offers Same, JPEG, WebP and AVIF. Same keeps a PNG input as PNG: at quality 100 it uses lossless @jsquash/png WASM encoding, while lowering quality below 100 applies RGBA channel quantization to reduce weight. JPEG suits photographs, while WebP and AVIF also support transparency. Keep a lossless source when exact pixel preservation matters, and compare actual results.
  2. Add the image (JPEG, PNG, WebP, AVIF, GIF, or BMP up to 50 MB) and select quality mode or target-size mode to enter a maximum in kilobytes. The target-size binary search tries several quality levels (including RGBA quantization when keeping PNG) and picks the highest tested setting that fits. Inspect before-and-after byte counts and download a copy for comparison. The tool returns the original bytes if a same-format re-encode at full dimensions would be larger.
    The image compressor with a photo loaded and WebP selected, quality slider visible
  3. Download the result and check it at 100 percent zoom before publishing. If a site upload recompresses your image again (social media typically does), send a slightly higher-quality version so the double compression stays acceptable. Image compression happens locally inside your browser tab, so your original photo never leaves your computer.
    The compressed image ready to download, showing size reduced by more than half

Why format choice matters more than the quality number

Quality numbers are encoder settings, not a shared visual scale across formats. JPEG at 80 and WebP at 80 are not guaranteed to look alike or produce a particular size difference. Compare a representative image at its intended display size, including texture, fine edges and any transparency. If the destination needs fewer pixels than the source, resizing can reduce the amount of data before encoding, but it also discards detail. Keep the source for later reuse. A PNG can be the right choice for exact rendered pixels, while a lossy format can be useful when some change is acceptable in exchange for a smaller delivery file.

FeatureJPEG Q80-Q85 (MozJPEG)WebP Q75-Q80PNG (@jsquash/png WASM)
Compression mode60% to 75% Reduction70% to 85% Reduction10% to 35% Deflate Reduction
Color depth4:2:0 Chroma SubsamplingYUV 4:2:0 PerceptualLossless (Q100) / RGBA Quant (<100)
ReferenceSSIM ≥ 0.98 (Invisible Loss)SSIM ≥ 0.97 (Invisible Loss)Exact Bit-Lossless UI
Best forDSLR / Real PhotosModern Web / MobileIcons, Logos, Screenshots

Why compress locally instead of uploading

Server-side image services make you upload your original, often a raw photo from a phone, and download a compressed copy. The compressor here runs in your browser using the same algorithms: nothing is uploaded, there is no account, no queue, and your original file stays on your device. You can batch multiple images at once, and the results are ready to use or share immediately.

FeaturePhone Camera Photos (JPEG/WebP)Android Camera (RAW/JPEG)Desktop Canvas / WASM
Output & limits4 MB to 15 MB → 400 KB5 MB to 20 MB → 500 KBLocal Batch Queue (≤ 50 MB / File)
Processing modeConvert HEIC First (Raster Input Only)OffscreenCanvas ThreadWeb Worker WASM Heap

Lossless versus visually lossless compression

Lossless compression (used by PNG and GIF) removes statistical redundancy in the raw pixel data without discarding any information: the original pixels can be reconstructed exactly. Typical lossless gains for photographs are modest, often 5-20%. Visually lossless compression (the category that matters for web delivery) goes further by discarding high-frequency detail that the human visual system is unlikely to notice. JPEG uses DCT (Discrete Cosine Transform) to convert spatial pixel blocks into frequency coefficients, then quantizes the high-frequency coefficients more aggressively. Modern encoders like MozJPEG refine the quantization tables and add Trellis quantization to recover quality at a given file size. WebP uses a predictive coding scheme derived from VP8, which tends to reduce ringing artefacts around sharp edges compared to DCT-only approaches. At quality settings of 75-85, these encoders typically reduce photographic file sizes by 60-80% compared to unoptimized JPEG, with no perceptible quality difference at screen viewing distances.

The tools used in this guide

Frequently asked questions

How do I know if I have gone too far with compression?

Zoom the output to 100 percent and look at textured areas: hair, fabric, foliage. Lossy compression shows as blocky patches or smeared detail first in those regions. If you see it at 100 percent zoom, viewers on a phone will too, so raise the quality setting by 5 to 10 points and try again.

Should I resize before or after compressing?

Set the required dimensions before making the final delivery encode. If both axes are reduced proportionally from 4000 to 1200 pixels wide, the output has 9 percent of the original pixel count, so 91 percent of the pixels are removed. That does not guarantee the same percentage reduction in bytes because encoding and image content also matter. Resize a copy to the dimensions the destination actually needs, then compare compression settings. Keep the full-resolution source and avoid repeated lossy exports.

Sources