Compress Image to 100KB – Free Online Tool

Compress image to 100KB instantly in your browser — no upload, no sign-up. Works with JPEG, PNG & WebP. Download your smaller file in seconds.

Shrink any photo to under 100KB in seconds

Drop your image in, set 100KB as the target, and download a compressed file ready for email attachments, government forms, job applications, or any upload field with a strict file-size limit. No account needed, and your image never leaves your device.

How to compress image to 100KB (3 steps)

  1. Upload your image – click the area above or drag and drop a JPEG, PNG, or WebP file.
  2. Set the target size – type 100 in the KB field (it may already be set for you). Adjust the quality slider if you want more control over sharpness.
  3. Download – click the download button. Your compressed image is ready instantly.

The tool hits roughly 100KB by automatically reducing JPEG quality until the file crosses under that threshold. Larger images typically need a lower quality setting; small images may barely change at all.

Worked example: a real photo before and after

Say you have a holiday photo shot on a phone. Before compression it looks like this:

PropertyOriginalAfter compression
File size3.4 MB~96 KB
FormatJPEGJPEG
Resolution4032 × 3024 px4032 × 3024 px (unchanged)
Quality setting~22%

The pixel dimensions stay the same; only the JPEG quality coefficient is reduced. The result is a 36× smaller file that still looks fine on a screen or printed at a small size.

How to do this in code (Python & JavaScript)

If you need to automate image compression to a target size in your own project, here are minimal, runnable examples.

Python (Pillow)

# pip install Pillow
from PIL import Image
import io

def compress_to_target(input_path, output_path, target_kb=100):
    img = Image.open(input_path).convert('RGB')
    quality = 85
    while quality > 5:
        buffer = io.BytesIO()
        img.save(buffer, format='JPEG', quality=quality)
        if buffer.tell() <= target_kb * 1024:
            break
        quality -= 5
    with open(output_path, 'wb') as f:
        f.write(buffer.getvalue())

compress_to_target('photo.jpg', 'photo_100kb.jpg')

JavaScript (browser canvas API)

// Compress an image File object to approximately targetKB
async function compressToTarget(file, targetKB = 100) {
  const img = await createImageBitmap(file);
  const canvas = document.createElement('canvas');
  canvas.width = img.width;
  canvas.height = img.height;
  const ctx = canvas.getContext('2d');
  ctx.drawImage(img, 0, 0);

  let quality = 0.85;
  let blob;
  while (quality > 0.05) {
    blob = await new Promise(res =>
      canvas.toBlob(res, 'image/jpeg', quality)
    );
    if (blob.size <= targetKB * 1024) break;
    quality -= 0.05;
  }
  return blob; // use URL.createObjectURL(blob) to download
}

Both examples loop through decreasing quality values until the output file is at or below 100KB. The browser tool above uses the same canvas technique — no server involved.

How it works

JPEG compression works by discarding fine color detail that the eye barely notices. A quality value closer to 100% keeps almost everything; a lower value throws away more and produces a smaller file. This tool draws your image onto an HTML5 canvas, then calls canvas.toBlob() repeatedly with decreasing quality until the blob size falls under your target. The whole process runs in your browser using the Canvas API (MDN) — nothing is uploaded anywhere.

PNG files are lossless by nature, so they are converted to JPEG before quality-based compression is applied. If preserving transparency matters, use a dedicated PNG compressor instead.

When to use a 100KB target — and when not to

  • Use it for: passport or visa photo uploads, HR portals, government form submissions, email attachments, and any site that rejects files over a set size.
  • Not ideal for: print-ready artwork (you need high resolution and quality), transparent images (JPEG drops transparency — keep those as PNG or WebP), or files that are already under 100KB (over-compressing a tiny file just degrades quality for no gain).
  • Very large originals (over 20MP) may end up looking soft at 100KB. Resize the image to a smaller pixel dimension first, then compress — a 1200px-wide image at 100KB looks sharper than a 4000px-wide image at the same file size.

Your image stays private

Everything happens entirely in your browser. The file is processed on your own device using JavaScript and the HTML5 Canvas API — it is never sent to any server. You can even disconnect from the internet after the page loads and the tool will still work.

Related tools you might need

Working with data files alongside images? These free tools handle common developer tasks without any sign-up:

Ready to reduce your image to 100KB? Drop it into the tool above and download your compressed file in seconds.

Frequently asked questions

Will the tool always get my image to exactly 100KB?+
It gets as close as possible, but results vary by image content. A very busy photo (lots of detail) may land at 95–102KB. A nearly solid-color image might compress well under 100KB at even moderate quality. You can fine-tune the quality slider to hit a specific size.
Is my photo uploaded to a server?+
No. The compression runs entirely in your browser using the HTML5 Canvas API. Your image never leaves your device. You can verify this by disconnecting from Wi-Fi after the page loads — the tool still works.
Does compressing to 100KB reduce the image dimensions (resolution)?+
No, by default the pixel dimensions stay the same. Only JPEG quality is reduced. If you want to reduce dimensions as well, resize the image first, then compress — smaller dimensions plus lower quality gives the best quality-per-KB result.
Can I compress a PNG to 100KB?+
Yes. PNG files are converted to JPEG internally before quality-based compression is applied, because PNG is lossless and can't be reduced the same way. If your PNG has a transparent background, that transparency will be lost in the output — save it as WebP or use a PNG-specific optimizer instead.
Is this tool free? Do I need to sign up?+
Completely free, no sign-up, no watermarks. Just open the page, drop your image, and download.
What's the difference between image compression and resizing?+
Compression (what this tool does) reduces file size by lowering JPEG quality — pixel count stays the same. Resizing changes the width and height in pixels. Both reduce file size, but in different ways. For the smallest possible file at 100KB, doing both — resize to a sensible width, then compress — usually gives the best visual result.
How do I compress an image to 100KB in Python?+
Use the Pillow library. Open the image, then save it as JPEG in a loop with decreasing quality values until the output buffer is 100KB or less. There's a full runnable snippet in the 'How to do this in code' section above.
Can this handle very large files, like a 20MB RAW or DSLR photo?+
It can handle most large JPEG and PNG files, but extremely large images (over 20–25MP) may be slow on older devices because the browser has to load the full image into memory. For batch compression of many large files, a command-line tool like ImageMagick or a Python script with Pillow is more practical.