Skip to content

Compress Image to KB

Shrink a JPG, PNG or WebP image down to a target file size such as 100 KB, entirely in your browser.

1 · Choose an image

2 · Pick a target

Target file size

1 KB is treated as 1,024 bytes. Some portals count a kilobyte as 1,000 bytes, so leave headroom when a submission is strict.

3 · Output

Format
Dimension limit — optional

Result

No file chosen yet.

The compressed image appears here.

Encoding happens in this browser through a canvas. The file is not uploaded, stored or logged.

Your file is never sent to a server. It is read and processed by your own browser, and the results are not stored.

How to use it

  1. Choose an image or drag it onto the drop area.
  2. Pick a target size, or type your own in kilobytes.
  3. Choose the output format, and a dimension limit if the target is a long way below the current size.
  4. Press Compress, then check the reported output size before downloading.

Limits worth knowing

  • The target is a best-effort search, not a guarantee. If the browser cannot reach it, the tool says so and reports the smallest size it actually produced — it will not label a missed target as a success.
  • Target sizes work for JPEG and WebP only. PNG is lossless, so its output size cannot be steered to a number; choose PNG only when you want conversion or resizing without a target.
  • Files above 25 MB are not opened, and images above 20 megapixels or 8,192 pixels on a side are refused before encoding, because those are the sizes that crash browser tabs rather than the ones that take longer.
  • Compression runs on this device through a canvas and takes a few seconds on large images. The progress figure counts encoder passes, not upload bytes — nothing is uploaded.
  • Re-encoding always discards some detail. A JPEG that has already been compressed once will degrade further with each pass, so keep the original.

How the target size is reached

The encoder does not know in advance what quality will produce a 100 KB file, so it searches: encode, measure, adjust, repeat until the output fits or the quality range runs out. The progress figure counts those attempts, which is why it can move quickly and then slow down.

Because the search is bounded by the quality range, a target far below what the pixels can carry is unreachable. That is normally a dimensions problem rather than a quality one: reducing the longest edge shrinks the amount of detail that has to be encoded, and succeeds where quality alone cannot.

The size shown after compression is counted from the finished file, not estimated from the settings, so it is the number a form will see.

Choosing a format

JPEG is the safe choice: every browser encodes it, every portal accepts it, and it compresses photographs well. It has no transparency, so any transparent area is flattened onto the background colour you pick.

WebP usually reaches a smaller file than JPEG at similar quality, but some older upload systems reject it. If a form asks for JPEG, produce JPEG.

PNG is lossless. It suits screenshots, line drawings and images with transparency, and it is the only choice that keeps an alpha channel intact — but its output size is whatever the image needs, not a number you set.

When the result is not smaller

A small or already-optimised file can come back larger than it started, particularly when converting from JPEG to PNG. The tool reports the measured size either way and lets you compare before downloading, rather than hiding the outcome.

If a file already meets your target in the format you asked for, it is offered unchanged. Recompressing it would lose detail for no gain.