Compress image to 50KB

Shrink a photo or image to 50KB or less for upload limits on forms, shops and communities.

"50 KB" is a ceiling of 50 × 1,024 = 51,200 bytes. For a small photo that is room enough to keep the Balanced quality 0.80 without any search: the 512 × 512 NASA photo came out as a 45,813-byte JPG with SSIM 0.9785. The tool picks the candidate that looks closest, not the smallest — here the JPG beat a 32,200-byte WebP that scored 0.9749. JPG, PNG or WebP files already under 50 KB are returned unchanged, and a form that counts 50 KB as 50,000 bytes needs 48 in Target size.

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

When the budget is not the limit

Each format is first encoded at the level's quality. Only if that exceeds 51,200 bytes does the quality search start. For the 512 × 512 fixture both JPG and WebP at 0.80 fitted at once, so the choice came down to the score: JPG 0.9785 against WebP 0.9749. The target is a ceiling, not a goal — the tool does not raise the quality to fill the remaining 5 KB.

How many pixels fit depends on how much loss you accept. On the fixture, WebP at 0.62 bits per pixel scored 0.96 and JPG at 1.40 bits per pixel scored 0.98. Applied to 51,200 bytes (409,600 bits) that is roughly 0.29 megapixels at the higher score (about 624 × 468) and 0.66 megapixels at the lower one (about 941 × 705).

When the dropped file itself fits and is a format Auto can write, it competes with a perfect score — that is why the 40,240-byte JPG below was returned untouched.

Ceiling
The largest allowed size; results can be well below it.
Bits per pixel
File size × 8 ÷ pixel count; a rough measure of how hard a picture is compressed.
Original kept
The dropped file fits and scores 1.0, so no re-encode can beat it.

Three inputs, one 50 KB target (measured)

Balanced level, Auto format, Chromium 153, 2026-09-28; all three are the 512 × 512 NASA photo in different files.

Target 50 KB = 51,200 bytes

astronaut.png      791,555 bytes  ->  JPG q0.80   45,813 bytes  SSIM 0.9785
                   (WebP q0.80 32,200 bytes, SSIM 0.9749, lost on score)
astronaut.jpg       75,758 bytes  ->  JPG q0.80   44,435 bytes  SSIM 0.9822
astronaut-q75.jpg   40,240 bytes  ->  original kept, already under 51,200

Room at 0.62 / 1.40 bits per pixel: 0.66 / 0.29 megapixels

Shrinking was also allowed in a second run: none of the five smaller widths scored higher, so the results above did not change.

Entering the right limit

The form saysTarget size to enterLargest file you get
50 KB, counted as 1,024 bytes50 (preset)51,200 bytes
50 KB, counted as 1,000 bytes4849,152 bytes
50 KB and JPG only50, Output format JPGOn the fixture the same JPG as Auto chose
50 KB, fill it with quality50, level High qualityStarts at 0.92 before searching down

Check the result

  • Read the size in the result list (1,024-byte KB) and the exact byte count in your file manager.
  • Look for "kept" in the result line: the original was already small enough, which is not an error.
  • Check faces and fine print at 100 %.

Troubleshooting

SymptomLikely causeHow to checkFix
The file is far below 50 KBThe target is a ceiling; Balanced starts at 0.80 and never goes higherResult line shows e.g. 45 KBChoose High quality to start at 0.92
The form rejects a "50 KB" fileThe form counts 50,000 bytesExact bytes in file propertiesEnter 48 as Target size
"Target size not reached" on a phone photoSeveral megapixels do not fit in 51,200 bytesWarning under the fileAllow smaller dimensions or resize to about 900 px wide first
Nothing changedThe file was already under 50 KB and returned as it was"original kept" in the result lineUse it as it is, or choose a smaller target

Other ways to do it

OptionWhen it is the better choice
Compress to 20 KBThe limit is tighter; expect WebP around quality 0.5 on a 512-px photo.
Compress to 100 KBThe form allows 100 KB; larger photos keep more detail.
PNG to JPGA photo saved as PNG usually fits once it is a JPG at quality 92.

What this page does not cover

  • Quality is never raised above the chosen level to use the whole budget.
  • Similarity is judged on a copy at most 512 px long; check fine print yourself.

Versions and sources

Measured on 2026-09-28 in Playwright Chromium 153 by calling src/compression.js with the options src/task/compress.js passes for ?kb=50, with and without shrinking, on tests/fixtures/astronaut.png and two Pillow JPGs of it (quality 92 and 75). The pixel estimates are arithmetic from those measured densities, not measurements of other photos.

Official documentation used

Compress image to 50KB

Several quality and format candidates are encoded until one fits 50KB; each result is decoded again and compared (SSIM) so the best-looking one wins. You see the real file size before downloading.

Resolution is kept by default. Only if the target cannot be reached, opt in to shrinking the dimensions.

Your file is never uploaded — it is processed inside this browser.

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.