Skip to content
toolsdocks

How to compress an image to a specific size (100 KB, 50 KB or 20 KB)

8 min read · Updated 23 October 2026

How do I compress an image to a specific size? Pick the format JPEG, then lower the quality until the file is under the limit. If the quality gets too low before the file is small enough, reduce the pixel dimensions as well. The image compressor does this for you: enter a target such as 100 KB and it searches for the highest quality that fits. For very small targets, shrink the picture first with the image resizer.

Online forms are picky. A job portal might accept a photo only up to 100 KB. A school or agency may want a signature under 20 KB. A phone photo is often 3 MB or more, so it will not fit without changes. This guide explains the two things that control file size, shows the math, and gives you a reliable method for hitting a limit without ruining the picture.

What makes an image file big

Two things set the size of a JPEG file:

  1. Pixel dimensions. A photo from a 12-megapixel phone is 4032 x 3024 pixels. That is over 12 million pixels, and each one needs data.
  2. Quality. JPEG throws away detail to save space. The quality setting runs from 1 to 100. A lower number throws away more, and the file shrinks.

Quality changes the size a lot at first, then less. Going from 100 to 85 cuts a file by a large amount. Going from 30 to 20 saves little, but the picture gets blocky and blurry. That is why dimension changes matter. Cutting the width and height in half cuts the pixel count to a quarter.

The sweet spot for a hard limit is usually to use both: sensible dimensions and a moderate quality. One without the other leads to either a huge image with terrible quality, or a tiny image that is needlessly clear.

How big should the picture be?

Here is a useful way to think about it. Divide the file size, in bits, by the number of pixels. The result is the average number of bits the file spends on each pixel. The more bits per pixel, the better the picture.

A 100 KB limit is 100 x 1,024 = 102,400 bytes, or 819,200 bits.

  • At full phone size (4032 x 3024 = 12,192,768 pixels) that is only about 0.07 bits per pixel. The result would be a smeared mess.
  • At 800 x 600 (480,000 pixels) it is about 1.7 bits per pixel. That is enough for a clear photo.

As a rough starting point, not an official standard, many photos look acceptable at around 1.5 bits per pixel. Flat images, such as a scan of a signature on white paper, need far fewer. Busy images with fine texture need more. Use this table to pick dimensions to try first:

Target size Bytes Dimensions to try Bits per pixel
100 KB 102,400 800 x 600 about 1.7
50 KB 51,200 600 x 400 about 1.7
20 KB 20,480 300 x 400 about 1.4
240 KB 245,760 600 x 600 about 5.5

The last row is a real example. The US State Department's digital image requirements for visa applications (the DS-160 form) ask for a square JPEG of 240 KB or less, between 600 x 600 and 1200 x 1200 pixels. Other applications, such as online passport renewal, use different limits, and requirements change, so check the current page for your application. At 600 x 600 you have plenty of room. At 1200 x 1200 the budget is about 1.4 bits per pixel, so you will use a lower quality setting.

The method that works every time

  1. Check the rules on the form. Note the maximum size in KB or MB, the file type, and any pixel dimensions. Some forms list a minimum size too, and a file that is too small can be rejected as well.
  2. Resize first. Open the image resizer. Pick a mode such as Longest side, Width/height or Fit in a box, and enter the dimensions from the table. With the aspect ratio kept, a 4000 x 3000 photo set to a longest side of 1600 becomes 1600 x 1200. For a square, use an exact size with crop.
  3. Compress to the target. Open the image compressor, add the resized picture, enter the size in KB and choose JPEG.
  4. Read the result row. It shows the final file size, the quality that the search settled on, and the dimensions. The download is never over your target.
  5. Check how it looks at full size. If it looks too rough, go back to step 2 with a smaller picture and compress again.

The compressor works by trying different quality levels until it finds the highest one that fits. It keeps full size when it can. Only if even the lowest quality is too large, and resizing is allowed, does it shrink the dimensions in steps of about 10 percent. It reports when that happened. Targets can go as low as 10 KB, and you can process up to 200 images in a batch.

Everything happens on your device. The photo is not uploaded to a server, which matters when the picture is an ID or a passport photo.

KB, KiB and why 100 KB may not be 100 KB

Here is a detail that catches people. Some systems use 1 KB = 1,000 bytes. Others use 1 KB = 1,024 bytes. The compressor uses 1,024, so a 100 KB target means up to 102,400 bytes.

If a portal counts 100 KB as 100,000 bytes, a file of 102,000 bytes could be rejected even though your tool said it was under 100 KB. To be safe, enter a target a few percent below the limit. For a 100 KB limit, aim for 95 KB. For a 20 KB limit, aim for 18 KB.

A worked example

You need a profile photo for a job application. The form says: JPEG, maximum 100 KB.

  1. Your phone photo is 4032 x 3024 and 3.2 MB. At full size, a 100 KB budget would be 0.07 bits per pixel, which is far too little.
  2. Open the resizer and set the longest side to 800. The photo becomes 800 x 600.
  3. Open the compressor. Enter 95 as the target and choose JPEG.
  4. The compressor returns a file just under 95 KB. At 480,000 pixels, that is about 1.6 bits per pixel, so the face stays clear.
  5. Upload the file. If the portal still complains, try 90 KB.

Try the same photo with only the compressor and a 100 KB target. If the minimum quality you allow is too low to reach 100 KB at full size, the tool shrinks the dimensions for you, in steps of about 10 percent, until the file fits. That works, but you have less control over the final size in pixels. Resizing first gives you the dimensions you choose.

Now a harder case: a 20 KB signature image. Photograph the signature on plain white paper in good light, crop closely, and set the longest side to about 400 pixels. A plain white background compresses very well. A 400 x 150 image at 20 KB has a budget of about 2.7 bits per pixel, which is generous for plain ink on white.

JPEG, PNG or WebP?

Format Good for Size for photos
JPEG Photos, almost every upload form Small
PNG Logos, screenshots, text, transparency Large for photos
WebP, AVIF Websites and apps that accept them Smaller than JPEG

Most forms want JPEG. PNG is lossless, so to reach a small target it must lose colors or dimensions rather than quality. Unless the form requires PNG, convert to JPEG first with the image converter, then compress. If you want to understand the differences, read choosing an image format.

Common mistakes

  • Compressing a huge photo without resizing. The result is a smeared picture. Resize first.
  • Compressing again and again. Every JPEG save loses detail. Always start from the original.
  • Aiming exactly at the limit. Allow a small margin because of KB definitions.
  • Renaming a PNG to .jpg. The portal may reject it, or it may read the file wrongly. Convert it.
  • Making the file too small. Some forms set a minimum. A 5 KB file could be rejected even though it is under the maximum.
  • Cropping the face too tight. For an ID photo, follow the layout rules in the instructions, not just the size.
  • Ignoring the pixel size. A file can meet the KB limit and still fail on dimensions.
  • Screenshotting the photo. A screenshot is lower quality and has the wrong pixel size. Use the original.

FAQ

How do I reduce a photo to 100 KB on my phone? Open the image compressor in your phone's browser, choose the photo from your library, enter 100 as the target and pick JPEG. If the result looks too rough, resize the picture to about 800 pixels on the longest side first.

Does compressing reduce the pixel dimensions? Not unless it has to. The compressor tries quality first at the full size. It reduces dimensions only if the lowest allowed quality is still too large.

What is the difference between resizing and compressing? Resizing changes how many pixels the picture has. Compressing changes how much data each pixel gets. For a hard size limit you often need both.

Can I compress a PNG to 100 KB? Yes, but PNG is lossless, so it can only reach a target by reducing colors or dimensions. A photo saved as PNG is usually much smaller as JPEG. Convert it first unless the form demands PNG.

Why is my compressed image still blurry? The target may be too small for the pixel count. Use fewer pixels. A 600 x 400 image at 50 KB looks better than a 3000 x 2000 image squeezed into 50 KB.

Is it safe to compress ID photos online? The toolsdocks compressor and resizer work in your browser and do not upload your pictures. Many other sites do upload them, so be cautious with identity documents.