Skip to the tool
pdfly

Search tools

Find a PDF tool or guide by name or by what you need to do.

No sign-up · Files deleted within 1 hour

Compress image to a size in KB

To compress an image to a size in KB, drop a JPG, PNG, or WebP, pick the size the form asks for, and download. pdfly keeps the best quality that fits, and the file you get is never over that size.

Image format
Target size

How it works

What pdfly does

  1. 01Highest quality that fitsJPG and WebP get the best quality that stays under your size. PNG keeps every color first, then tries 256 colors.
  2. 02Smaller only when neededWhen the best quality pdfly allows is still too big, the picture is made smaller in steps until it fits. The result line tells you its width and height in pixels.
  3. 03Never over the limitIf the image cannot get under your size, pdfly says how small it got. You get no file over the size you chose.

01

How to compress an image to 20 KB, 50 KB, or 100 KB

Drop the image on the tool, pick the size in KB, and download. pdfly writes the image, measures the real file, and keeps the best version that is at or under your size. You do not have to guess a quality setting or try again and again until a form accepts the file.

  1. Drop one JPG, PNG, or WebP on the tool, or browse for it. It can be up to 100 MB.
  2. Check the format. It starts on the format your image already has; change it if the form asks for another.
  3. Pick a size. 50 KB opens selected because many forms ask for it. Choose Custom for any other number.
  4. Start. A short line tells you the new size and the picture's width and height in pixels.
  5. Download the image and upload it to your form.

02

Common size limits on upload forms

Exam, visa, job, and government forms often limit each file to a small size and refuse anything heavier, usually without saying by how much. A signature is commonly capped at 10 or 20 KB. A passport-style photo is often capped at 50 KB, sometimes 20 to 100 KB. Scanned certificates and ID cards tend to get 100 to 300 KB. Always use the number printed on the form, since it is the one that will be checked.

A photo from a phone is usually 2 to 5 MB, so getting it to 50 KB means a file about a hundred times smaller. That is possible, but not by quality alone: the picture also needs fewer pixels. pdfly does both, in that order, and stops at the first version that fits.

03

What happens to quality

For JPG and WebP, pdfly looks for the highest quality whose file is still under your size, so an image with room to spare stays as clear as it can be. It never goes below a moderate quality, because past that point faces and text break into blocks. PNG has no quality setting, so pdfly keeps every color when the file fits and tries 256 colors when it does not; signatures and line drawings usually look the same either way.

When even the lowest quality is too big, the picture is made smaller, a step at a time, and the search runs again at each step. A smaller picture stays sharp; it just has fewer pixels. This is why a 12-megapixel photo can come back at a few hundred pixels wide for a 20 KB limit: that is what fits. If you need more detail, pick a larger size.

04

Size in KB versus size in pixels

Forms sometimes give two limits: a file size, such as 50 KB, and a picture size, such as 200 by 230 pixels. They are different things. The file size is how much the file weighs; the pixel size is its width and height. This tool works to the file size and tells you the width and height it ended at, so you can compare them with the form.

If the form fixes the pixel size too, crop or resize the picture to those pixels first, with the photo editor on your phone or computer, then compress it here. A picture that is already small in pixels usually fits a KB limit at a high quality.

05

JPG, PNG, or WebP

JPG is the safe choice for photos: every form and phone opens it, and it reaches small sizes well. PNG is lossless, so it suits signatures, stamps, and drawings with sharp edges, and it keeps a transparent background. WebP looks better than JPG at the same size and keeps transparency, but some older forms do not accept it. When you change a PNG with a clear background to JPG, the background turns white.

When the image is changed, its hidden details, such as the camera model, the date, and the location the phone saved, are left out of the new file. A photo the camera saved sideways is turned upright first, so it looks the same on the form as on your phone.

06

When the form wants a PDF

Some forms take documents only as PDF. If you have photos of the pages, turn JPG images into a PDF with a size limit for the whole file. If you already have a PDF that is too big, use the PDF compressor. And if the form wants images but you have a PDF, you can turn PDF pages into images under a size per image.

07

Limits

One image at a time: a JPG, PNG, or WebP up to 100 MB and 40 megapixels. The size can be anything from 8 KB to 100 MB. A side is never made shorter than 32 pixels, so a very long, thin picture may not reach a tiny size; pdfly then says how small it got. The upload and the result are deleted within 1 hour, and there is no account to create.

FAQ

Questions

Which size should I pick?

Use the number on the form. Signatures are often limited to 10 or 20 KB, passport-style photos to 50 KB, and scanned documents to 100 or 200 KB. Choose Custom for anything else.

Which format should I choose?

Keep the format the form asks for. JPG is accepted almost everywhere and suits photos. PNG keeps signatures and line drawings crisp but needs more room. WebP looks best at a small size, but some older forms refuse it. The format starts on the one your image already has.

Can I set the width and height in pixels?

Not yet. pdfly picks the largest picture that fits your size and tells you its width and height, so you can check it against the form. If the form also sets pixel sizes, crop or resize first, then compress here.

What if my image is already under the size?

If it is already under the size and in the format you picked, you get the same file back, untouched. A different format is converted, and a photo taken sideways is turned upright first.

What happens to a transparent background?

PNG and WebP keep it. JPG has no transparency, so the background becomes white, which is what most forms expect behind a signature.

My form wants a PDF, not an image. What do I use?

Use the turn JPG images into a PDF tool, which keeps the PDF under a size too. To make an existing PDF smaller, use the PDF compressor.

What are the limits?

One JPG, PNG, or WebP up to 100 MB and 40 megapixels. The size can be anything from 8 KB to 100 MB.

Do you store my data?

No. pdfly does not store your data. A generated file is deleted within 1 hour.