Compress image

Set a size limit, then check the actual result.

Compressing an image here means trying real encodes and keeping the smallest one that still looks close to the original, not applying one fixed quality. Pick Smallest, Balanced (default) or High quality: Nerulio encodes PNG, JPG and WebP candidates in your browser, decodes each one again, scores it with SSIM and returns the smallest candidate above that level's similarity floor. Resolution is kept unless you set a maximum width, and the original comes back untouched when nothing beats it. For a hard byte limit set Target size under Advanced, or open a size page such as 100 KB.

Drop image files hereProcess many files at once
No upload · processed on this device

Candidates, a similarity floor and the smallest survivor

Each level is a starting quality plus a floor: Smallest 0.60 / 0.93, Balanced 0.80 / 0.965, High 0.92 / 0.985. Auto format tries every format the browser can encode (PNG, JPG and WebP in Chromium) and leaves JPG out when any pixel is transparent, so transparency is never lost silently.

Every candidate is decoded again and compared with the source: an 8 × 8 SSIM on the brightness, computed on copies at most 512 px on the long side, once over black and once over white, keeping the worse score so colours hidden under transparency cannot cheat. The smallest lossy candidate above the floor wins; the untouched original and a PNG re-encode compete too. Grainy photos that never reach the floor get the smallest candidate within 0.01 of the best score.

The result is never bigger than what you dropped in: if every candidate is larger, the original file is returned and marked "Already small — original kept".

SSIM floor
Minimum similarity a candidate must reach at the chosen level (0.93, 0.965 or 0.985).
Candidate
One real encode (format + quality) that is decoded and scored.
Auto format
All formats this browser can encode; JPG is skipped for images with transparency.

Three levels on two versions of one photo (measured)

Nerulio's compressor with the task's exact options, Chromium 153, 2026-09-28. The PNG is the repository's NASA fixture; the JPG is the same photo saved by Pillow at quality 75.

astronaut.png   512 x 512   791,555 bytes
  Smallest   WebP q0.60    22,048 bytes   SSIM 0.9626   (floor 0.93)
  Balanced   WebP q0.80    32,200 bytes   SSIM 0.9749   (floor 0.965)
  High       WebP q0.92    59,824 bytes   SSIM 0.9883   (floor 0.985)

astronaut-q75.jpg   512 x 512   40,240 bytes
  Balanced   WebP q0.80    31,538 bytes   SSIM 0.9834
  High       original kept (the passing JPG q0.92 was 51,005 bytes)

At High the only candidates above 0.985 were bigger than the file itself, so the JPG came back unchanged. That is the expected outcome for pictures that were already compressed.

What each setting does

SettingEncoder behaviourWinner
SmallestQuality 0.60 for JPG/WebPSmallest candidate with SSIM ≥ 0.93
Balanced (default)Quality 0.80Smallest candidate with SSIM ≥ 0.965
High qualityQuality 0.92Smallest candidate with SSIM ≥ 0.985
Target size set (Advanced)Quality searched down until it fitsHighest SSIM at or under the target
Max width set (Advanced)Resized first (Pica, mks2013)As above, at the new width

Check the result

  • Read the line under each file, e.g. "773 KB → 31 KB · 512×512 kept": sizes use 1,024-byte kilobytes.
  • Open the result at 100 % and look at faces, text and smooth gradients, where loss shows first.
  • Check the extension (-min.webp, -min.jpg, -min.png) against what the destination accepts.

Troubleshooting

SymptomLikely causeHow to checkFix
The result is WebP but the site needs JPGAuto keeps the smallest passing candidate, often WebPThe file name ends in -min.webpAdvanced → Output format → JPG
"Already small — original kept"No candidate above the floor was smaller than the inputCompare the level with how the file was madeTry Smallest, or set a Target size
A grainy photo is still large at SmallestIt never reaches the floor, so the near-best candidate is usedThe SSIM of all candidates stays below the floorSet a Target size or a Max width
Small text got soft on a big screenshotSimilarity is scored on a copy at most 512 px wide, which can hide fine damageZoom in on the text at 100 %Use High quality or PNG output for screenshots
A transparent PNG never becomes JPGJPG is left out of Auto when any pixel is transparent—Pick JPG explicitly; transparency then takes the JPG background colour

Other ways to do it

OptionWhen it is the better choice
A size page (20 KB – 1 MB)A form or site names a maximum file size.
Resize firstThe image has far more pixels than it will be shown at — fewer pixels save more than any quality setting.
ConvertYou need one specific format and quality, without any automatic choice.

What this page does not cover

  • Scores are computed on copies at most 512 px on the long side; tiny details on large images can be damaged without lowering the score.
  • Encoders are the browser's own, so another browser can give different sizes; EXIF is not written and animated files are refused.

Versions and sources

All sizes and scores were measured on 2026-09-28 in Playwright Chromium 153 by calling src/compression.js with the options src/task/compress.js passes (quality and floor per level, original = the dropped file), on tests/fixtures/astronaut.png, a Pillow 12.3 JPG of it at quality 75 and tests/fixtures/texture/bricks_Color.png.

Official documentation used

Example

Original geometric sample · 96 × 64
Original geometric sample · 96 × 64
Processed sample · 96 × 64
Processed sample · 96 × 64

Example generated with this tool. ZIP tools show their preview; inspect the downloaded archive for every file.

Compress image

Set a size limit, then check the actual result.

How it works

  1. Open the source file
  2. Choose the processing mode and settings
  3. Run, inspect the result and download

Supported formats

PNG / JPG / WebP / AVIF / HEIC → PNG / JPG / WebP — Input decoding and output encoding depend on browser support. Animated inputs are rejected; select a still frame first.

What this tool does

Auto compares actual browser codec outputs using a sampled visual metric and target-size search. Alpha-aware format selection; optional dimension reduction.

Implementation and verified quality

advanced · browser codecs / proxy SSIM candidate search. Quality qualification is in progress. Pro/Flagship quality has not been established.

Before you export

Actual device memory, storage and codec support. Tested examples are evidence, not a guarantee for every file.

Frequently asked questions

What determines the supported size?

Actual device memory, storage and codec support. Tested examples are evidence, not a guarantee for every file.

Are my files uploaded?

This tool processes the files you open on your device without uploading them. Images you explicitly attach to community posts are uploaded separately. Optional engines and models are downloaded from third parties; those requests expose connection information such as your IP address.

Will my work be saved automatically?

No. Images and editing state stay in this tab; media output can use local temporary storage. Changing language preserves your work; reloading, closing the tab, or following a link to another page can clear it.