Skip to content

Compress Image to 100KB or Any Target Size in KB

Type the size limit a form asks for and get a file that is measured to be at or under it. The image is compressed on your device, not on a server.

Runs in your browserFree, no sign-upLast reviewed

Settings

Common limits: 20, 50, 100 and 200 KB. The result is always at or under this size.

Results update automatically as you type.

Fill in the settings to see your result here.

Your result appears here instantly — nothing is uploaded.

Quick answers

How do I compress an image to 100 KB?
Choose the image, leave Target size (KB) at 100 and download the result. The tool searches for the highest quality that fits in 102,400 bytes and scales the picture down only if quality alone cannot get there.
Is 100 KB 100,000 bytes or 102,400 bytes?
It depends who is counting. Windows counts 1,024 bytes per KB, so 100 KB is 102,400 bytes. macOS counts 1,000, so 100 KB is 100,000 bytes. If a checker rejects a file that looks small enough, switch 1 KB equals to 1,000 bytes.
Will the compressed image be exactly 100 KB?
No, it will be at or just under it. Encoders cannot hit an exact byte count, so the tool keeps the largest result that does not exceed the limit. Upload limits are maximums, so a file slightly under passes.
Why did my image get smaller in width and height?
Quality 50 at the original dimensions was still over your limit. Below that point JPEG blocks become obvious, so the tool scales the picture down instead. Tick Keep the original pixel dimensions to stop that.
Can I compress a PNG to 50 KB?
Yes, but the result is a JPEG or WebP. PNG is lossless and has no quality setting to search over, so it cannot be steered to a byte target. Transparent areas become white in JPEG and stay transparent in WebP.
What if the image cannot reach the target size?
You get a clear warning and the smallest version the tool could make, with its real size shown. This mostly happens when Keep the original pixel dimensions is ticked on a large photo with a small target.

What Compress Image to KB does

This tool shrinks a JPG, PNG or WebP until it fits a size limit you set in kilobytes. The default target is 100 KB, which is 102,400 bytes. It first lowers the encoder quality, checking the real size of each attempt, and only if quality 50 is still too large does it scale the pixel dimensions down. The result is reported with its exact byte count, its dimensions and the quality that was used, so you can see what the limit cost you. If no setting fits, the tool says so instead of handing you a file that is over. Everything runs in your browser and the image is not uploaded.

20 KB, 50 KB, 100 KB and 200 KB in bytes

The limit the tool enforces for each target, under both ways of counting a kilobyte. These are the figures shown beside Target in the result.

TargetBytes at 1,024 per KBBytes at 1,000 per KB
10 KB10,24010,000
20 KB20,48020,000
30 KB30,72030,000
50 KB51,20050,000
100 KB102,400100,000
150 KB153,600150,000
200 KB204,800200,000
300 KB307,200300,000
500 KB512,000500,000
1,024 KB (1 MB)1,048,5761,024,000

Choosing 1,000 bytes per KB gives a file that passes under either definition, at the cost of about 2.3% of the size budget.

How the target size is reached

An encoder has a quality setting, not a size setting, so the size has to be found by encoding and measuring. The order below is what the tool does.

  1. If the file you chose is already at or under the limit, it is returned untouched. Re-compressing it would only lose quality.
  2. The image is encoded at its original dimensions at quality 50 and quality 95. If 95 fits, that is the result.
  3. Otherwise a binary search between 50 and 95 finds the highest quality whose real file size fits. That takes about eight encodes.
  4. If quality 50 is still too large, the dimensions are reduced. The new scale is estimated from how far over the file was, and the quality search runs again at that size. Width and height shrink together, so the shape never changes.
  5. If Keep the original pixel dimensions is ticked, step 4 is skipped and quality is searched from 49 down to 10 instead.
  6. The result is accepted only if its measured size is at or under the limit. Otherwise the smallest attempt is shown with a warning.

What the tool does in three common cases

These outcomes follow directly from the rules above and do not depend on the picture.

The photo is already small enough

A 60,000-byte JPEG, Target size 100 KB, 1 KB equals 1,024 bytes

Returned unchanged with the note Already under the target, since 60,000 is below 102,400 bytes

No quality is thrown away on a file that would pass anyway.

A strict checker that counts in thousands

Target size 100 KB, 1 KB equals 1,000 bytes

The limit becomes 100,000 bytes, so the file also passes any check that uses 102,400

Dimensions locked on a small target

A large photo, Target size 20 KB, Keep the original pixel dimensions ticked

If quality 10 is still above 20,480 bytes, a Could not reach 20 KB warning appears with the smallest size achieved

Untick the box and the same photo is scaled down until it fits.

Choosing between 20, 50, 100 and 200 KB

Use the number printed on the form. Application and exam portals, job sites and identity checks state a maximum, and anything at or under it is accepted, so there is nothing to gain from aiming lower than you have to.

Smaller targets cost real detail: first quality goes, then pixel dimensions. A full-resolution phone photo is several megabytes, so expect it to be scaled down for any of these targets. An image already sized for a form, a few hundred pixels across, usually fits by lowering quality alone. A 20 KB limit leaves room for only a small picture, which is why it tends to be set for signatures and thumbnails, where there is little detail to lose.

If a form also gives pixel dimensions, such as a fixed width and height, resize the image to those dimensions first with the Image Resizer, then bring the result here and tick Keep the original pixel dimensions so only quality changes.

How this differs from the Image Compressor

The Image Compressor on this site works the other way round: you pick a quality percentage and the file size is whatever comes out. That suits making a web page lighter, where any reduction helps.

This page starts from the size. You state the limit and the quality and dimensions are worked out for you, which is what you need when a form rejects anything over a fixed number of kilobytes. Use the compressor when you care about how the picture looks, and this tool when you care about what the file weighs.

Limits worth knowing before you rely on it

  • One image at a time. There is no batch mode or ZIP download.
  • Output is JPEG or WebP only. A PNG source is converted, and in JPEG its transparent areas are filled with white.
  • The result is a fresh encode, so EXIF data such as camera model and GPS position is not carried over.
  • Browsers ship different encoders, so the same photo and target can give slightly different quality numbers in Chrome, Firefox and Safari. The size limit is honoured in all of them.
  • A browser that cannot write WebP reports that and asks you to choose JPEG rather than silently saving another format.
  • Scaling stops when the longer side would drop below 16 pixels. Targets too small for a recognisable image are reported as unreachable.

Using Compress Image to KB

  1. 1

    Choose your file under Image (JPG, PNG or WebP). Files up to 30 MB are accepted.

  2. 2

    Enter the limit in Target size (KB): 100 is the default, and 20, 50 and 200 are the other common limits.

  3. 3

    Leave 1 KB equals on 1,024 bytes unless the form you are filling in is known to count 1,000 bytes per KB.

  4. 4

    Pick an Output format: JPEG is accepted everywhere, WebP keeps more detail at the same size.

  5. 5

    Tick Keep the original pixel dimensions only if the width and height must not change.

  6. 6

    Check the Final size and Dimensions in the result, then download the file.

Answers to common questions

Is my photo uploaded to a server when I compress it?
No. The file is decoded, re-encoded and measured by your own browser using the Canvas API. The image data is not sent anywhere, which matters for ID photos, signatures and documents.
How do I reduce a photo to under 50 KB for an online form?
Set Target size (KB) to 50. The limit becomes 51,200 bytes. If the form also fixes the pixel dimensions, resize to those first and tick Keep the original pixel dimensions so only the quality is lowered.
Why is the output a JPG even though I uploaded a PNG?
Hitting a size target needs lossy compression with an adjustable quality, and PNG has neither. JPEG is the default because every upload form accepts it. Choose WebP if you need transparency kept and the destination supports it.
Does compressing to a target size lose quality?
Yes. JPEG and WebP at these settings discard detail permanently, and a scaled-down image has fewer pixels. Keep your original file. The tool limits the damage by using the highest quality that still fits.
What quality setting will my image end up with?
Whatever is the highest that fits, between 50 and 95 when dimensions are free to change, or as low as 10 when they are locked. The exact figure is shown as Quality used in the result.
Can I compress an image to 1 MB or 2 MB?
Yes. Enter 1024 for 1 MB or 2048 for 2 MB. Any target from 1 KB to 30,000 KB works. With large targets the image usually keeps its dimensions and only the quality is adjusted.
Can it make an image larger, for example from 30 KB up to 100 KB?
No. A file already under the target is returned as it is. This tool only reduces size; it does not pad a file up to a minimum.
Why is the result a few KB under my target instead of right on it?
Quality moves in whole steps and each step changes the size by a few kilobytes. The tool takes the last step that fits, so the next one up would have gone over the limit.

Looking for something else? Browse all image tools or see every tool.