# Photo Resizer by Target Size

Shrink a photo until it fits a size in kilobytes, keeping the highest quality that still fits.

- Category: Web (web)
- URL: https://ilham.dev/tools/photo-target-resizer/
- Documentation: https://ilham.dev/tools/photo-target-resizer/index.md
- Keywords: resize, photo, target size, kb, compress, limit, upload, quality, jpeg, webp, form

## Example questions

- How is the right quality found?
- What if the limit is too small?
- Which format comes out?

## Properties

- Runs in the browser
- No login required
- No data uploaded


## About

Some forms and services cap an upload at five hundred kilobytes or a megabyte. Give this tool the limit and the picture is scaled to fit, then re-encoded at the highest quality that stays under it, with the result shown before you download.


## Questions

### How is the right quality found?

The encoder is tried at a series of qualities from high to low and stops at the first result that fits. That gives the best-looking file the limit allows rather than a guess.

### What if the limit is too small?

The smallest the encoder can produce is reported, along with the quality it used. Lower the longest edge, which removes pixels rather than quality, and try again.

### Which format comes out?

JPEG by default, because it is the most widely accepted. With the WebP box ticked the same picture is also encoded as WebP, and whichever of the two is smaller is the one you get.

