Compress Image to a Target Size in KB

Choose a picture and the target maximum size. This tool tries multiple JPEG qualities and dimensions to approach the requested KB.

Formats Image → JPEGSteps & examples
A mountain photograph passes through a roller press.

Workspace

Runs locally in your browser. No file upload.

Preset parameters

Input & settings

Choose a file to get startedRead locally · No upload · 30 MiB max

No file selected

Shrinks proportionally, never enlarges. Output may shrink further to meet the target file size.

Select a file to begin.

Result

Run the tool to check your output here.

Prepare a photo for an upload size limit

  1. Choose an image your browser can decode.
  2. Enter a target size in KB and a maximum longest side in pixels.
  3. Compress, compare the actual size and dimensions, then download the JPEG.

Worked example

For a form that accepts 100 KB images, enter 100 and cap the longest side at 1600 pixels. The tool tries JPEG qualities and smaller dimensions; check the reported final size before submitting.

Input and output

Use the original image as the starting point for each attempt. Set the upload budget in KB and the longest side in pixels, then inspect both values in the result. At the same byte budget, a cropped portrait often retains more facial detail than a wide group photograph.

Format and size limits

Input is limited to 30 MiB and must be decodable by the browser. JPEG output trades detail for size. Small text, fine lines and sharp color transitions are good places to look for artifacts when deciding whether the result is acceptable.

If processing fails

If a form rejects the download, check whether it also specifies minimum dimensions or a particular file type. If it accepts the file but text looks fuzzy, try a tighter crop from the original or a larger byte allowance where permitted.

Questions about this tool

Is an exact 100 KB result guaranteed?

No. Compression depends on the image. The tool searches for a result near the target and reports the actual size; dimensions may shrink further.

What happens to PNG transparency?

The output is JPEG, which does not support transparency. Transparent areas become white, and compression can change fine detail.

How it works

A binary search explores JPEG compression quality, and progressively reduces pixel dimensions if needed. The output is a standard JPEG. This is useful for strict online application or form attachment limits, where oversized pictures are rejected.

Important limitations

JPEG compression is lossy and transparency becomes white. Some images cannot reach the exact target; the actual result size is displayed. HEIC support depends on whether your browser can decode the source.