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
- 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.
- 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.

- 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.

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.
| Feature | JPEG Q80-Q85 (MozJPEG) | WebP Q75-Q80 | PNG (@jsquash/png WASM) |
|---|---|---|---|
| Compression mode | 60% to 75% Reduction | 70% to 85% Reduction | 10% to 35% Deflate Reduction |
| Color depth | 4:2:0 Chroma Subsampling | YUV 4:2:0 Perceptual | Lossless (Q100) / RGBA Quant (<100) |
| Reference | SSIM ≥ 0.98 (Invisible Loss) | SSIM ≥ 0.97 (Invisible Loss) | Exact Bit-Lossless UI |
| Best for | DSLR / Real Photos | Modern Web / Mobile | Icons, 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.
| Feature | Phone Camera Photos (JPEG/WebP) | Android Camera (RAW/JPEG) | Desktop Canvas / WASM |
|---|---|---|---|
| Output & limits | 4 MB to 15 MB → 400 KB | 5 MB to 20 MB → 500 KB | Local Batch Queue (≤ 50 MB / File) |
| Processing mode | Convert HEIC First (Raster Input Only) | OffscreenCanvas Thread | Web 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
- Compress imagesBatch compress JPG, PNG, WebP, and AVIF images by quality slider or exact target KB size.
- Resize imagesResize images by dimensions or percentage, then export JPG, PNG, WebP or AVIF in your browser.
- SVG optimizerOptimize an SVG with SVGO. Set numeric precision, compare file sizes and download the result.
- Image comparison sliderCompare two images with a before/after slider, side-by-side view, onion-skin overlay, or pixel difference mode.
- Social Post MakerCreate news cards, quotes, carousels, and social media visuals in 4:5, 1:1, 9:16, and 16:9 locally in your browser.
- Instagram Carousel & Grid SplitterSplit wide panoramic photos into 2 to 10 swipeable Instagram or LinkedIn carousel slides, or slice a 3×1, 3×2, or 3×3 profile grid locally in your browser.
- Quote Card & Testimonial MakerCreate book excerpt cards with pastel word highlights, 5-star customer review graphics, minimal quotes, and podcast waveform cards locally in your browser.
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.