CompNivi

Compress Image to Custom Size

Choose exactly how small you need your image — any value in KB or MB — and this tool will find the best quality that fits your target. Ideal when a form or portal asks for a size that doesn't match one of our preset tools.

Drag & drop your files here

or tap to browse from your device

Supports .jpg, .jpeg, .png, .webp · Max 20 MB per file

Upload up to 10 files at once — they'll be compressed together and packed into one ZIP to download.

How to set a custom target

Upload your image, switch the unit to KB or MB, and type the exact number you need. The tool validates your input (it must be greater than 1 KB and smaller than your original file) before compressing, so you can't accidentally request an impossible or meaningless target.

Why a custom target is useful

Not every form uses round numbers like 100 KB or 1 MB — some ask for 75 KB, 150 KB, or 350 KB specifically. Rather than guessing with a preset and hoping it's close enough, you can match the exact limit and avoid a rejected upload.

How the compression works

The engine performs an iterative search over JPEG/WebP quality settings, and reduces image dimensions only if quality reduction alone cannot reach your number. It always returns the highest-quality result that satisfies your target.

Tips for the best result

  • If your target is very close to the original size, expect only minor visible changes.
  • For very aggressive targets, try a smaller or simpler source image for a cleaner result.
  • Use MB for anything above roughly 1000 KB — it's easier to reason about for large targets.

Frequently Asked Questions

What is the smallest size I can request?+

The minimum accepted target is greater than 1 KB. Extremely small targets on detailed photos will show visible compression artifacts.

Can I request a size larger than my original file?+

You can, but compression won't add data — if your target is larger than the original, the tool simply keeps the original file rather than pointlessly re-encoding it.

Is this tool private?+

Yes, the file is processed entirely in your browser and is never uploaded to a server.

Can I switch between KB and MB?+

Yes, use the unit dropdown next to the target size field at any time.